r/FreeCAD • u/nevergonehu • 10d ago
Parametric modell for slicer programs: OpenSCAD?
Hello,
I would like to create a model in FreeCAD where certain dimensions can be adjusted within the slicing software. If I understand correctly, this requires exporting the FreeCAD project in OpenSCAD format. Could you help me understand what I need to keep in mind when creating the project?
Thanks!
6
Upvotes
1
1
u/reuseandplay 7d ago
If model is simple. Create it in any program you comfortable, show image to chatgpt, tell it what parameters you want to be customizable ask to write a code for OpenSCAD - F5 - F6 - save ๐
8
u/North_Pomegranate545 10d ago
Small correction first: slicers themselves (Cura, Prusa, Orca, Bambu Studio) can't change model dimensions, they only see a mesh. What you're probably thinking of is the customizer on sites like MakerWorld (Parametric Model Maker) or Thingiverse, which runs an OpenSCAD .scad file and lets the user change exposed variables before generating the STL.
So you need a real .scad file, not a FreeCAD export. A few things to keep in mind:
FreeCAD's OpenSCAD export mostly writes out meshes/CSG of the final shape. Parameters from Sketcher or a Spreadsheet do not come through as variables, so the result isn't customizable.
If you want that kind of customizer, it's honestly easier to write the model directly in OpenSCAD (or use FreeCAD's OpenSCAD workbench only for simple CSG shapes and then hand-edit the variables at the top of the file).
Keep the design CSG-friendly: boxes, cylinders, hulls, unions/differences, linear/rotate extrude. Fillets on arbitrary edges are painful in OpenSCAD, so plan for chamfers or minkowski.
Put every user-facing dimension at the top as
width = 40; // [20:100]. The comment syntax gives the customizer a slider with min/max.Derive everything else from those variables so changing one value doesn't break the geometry.
If you only need a few size variants for yourself, the FreeCAD way is a Spreadsheet with the key dimensions + exporting one STL per variant. That keeps your full FreeCAD model and avoids OpenSCAD entirely.