Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert autodesk .dwg and .dwf files to three.js json format

I want to render 3D graphics files of autodesk (.dwg and .dwf) using three.js but three.js requires 3D data to be in json format. So, I need to convert these files to three.js readable json format. I tried searching on the internet but couldn't find any solution. Can anyone tell me a good converter for these files?

Thanks in advance.

like image 994
amit Avatar asked Jun 12 '15 06:06

amit


People also ask

How to convert a dwf file to an AutoCAD DWG file?

If you are looking for a way to convert a DWF or DWFx file to an AutoCAD DWG model, look at the suggestions of the online tool for CAD format conversions. For the conversion DWF --> DWG , this tool offers a combination of DWF import to Autodesk Navisworks, and using the FBX format to transfer the 3D data from Navisworks to AutoCAD.

Is there a way to convert a CAD file to JSON?

There is a server side REST API that allow you to upload a CAD file and convert to a JSON stream. You can hook to it and get the output. Or, even easier, just use the JavaScript client side API to embed the viewer on your website/app

What's the DWF/dwfx file?

DWF/DWFx files are a "digital plot" file containing only low-intelligence entities. It is not intended for use as a drawing file exchange format and cannot be fully recovered or changed back to a standard drawing file. Create a new drawing in AutoCAD. Use the DWFATTACH command and attach the DWF/DWFx file.

How to import 3D models from Navisworks to AutoCAD?

For the conversion DWF --> DWG , this tool offers a combination of DWF import to Autodesk Navisworks, and using the FBX format to transfer the 3D data from Navisworks to AutoCAD. You can use a similar way to take the CAD model also to other CAD software.


1 Answers

In fact Autodesk already have a converter & wegbl viewer. Go to http://developer.autodesk.com and get a key for View & Data API. There is a server side REST API that allow you to upload a CAD file and convert to a JSON stream. You can hook to it and get the output. Or, even easier, just use the JavaScript client side API to embed the viewer on your website/app

Update

The API was renamed to Model Derivative + Viewer, the first translates the source file (e.g. DWG, RVT and many others) to a web-friendly format that can be viewed on the second, which is based on Three.js (and can be customized).

like image 73
Augusto Goncalves Avatar answered Oct 18 '22 19:10

Augusto Goncalves