UnixNerd
UnixNerd

Reputation: 343

Java3D 3D CAD file import and display

My client has a 3D AutoCad DWG file of a structure that I'd like to import, display in Java3D and interact with as part of a larger program.

So I'm wondering what to convert the DWG to for easy import and whether Java code exists to display it.

I've got experience using Java3D to render models of the seabed but am not an expert. Currently my software imports 2D WMF files but the client wants 3D.

Thanks for your help :-)

Upvotes: 1

Views: 1828

Answers (2)

UnixNerd
UnixNerd

Reputation: 343

I solved my problem. I used ABViewer to convert the DWG file to an STL file. Then I used the org.j3d STLFileLoader to load it into my code. This post set me on the right track:

http://forum.jogamp.org/STLLoader-td4032481.html

STLFileLoader seems efficient, it loads a 22Mb model in under a second on my fairly slow PC.

Upvotes: 0

Augusto Goncalves
Augusto Goncalves

Reputation: 8574

The Forge Viewer can be embedded on a browser control on your app. It works for 2D and 3D.

Upvotes: 1

Related Questions