Page 1 of 1

Load VRML files

Posted: 29 Aug 2016, 11:35
by lorenzo.sampietro
Good morning,

I'm trying to use your CAD3D example with different 3D file formats (your supported file formats).
My goal is to manage a 3D file faster then add some elements runtime.

In attachment you can find a "BB Cube" with different file formats.

Question: where is the VRML class in your class structure? and OBJ class?

Could you write me a little example?
thank you
Lorenzo

Re: Load VRML files

Posted: 29 Aug 2016, 19:27
by support
Hello Lorenzo,

Support of VRML (.wrl) and Wavefront OBJ (.obj) files is implemented by using GLScene classes: TGLVRMLVectorFile and TGLOBJVectorFile, respectively. To load a VRML and OBJ files into 3DDrawingNavigator, please do the following:

1) Add GLFileVRML and GLFileOBJ units to the uses clause:

Code: Select all

interface

uses

...
GLFileVRML,
GLFileOBJ;
2) Call a Tsg3DDrawingNavigator.LoadFromFile method.


Mikhail