Load VRML files

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: support, SDS, admin

Post Reply
lorenzo.sampietro
Posts: 1
Joined: 28 Aug 2016, 17:15

Load VRML files

Post by lorenzo.sampietro » 29 Aug 2016, 11:35

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

support
Posts: 2930
Joined: 30 Mar 2005, 11:36
Contact:

Re: Load VRML files

Post by support » 29 Aug 2016, 19:27

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply