donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.06k stars 530 forks source link

parametric implementation #359

Closed libera-git closed 5 months ago

libera-git commented 6 months ago

Don, I tried out your gltf Viewer. Works great thanks! I was wondering if you had any insights into making the client side viewer app responsive to parametric inputs. I am looking for a viewer app or repo that will allow me to present parametric models generated in Autodesk Inventor to visitors of my website. Ideally this all happens on the client side so that the user gets the fastest experience manipulating 3-d model though web app user selected parameter values (model dimensions for example). The web app should read parameters and auto-populate the web app parameter menu/sliders. I have experimented with doing this with using the Autodesk APS platform but it is depressingly slow and expensive. In the end I want to sell a pdf set of drawings to the visitor which will require one visit to the APS API to generate the drawing pdf's using the selected parametric set the visitor decides upon. As an alternative i would consider using the sever backend to convert/generate the gltf file based on the visitor selected parameters and then upload the file to the client.

Joe (http://Jnd-woodcraft.com)

donmccurdy commented 6 months ago

Hi Joe —

I'm afraid this isn't a workflow I've seen done. The file formats I'm familiar with, like glTF, bake a model down to triangulated geometry. If parametric functions were used to generate the geometry, none of those functions or their inputs remain in the file.

Some open source web-friendly libraries for parametric design do exist — https://github.com/scad-js/scad-js would be one example. But I don't know what options might exist to bring content in from Autodesk Inventor. Perhaps identifying whether any format Autodesk Inventor can export still retains a parametric representation would be a first step.

To be clear, the pipeline you describe should be possible — see Arcol's work in https://blog.arcol.io/parametric-geometry-engine for example. It's just not an area where I'm aware of existing open source options.

Best, Don