Mesh decimate for DXF data formats [message #37299] |
Thu, 11 December 2003 09:29 |
nasalmon
Messages: 33 Registered: August 2003
|
Member |
|
|
Can i effectively use the IDL routine "Mesh Decimate" to reduce the
number of vertices in an intelligent way in the DXF representation
format for polygons? The problem being that now that i can get hold of
3DS files convert them to DXF, resulting in amouts of data that are
too large to handle. I need to cut the number of vertices, but in an
intelligent way. What this effectively amounts to doing is a kind of
spatial filtering. You can use Mesh Decimate to reduce the number of
vertices, but when i tried it for an aircraft it took an important
artifact away - the wings. Is there some way of reducing the no of
vertices, but for example leave the lowest spatial frequencies, ie the
bigger and more important entities.
Many thanks,
Neil
"Rick Towler" <rtowler@u.washington.edu> wrote in message news:<br2jbu$lak$1@nntp6.u.washington.edu>...
> I am assuming you found openFX. It is not part of IDL but an open source 3d
> modeling package. Sorry I didn't make that clear in my original post.
>
> As for the vertex and connectivity data, type 9 will do. I don't know
> exactly what all of the types are and what they would map to in IDL but we
> can make a guess. Types 4-8 would be polylines and 9-11 would be polygons.
> I would also guess that the block and layer types are for grouping
> primitives. I'm sure a quick search on the web would clear this up, if you
> care as much.
>
> I just answered this same question a few weeks back. Google the newsgroup
> for it. The short version (for types 4-8 and 9-11) is:
>
> dxf_data = obj_new('IDLffDXF', filename)
> types = dxf_data -> getcontents()
> entities = dxf_data -> getentity(types[i])
> data=*(entities.vertices)[j]
> polylines=*(entities.connectivity)[j]
>
> I also have an object that does the work for you. Let me know if you are
> interested.
>
> Also, google for "3dsrdr.c". This is another way to get at the vertex and
> connectivity data for .3ds files.
>
>
> -Rick
>
>
>
>
> "Neil" wrote in message...
>> Does anyone know how i can access polygon connectivity and verticies
>> from a general DXF file? I use OpenFX to convert a 3DS file to a DXF
>> file. However, when i read the resulting DXF file using IDL, there is
>> no DXF Entity type 10 (the 3D face), so i am having difficulty getting
>> verticies and connectivity. Typical returned Entity Type Nos. are 9,18
>> and 20, so how can i get connectivity and verticies from theses?
>>
>> Many thanks,
>> Neil
>>
>>
>> (Neil) wrote in message...
>>> that sounds pretty good, i can get a few more shapes into the model.
>>> However, i dont see an openFX routine in my current version of IDL. Is
>>> this some kind of special or new routine, or can i use IDL to make
>>> this.
>>> many thanks,
>>> Neil
>>>
>>> "Rick Towler" wrote in message...
>>>> "Neil" wrote in message...
>>>> > Does anyone know the best place to find DXF models of various
>>>> > geometrical shapes of all kinds? I know the 3DCafe has some free
>>>> > models, but does anyone know where i can find a greater range?
>>>>
>>>> FWIW, I have been casually looking for a good repository of free 3d
> models
>>>> on and off for a while and I haven't found any really good sites.
> There is
>>>> 3dCafe, and 3dKingdom, and a bunch of sites that post a few models
> here and
>>>> there. I usually google then sift thru the results.
>>>>
>>>> You can expand your search to include .3ds models and then use
> something
>>>> like openFX to convert them to .dxf. This will open up the world a
> wee bit
>>>> more.
>>>>
>>>> -Rick
|
|
|