How can I detect if a generated STL model will need to be printed with supports?
Context: I have a pipeline which parametrically generates OpenSCAD models, generates the STL, and sends them to the printer. I would like to (a) automatically detect the cases where supports are necessary so that I can specify the appropriate flags to the slicer, and (b) attempt to rotate the generated model so that supports won't be necessary.
You could try to:
Slice with slicer (Cura in my case) with support enabled.
Search for text: TYPE:SUPPORT
G0 F1800 X237.873 Y184.24
G0 X233.869 Y183.237
G1 F1500 E562.81355
G1 F900 X233.579 Y183.939 E562.91577
G1 X233.368 Y184.67 E563.01816
If it exists, then try to call it again:
- Use auto-orientation plugin to validate if there is a better (no support) model position.
As an alternative, you could scan the mesh and looks for an angle greater than 45 or 50 degrees.