Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebGL dynamic model manipulation

My goal is to be able to create a 3D model in a Cad package (Ie. Solidworks) with parameters that are designed to be changed by the user. I want to be able to take that model and integrate it into a web browser, and then pass variables from some kind of UI into the model to change its parameters and hence its form.

As a simple example: a cylinder where the user can select how tall it is using a slider. (The cylinder would be derived from cad software, rather than webgl CylinderGeometry )

At this stage I know very little about Webgl, and how I to achieve this result so pointing me in the right direction would be a huge help.

like image 407
Brilliant Avatar asked Feb 02 '26 12:02

Brilliant


1 Answers

You can build an HTTP service ASP.NET Web API. The service would receive HTTP requests with 'parameters that are designed to be changed', process it correspondingly. Then it'd launch SolidWorks, load a model, change parameters and rebuild. After that you should decide a data format which would be sent to browser:

  • STL, OBJ - tessellation, colors, no texture info. Can be easily parsed by JavaScript
  • If you use SceneJS for WebGL you can generate proper JSON scene on the server side
like image 132
Andrey.Dankevich Avatar answered Feb 04 '26 07:02

Andrey.Dankevich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!