mani_gs wrote: ↑
Thu Apr 30, 2020 3:56 am
I am new to FreeCAD. I am developing a Web application for designing coil springs (Compression, tension, torsion). Like this one (this is in the early stage of development) https://mani-developer.github.io/springdesigner/
. Instead of having a static image of the spring, we would like to generate the drawing using FreeCAD based on the customer input parameters and display the same on the screen (either as image or pdf). Have any one tried anything similar to this ? Could you please guide me on how to proceed ?
I did a lot of similar stuff, run FreeCAD at backend and show recomputed model to user on web browser.
I suggest you to use https://hub.docker.com/r/amrit3701/freecad-cli
docker image for your web application. In this image, I compiled FreeCAD without GUI and it gives better performance.
You can use OBJ format as communication between FreeCAD and Web.
To render OBJ file on web browser you can use Three.js
. Here is the example of how to load OBJ file in three.js (https://threejs.org/docs/#examples/en/loaders/OBJLoader
How does the whole cycle work?
Get parameter from frontend -> Change parameter values in FreeCAD -> Recomputed model -> Export OBJ file -> Send OBJ file to frontend -> Three.js load OBJ file and render your model on web browser.