comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: DXF and Face3D
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: DXF and Face3D [message #49910] Wed, 30 August 2006 08:49 Go to next message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Wed, 30 Aug 2006 07:03:42 -0700, Thomas Launey wrote:

> Hello,
> I am trying to smooth all the mesh (Face3d) objects in a DXF file using
> the code below.
> It fails however when I try to put the modified vertices back into the
> DXF object with the message:
> IDL> test_IDLffDXF
> % Loaded DLM: DXF.
> % IDLFFDXF:UTENTITY: DXF error: FACE3D connectivity list must contain
> only 4-vertex polygons.
> % Execution halted at: TEST_IDLFFDXF 18 H:\test_idlffdxf.pro
>
> Pro test_IDLffDXF
> DXF_file=dialog_pickfile(filter="*.DXF", /must_exist)
> If N_elements(DXF_file) LT 1 then return
> oDXF = OBJ_NEW('IDLffDXF')
> status = oDXF->Read(DXF_file)
> DXFTypes = oDXF->GetContents()
> ;*** get all face3D entities
> DXFsurface = oDXF->GetEntity(DXFTypes[where(DXFTypes EQ 10)])
> vertices = DXFsurface.vertices
> connectivity = DXFsurface.connectivity
> N_object=n_elements(vertices)
> For i=0, N_object-1 do Begin
> vert=MESH_SMOOTH (*vertices[i], *connectivity[i])
> *((DXFsurface.vertices)[i])=vert
> EndFor
> oDXF->PutEntity,DXFsurface
> End
>
> It seems that all I am doing is to move around the vertices, without
> changing the number of faces. A post by K. Schultz from June 2004
> suggests to change the type to 9 (polygon) but also warn of potential
> problems with running vertices through the tessellator.
> Any help would be greatly appreciated :-)
> Thanks,
> Thomas

You should probably go ahead and use the type 9 entity. I fixed the
problem that you mentioned that I mentioned in IDL 6.2.

I think that the MESH_SMOOTH algorithm ends up treating your mesh as a
triangle mesh, and so outputs it as such.

If you supply a vertex list and a connectivity list to a type 9 DXF
entity, IDL will examine the connectivity list and NOT call the tessellator
if all polygons in the mesh are triangles (as of IDL 6.2).

Karl
Re: DXF and Face3D [message #50091 is a reply to message #49910] Wed, 30 August 2006 22:24 Go to previous message
Thomas Launey is currently offline  Thomas Launey
Messages: 25
Registered: September 1999
Junior Member
Dear Karl,
Thank you very much for the update on 6.2. Unfortunately I am still on
6.1, with no prospect of upgrade. Any suggestion for fixing the problem
on 6.1?
Thanks
Thomas

Karl Schultz wrote:
>
> You should probably go ahead and use the type 9 entity. I fixed the
> problem that you mentioned that I mentioned in IDL 6.2.
>
> I think that the MESH_SMOOTH algorithm ends up treating your mesh as a
> triangle mesh, and so outputs it as such.
>
> If you supply a vertex list and a connectivity list to a type 9 DXF
> entity, IDL will examine the connectivity list and NOT call the tessellator
> if all polygons in the mesh are triangles (as of IDL 6.2).
>
> Karl
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: rotation with "HIDE"
Next Topic: Weird Map Projection

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:49:21 PDT 2025

Total time taken to generate the page: 0.00470 seconds