Hello: I am writing a program that is made up of a collection of POV-Ray
macros. POV-Ray is available at povray.org. It is a ray-tracing program that
reads a scene description language (SDL) to create photo-realistic images.
At this time my program (for modeling building information) is so huge that
I am finding it difficult managing the macros and I am not even near
completion.
I am hoping to move this program but first I was considering creating a file
format for input and am wondering the best way to approach this.
Basically the user writes a text file using certain key words and numbers
and my proposed python program will read this file and call the classes that
will then work together to calculate the information that is needed to
create an accurate model. The result of this calculation will be an output
to another text file in the appropriate format such as POV-Ray SDL, OpenSCAD
script, etc. This file output can then be rendered by the corresponding
program to produce the actual 3D model. The macros I have now currently does
this but like I said it is getting tedious and most importantly the fun
factor is losing its strength for me.
I have been advised to check out python-ply but I was wondering if the
format is something I can do with ply or if I am better off using pure
python. Also considering that the text files the proposed program will be
parsing may get quite big, will there be any performance issues? The
following is a sample of what the text file that will be processed by this
proposed system will contain. I appreciate any pointers and suggestions.
Thank you very much.
------------possible user file content for parsing ------------
// In the following the python interface program reads
//+ the contents of the file "other.file" as if its content
//+ were located at this point.
include other.file
//In the following the python interface makes "snap_size" a
//+ global parameter
snap_size = 10
// In the following "buildingLevel" is a class that is
//+ called and passed the parameters in parenthesis.
buildingLevel("FirstLevel", 3000)
// In the following "snapOffset" is a class that is
//+ called and passed the parameters in parenthesis.
snapOffset("Closet-S1_r1", "Closet-S2_r3", <0,0,0>)
------------end of user file content
It should also be possible to include comments using double-slashes, etc.
Sincerely,
Kene
--
You received this message because you are subscribed to the Google Groups
"ply-hack" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.