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

Home » Public Forums » archive » Create DXF file out of vertices and connectivities
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Create DXF file out of vertices and connectivities [message #40000 is a reply to message #39913] Mon, 28 June 2004 10:04 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Tukee10" <turgutkaracay@hotmail.com> wrote in message
news:e6feeb9d9fa4d9dad40235e15f6ab40b@localhost.talkaboutpro gramming.com...
> Hello,
> I have following problem: I created the mesh structure of a volume with
> INTERVAL_VOLUME, which gives me vertices (3,n) and connectivities (1,m).
> When I display it with XOBJVIEW, I get a wonderful 3d structure. How do I
> create a DXF file that contains the mesh structure ?
> I know that it works with an IDLffDXF object. I tried that with following
> code:
>
> ptr_verts = ptr_new(Verts)
> ptr_conn = ptr_new(Conn)
>
> oDXF = OBJ_NEW('IDLffDXF')
> poly = {IDL_DXF_POLYGON}
> poly.vertices = ptr_verts
> poly.connectivity = ptr_conn
> poly.dxf_type = 10
>
> oDXF->PutEntity, poly
> IF (not oDXF->Write('Mesh_Model.dxf')) THEN PRINT, 'Write Failed.'
> OBJ_DESTROY, oDXF
>
> It creates a DXF file, but when I open the file with AutoCAD, it seems to
> connect all the point in a strange way.
> Is there anyone who has an idea ?

INTERVAL_VOLUME returns a list of vertices and a connectivity list that
represents tetrahedra (3D pyramid-like objects). If you used this vertex
list and this connectivity list to create an IDLgrPolygon that you then
displayed in XOBJVIEW, you should have seen quite a mess - or you got very
lucky.

You should use TETRA_SURFACE to create a polygonal surface from the tet mesh
that you can then display in XOBJVIEW and put into DXF.

So, if INTERVAL_VOLUME returns Verts and Conn, then

NewConn = TETRA_SURFACE(Verts, Conn)

XOBJVIEW, OBJ_NEW('IDLgrPolygon', Verts, POLYGONS=NewConn....

ptr_verts = ptr_new(Verts)
ptr_conn = ptr_new(NewConn)

oDXF = OBJ_NEW('IDLffDXF')
poly = {IDL_DXF_POLYGON}
poly.vertices = ptr_verts
poly.connectivity = ptr_conn
poly.dxf_type = 10

oDXF->PutEntity, poly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Arrays
Next Topic: inverse function of binary.pro

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

Current Time: Tue Dec 02 08:35:59 PST 2025

Total time taken to generate the page: 0.15550 seconds