0

I need to develop a web-app which contains parametric CAD drawings. The user should be able to change the dimensions of the object that is then updated in the drawing. The app should then calculate the volume of the updated object for other calculations, basically to calculate the mass given a density value.

A promising option for the web-app would be Streamlit and I built my objects using FreeCAD. It should be possible to embed FreeCAD in a stand-alone python app, but apparently it is not possible to have it in a web-app.

Do you know any python module I could use to have this interaction between the user, the object and the remaining part of the algorithm?

Bart
  • 1
  • I think the process is like this: 1. Get parameter values for your model using streamlit. 2. Build your freecad model using the parameter values. 3. Create png image files from your model. 4. Show in streamlit the png image files. I am trying to learn freecad, so I don't know if steps 2 and 3 can be done programmatically. – ferdy Mar 10 '22 at 16:40
  • It is not completely defined how the tool will look like. Showing a png image could be an option, even if giving the possibility to the users to rotate the object would be better. For the parametric design in FreeCAD I use a spreadsheet: you can set names to the cells (aliases) and call them from the CAD drawing instead of fixed dimensions. – Bart Mar 11 '22 at 07:17
  • Create a number widget for the parameters, and create a backup of the original spreadsheet. Modify the spreadsheet based on the value of the parameters. Create another widget for rotation value, 90 45 etc. User will select 90 for example. Update spreadsheet for the rotation value. Now create the CAD (how is I don't know). Create an image file and show the image file using streamlit. When user likes a different rotation value or other changes, modify the spreadsheet and rebuild the CAD generate image and show using streamlit. – ferdy Mar 11 '22 at 12:27

0 Answers0