POV-Ray : Newsgroups : povray.general : DXF file parsing in POV? Server Time
10 Aug 2024 03:24:24 EDT (-0400)
  DXF file parsing in POV? (Message 1 to 9 of 9)  
From: David Curtis
Subject: DXF file parsing in POV?
Date: 21 Mar 2000 12:52:05
Message: <38d7b6c5$1@news.povray.org>
Hi. I'm wondering if this is possible.I've spent a some time trying with no 
success. I'm trying to extract the position of POINT objects from the DXF.
The file will look like this (note: comments were added for clarity, they 
are not in actual DXF file):

  0
SECTION
  2
ENTITIES
  0
POINT           // start of point object
  8
DEFAULT
  5
1E
 10
9.99498             // x coord
 20
9.993288             // y coord
 30
0.045681             // z coord
  0
POINT
  8
DEFAULT
  5
1F
 10
9.983854
 20
etc, etc.

TIA for any help or other feedback.

Dave.
mic### [at] sympaticoca


Post a reply to this message

From: Ken
Subject: Re: DXF file parsing in POV?
Date: 21 Mar 2000 13:27:13
Message: <38D7BF68.A977525@pacbell.net>
David Curtis wrote:
> 
> Hi. I'm wondering if this is possible.I've spent a some time trying with no
> success. I'm trying to extract the position of POINT objects from the DXF.
> The file will look like this (note: comments were added for clarity, they
> are not in actual DXF file):

POV-Ray has no internal support for .dxf files but many conversion programs
exist that will convert from dxf2pov. 3DWin and Crossroads for example -

http://www.povray.org/links/3D_Programs/Conversion_Utilities/

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: David Curtis
Subject: Re: DXF file parsing in POV?
Date: 21 Mar 2000 14:39:11
Message: <38d7cfdf$1@news.povray.org>
In article <38D### [at] pacbellnet>, lin### [at] povrayorg wrote:
>
>
>David Curtis wrote:
>> 
>> Hi. I'm wondering if this is possible.I've spent a some time trying with no
>> success. I'm trying to extract the position of POINT objects from the DXF.
>> The file will look like this (note: comments were added for clarity, they
>> are not in actual DXF file):
>
>POV-Ray has no internal support for .dxf files but many conversion programs
>exist that will convert from dxf2pov. 3DWin and Crossroads for example -
>
>http://www.povray.org/links/3D_Programs/Conversion_Utilities/
>
Sorry, I wasn't clear enough in my original post. Using the file i/o 
commands(fopen, read, etc) I want to read in the float values for a POINT 
objects position and apply it to a POV objects translation.

Thanks, Dave.


Post a reply to this message

From: Peter Popov
Subject: Re: DXF file parsing in POV?
Date: 21 Mar 2000 19:00:55
Message: <sAzYOMfLHCuOXhzliiH8kG4jyUQ9@4ax.com>
On Tue, 21 Mar 2000 17:54:54 GMT, spa### [at] junkmailcom (David Curtis)
wrote:

>Hi. I'm wondering if this is possible.I've spent a some time trying with no 
>success. I'm trying to extract the position of POINT objects from the DXF.

<snip>

>TIA for any help or other feedback.

The file i/o function require that values are separated by commas
(whitespace doesn't count) and strings are enclosed in double quotes.
If you convert your DXF file to obey these rules, you'll be able to
read it into POV.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: David Curtis
Subject: Re: DXF file parsing in POV?
Date: 21 Mar 2000 19:22:09
Message: <38d81231$1@news.povray.org>
In article <sAzYOMfLHCuOXhzliiH8kG4jyUQ9@4ax.com>, Peter Popov <pet### [at] usanet>
wrote:
>
>If you convert your DXF file to obey these rules, you'll be able to
>read it into POV.
>
>
Thanks for your help. If I have to write a converter I'll just extract the 
coordinates at that point and write them to a suitable file.

Dave.
mic### [at] sympaticoca


Post a reply to this message

From: Nieminen Juha
Subject: Re: DXF file parsing in POV?
Date: 22 Mar 2000 04:08:02
Message: <38d88d72@news.povray.org>
If you are using a UNIX (this includes Linux), it's rather easy to add the
commas and the quotes with the proper sed-command.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: cadman
Subject: Re: DXF file parsing in POV?
Date: 22 Mar 2000 21:15:21
Message: <38d97e39@news.povray.org>
Just out of curiosity, what are you reading them in for?

David Curtis <spa### [at] junkmailcom> wrote in message
news:38d7b6c5$1@news.povray.org...
> Hi. I'm wondering if this is possible.I've spent a some time trying with
no
> success. I'm trying to extract the position of POINT objects from the DXF.
> The file will look like this (note: comments were added for clarity, they
> are not in actual DXF file):
>
>   0
> SECTION
>   2
> ENTITIES
>   0
> POINT           // start of point object
>   8
> DEFAULT
>   5
> 1E
>  10
> 9.99498             // x coord
>  20
> 9.993288             // y coord
>  30
> 0.045681             // z coord
>   0
> POINT
>   8
> DEFAULT
>   5
> 1F
>  10
> 9.983854
>  20
> etc, etc.
>
> TIA for any help or other feedback.
>
> Dave.
> mic### [at] sympaticoca


Post a reply to this message

From: Nigel Stewart
Subject: Re: DXF file parsing in POV?
Date: 22 Mar 2000 21:46:30
Message: <38D9852A.7C1AC983@nigels.com>
> Thanks for your help. If I have to write a converter I'll just extract the
> coordinates at that point and write them to a suitable file.

	Kindof defeats the original aim of "DXF file parsing"
	if you have to massage the data....

--
Nigel Stewart (nig### [at] nigelscom)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.


Post a reply to this message

From: David Curtis
Subject: Re: DXF file parsing in POV?
Date: 23 Mar 2000 05:18:39
Message: <38d9ef7f@news.povray.org>
In article <38d97e39@news.povray.org>, "cadman" <NOS### [at] graffitinet> wrote:
>Just out of curiosity, what are you reading them in for?

I wanted to get a curve from Rhino into POV that I could put objects along. 
I had ditched the idea of parsing in POV and wrote a C program to convert the 
DXF to a comma delimited file with the coordinates.

Dave.
mic### [at] sympaticoca


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.