Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export SolidWorks/eDrawings file in WebGL?

With the launch of SolidWorks 2016, Dassault Systèmes has promoted a new web portal that enables the embedding of Edrawings models into web pages: 3dcontentcentral.com. Their web 3D viewer uses WebGL to show model inside a browser window (here you can find a live example). Moreover, there is the possibility to embed an iframe with the viewer to embed it onto another web page, like the following:

<iframe scrolling='no' frameborder='0' allowfullscreen='true'
src='http://www.3dcontentcentral.com/external-site-embed.aspx?format=3D&catalogid=364&modelid=1254&width=250&height=250&edraw=true'
name='PreviewFrame3D' id='PreviewFrame3D' width='400' height='355'>
</iframe>
<br/>
<a href='http://www.3dcontentcentral.com/download-model.aspx?catalogid=364&id=1217'>
Download</a>

The final result is something like the following:

enter image description here

Full screen example

So, is there any chance to export a 3D model (part) in the same way and embed as a WebGL without uploading into 3D Content Central website? I have also access to the Edrawings/SolidWorks SDK (2015), if it could be helpful in any way.

like image 616
sentenza Avatar asked Nov 25 '15 09:11

sentenza


People also ask

Can you export from eDrawings?

You can set the export options when you export SOLIDWORKS documents as eDrawings files. As a best practice, distribute drawings and assemblies files in eDrawings format, which always requires updates when referenced parts are modified.

How do I convert a Solidworks File to HTML?

In the dialog box, in Save as type, select eDrawings Web HTML Files (*. html). Search 'Save As Web HTML' in the SOLIDWORKS Knowledge Base.

How do you save Solidworks as Edrawing?

In a SOLIDWORKS document, click Save As (Standard toolbar) or File > Save As. In the Save As dialog box, in Save as type, select the corresponding eDrawings file type: Part document (*.


1 Answers

How to convert a SolidWorks file into a WebGL JSON file

The best solution I came across is simply to use SolidWorks Visualize (formerly Bunkspeed) to export the geometry and the materials using a combination of OBJ and MTL files.

Then, you'll be able to import it into a WebGL scene using the Three.js/OBJLoader. A big problem that can arise is the dimension and the memory required to load the exported file. To solve this latency/memory problem you can then convert the exported OBJ files into Three.js JSON format using the three-obj and minifying them using the minify() method. After that you'll have to load the minified files using the Three.js/BinaryLoader.

Hope this can help someone else.

like image 62
sentenza Avatar answered Sep 27 '22 18:09

sentenza