Re: DXF and other CAD file formats [message #28355 is a reply to message #28300] |
Mon, 03 December 2001 09:45   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
I have waited a few days for someone who knows what they are talking about
to sound off and that hasn't happened. Sorry Georg, I guess you'll have to
put up with my response...
Although I haven't tried writing DXF files, my guess is that your
connectivity array is wrong. I know that if I were trying to create an IDL
(opengl) polyline, my connectivity array would have more elements than that
(in your case it would be [4,0,1,2,3]). I didn't see any documentation
regarding this in the IDLffDXF docs but there was an example similar to
yours. Maybe you should start there?
-Rick
"Georg Wiora" <georg.wiora@DaimlerChrysler.com> wrote in message
news:1104_1007043323@rtulmrb142...
> Hi everybody,
>
> I have problems using the polyline feature in an IDLffDXF object. I
connect 4 points with a line, using the CONNECTIVITY array. When I add this
object, I allways get the following message:
> % IDLFFDXF::PUTENTITY: DXF error: DXF Polyline: explicit connectivity
ignored
> For a little test program see the code below.
>
> Does anyone know about this problem?
>
> Is there any other free code to create 3D-CAD-Files formats like STL or
IGES or whatever?
>
> Thanks for your help!
>
> Georg
>
>
> ---- Cut Here ------- Cut Here ------- Cut Here ------- Cut Here -------
Cut Here ------- Cut Here ------- Cut Here ------- Cut Here ---
> PRO Write_DXF_Lines
>
> dxf = OBJ_NEW('IDLffDXF')
>
> ; 4 points
> points = DBLARR(3,5)
> points(*,0) = [0,0,0]
> points(*,1) = [1,0,0]
> points(*,2) = [1,1,0]
> points(*,3) = [1,1,1]
> points(*,4) = [0,1,1]
> ; Connectivity
> connect = [0,1,2]
> ; Create pointers
> ppoints = PTR_NEW(points,/NO_COPY)
> pconnect = PTR_NEW(connect,/NO_COPY)
>
>
> ; Create a polyline object
> pline = {IDL_DXF_POLYLINE}
> pline.Vertices=ppoints
> pline.Connectivity=pconnect
> pline.Color=256
> pline.DXF_Type=7 ; 7=POLYLINE
> pline.BLOCK='' ; default block
> pline.Layer='0' ; default layer
>
> dxf->PutEntity, pline
>
> IF NOT dxf->Write('test.dxf') THEN $
> MESSAGE,'Write failed',/INFORMATIONAL
>
> ; Free pointers
> PTR_FREE,ppoints
> PTR_FREE,pconnect
> OBJ_DESTROY,dxf
>
> xdxf,'test.dxf'
> END
> ---- Cut Here ------- Cut Here ------- Cut Here ------- Cut Here -------
Cut Here ------- Cut Here ------- Cut Here ------- Cut Here ---
>
>
|
|
|