7

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.

amit
  • 363
  • 2
  • 10
  • 24

1 Answers1

6

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).

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
  • 1
    Thank you for you suggestion. I need 3D model data containing all the vertices and other information to separately render the 3D model in my rendering application.Is it possible to download that JSON stream? – amit Jun 15 '15 at 14:47
  • after you upload the CAD file and translate (using REST APIs), you can use the JavaScript to download the JSON stream. I'm not sure if there is a public sample, but I know some developers are doing it... – Augusto Goncalves Jun 15 '15 at 21:41
  • Ok, I will try downloading JSON stream using JavaScript. Thanks. – amit Jun 16 '15 at 06:14
  • I found this demo on the internet: http://extract.autodesk.io/ that serves my purpose. I want to use it for my website. Are there any charges for it's commercial usage? – amit Jun 17 '15 at 10:25
  • will have a cost, but so far is not decided yet. If you have a commercial app already, Autodesk team can help on biz side, send your contact to my email (check my first . last name @ autodesk.com) – Augusto Goncalves Jun 17 '15 at 13:59
  • Ok, I will let you know. Thanks. – amit Jun 18 '15 at 08:13
  • @amit did you find a way to convert dwg to json via REST? I looked around a bit and did not find any urls that would enable it. Also nothing from google... – Noripsni Nov 21 '15 at 19:11
  • Does anyone have an example how to do it? We also want to convert dwg-files to JSON but no clear answer can be found on the net – Rein Van Leirsberghe Dec 14 '15 at 10:41
  • @ReinVanLeirsberghe please check the sample live at http://extract.autodesk.io/ (or code at https://github.com/cyrillef/workflow-node.js-server-view.and.data.api ) – Augusto Goncalves Dec 14 '15 at 15:33
  • Murray, take a look at https://forge.autodesk.com/blog/forge-svf-extractor-nodejs – Augusto Goncalves Jul 11 '17 at 17:01
  • Oh, of course Autodesk have a converter, but they will never share it in form of application. Only allow to use their service. Autodesk is such Autodesk... – Feofilakt Feb 21 '19 at 04:07