I am working on loading some types of 3d models into my own webgl viewer.
I am using threejs.
For now, the problem is how to import dwg file into threejs.
I know AutoCAD provides API that converting dwg into json that can be imported in threejs but it doesn’t work here.
If it is impossible on client side, is there anyway to do this on server side?
Your topic is actually a duplicate of: Import .dwg in three.js
Importing a DWG
file directly into three.js
is not possible. You have to convert the file to a different 3D format. Eventually you want to load glTF
into your app. So consider to convert to OBJ
and then to glTF
.
Thanks, will choose that way.
The most viable option would be to import your DWG file to 3ds Max and then export to glTF with Verge3D.
After loading to obj, the line connection in CAD drawing is not consistent with the original drawing. What should be set in 3DMAX?