Thread: Saving as a WRL
View Single Post
  #2  
Old 05-12-2008, 04:42 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
WRL files are simple text files, so you can manually generate the file. Here is an example WRL file that creates a cylinder:
Code:
Transform {
	translation 0 0.25 0
	rotation 0 1 0 0
	scale 1 1 1
	children [
		Shape {
			geometry Cylinder { radius 0.05 height 0.5 }
		}
	]
}
You can use Python file routines to open a file, write the contents of the wrl, and close it.
Reply With Quote