dxf color export ?

Olly Betts olly at survex.com
Fri Dec 28 02:15:46 GMT 2012


On Mon, Nov 26, 2012 at 12:50:47PM +0000, WarrenZ wrote:
> Do you think it would be easy to add color to the DXF export, such as  
> color by depth?

The tricky thing about colour by depth is that each leg isn't at a
single depth (unless it's exactly horizontal), so you ideally want to
have a colour gradient on each leg, which not all formats support.
SVG (for example) does allow colour gradients - I'm not sure about
DXF.

And if a leg crosses through multiple depth colour bands, you may want
to specify the colour at each point, though just doing a simple two
point gradient for each leg (i.e. at either end) will probably be fine
for most cases - unless your cave is shallow, it's usually just pitches
which cross multiple colour bands in a single leg.

But you can probably just colour each leg by its average depth and have
something useful, even if it doesn't look quite so nice.

Colour by date is inherently easier as each leg has a single colour.

> I'm happy to have a go hacking the aven source.  After  
> a bit of searching I found the dxf color palette in the attached python  
> code fragment, for inkscape -> dxf export extracted from here
> http://www.bigbluesaw.com/saw/big-blue-saw-blog/general-updates/big-blue-saws-dxf-export-for-inkscape.html

If you want to take a look, the code you're after is in src/export.cc -
search for DXF::line and you'll find the method which writes out the
DXF code to draw a leg.

Cheers,
    Olly



More information about the Survex mailing list