#Polygon colors in DXF
4 messages in this thread
I included DXF reader in my small special purpose rendering package. However,
in that DXF parser source code there is no description of the format itself and
I don't know how to read color information for polygons, etc.
I would like to be able to read color information for elements in DXF so that I
can apply flat shading.
Can anyone tell me which parameter of an element in DXF file represents color
information.
Thanks a lot!
Branimir,
colors in a DXF file are pretty complex. You may find a 62 group containing
an 8 bit integer indicating AutoCAD's Color Index. If there isn't a 62
ge for download as DXFBK.TXT
from the libraries of the ACAD forum.
Dietmar
Dietmar –
As a DXF "expert" maybe you could help me with this –
Any & All –
I'm working with a DEM file (digital elevation model) supplied (originally) by
the government (US Geological Survey) for an island off the coast of the US.
This DEM will need to be imported into 3DS, and will have a previously
ortho-rectified satellite photo mapped to it.
The firm I'm working with is offering to convert this DEM into whatever
"flavor" of DXF I prefer (we've already tested to see if the shareware
converter available here can convert it, or if it can be brought into Vista Pro
for conversion – no on both counts). I will be working with the file in 3DS, so
I want the format that preserves the proper amount of model complexity and
integrity during the import process, and creates a model that is at the same
time not unnecessarily complex (a tall order, I know – considering the dicey
nature of DXF importing!)
In the "save" dialogs of the Photoshop plug-in Cybermesh, I've seen these
references to types of DXF files – NxM DXF, 3D Face DXF & Polyline DXF. Which
type does 3DS prefer? Does anyone have a foolproof method/source for converting
DXF files, should I have problems?
TIA for the help!
bob weil
envision graphics
Robert,
first of all you will need a 3D model to work with it in 3DS. 3DS accepts
any method to describe 3D in DXF, i.e. by elevation, by 3D meshes, by
polyface meshes – whatever you like.
3D meshes are used to describe faces with a rectangular topology, i.e. those
that can be represented by n*m vertices. polyface meshes are used to
describe faces using all other kinds of topology. 3DS uses polyface meshes
for its DXF output, thus you can see that 3DS objects and polyface meshes
fit together.
I recommend that you have the firm either give you a DXF consisting of a
polyface mesh of the island (at a reasonable resolution!) in Release 12 DXF
format. If they work with AutoCAD Release 13, have them create a 3DS file
directly (R13 has a 3DSout command).
Dietmar