<p>You could try to:</p>

<ol>
<li><p>Slice with slicer (Cura in my case) with support enabled.</p></li>
<li><p>Search for text: <em>TYPE:SUPPORT</em></p>

<p>G0 F1800 X237.873 Y184.24<br>
G0 X233.869 Y183.237<br>
;TYPE:SUPPORT<br>
G1 F1500 E562.81355<br>
G1 F900 X233.579 Y183.939 E562.91577<br>
G1 X233.368 Y184.67 E563.01816<br></p></li>
<li><p>If it exists, then try to call it again:</p></li>
<li>Use auto-orientation plugin to validate if there is a better (no support) model position.</li>
</ol>

<p>As an alternative, you could scan the mesh and looks for an angle greater than 45 or 50 degrees.</p>

CC BY-SA 4.0
2018-07-02T04:52:51.510Z
I wonder where you got the idea ;-) . This is how I would solve it too.
0scar
CC BY-SA 4.0
2018-07-02T14:24:54.350Z
It's easier than that:  load the STL into Cura and , in SolidView, regions requiring support will be colored red.
Carl Witthoft
CC BY-SA 4.0
2018-07-02T14:26:20.423Z
as long as scrip can handle that manual operation it is a good solution :) @CarlWitthoft
profesor79
CC BY-SA 4.0
2018-07-01T23:07:32.777Z
2018-07-02T04:25:11.853Z
2018-07-02T04:25:11.853Z
profesor79
<p>How can I detect if a generated STL model will need to be printed with supports?</p>

<p>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.</p>

CC BY-SA 4.0
2018-07-01T08:52:50.190Z
How do you define "needs support"? Is just turning on supports in the slicer and letting it add supports where it thinks is necessary not good enough?
Tom van der Zanden
CC BY-SA 4.0
2018-07-01T11:59:24.793Z
You can always send the "use support" flag as the slicer will determine whether or not to use them.
0scar
CC BY-SA 4.0
2018-07-01T22:20:25.417Z
Great suggestion to always turn on the "use support" flag.  I'll update the question to further explain my other use.
Mark Harrison
<support-structures><stl><algorithm>
How can I tell if an STL model will need supports?
Mark Harrison
# How can I tell if an STL model will need supports?

(Asked by: username_0 on 2018-07-01)

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.

**Tags:** support-structures, stl, algorithm

> **Comments:**
> **username_1**: How do you define "needs support"? Is just turning on supports in the slicer and letting it add supports where it thinks is necessary not good enough?  
> **username_2**: You can always send the "use support" flag as the slicer will determine whether or not to use them.  
> **username_0**: Great suggestion to always turn on the "use support" flag.  I'll update the question to further explain my other use.  

---

## 1 answers

### Answer by username_3 on 2018-07-01. Score: 3 | Accepted answer

You could try to:

1. Slice with slicer (Cura in my case) with support enabled.
2. Search for text: *TYPE:SUPPORT*

   G0 F1800 X237.873 Y184.24  
   G0 X233.869 Y183.237  
   ;TYPE:SUPPORT  
   G1 F1500 E562.81355  
   G1 F900 X233.579 Y183.939 E562.91577  
   G1 X233.368 Y184.67 E563.01816
3. If it exists, then try to call it again:
4. 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.

> **Comments:**
> **username_2**: I wonder where you got the idea ;-) . This is how I would solve it too.  
> **username_4**: It's easier than that:  load the STL into Cura and , in SolidView, regions requiring support will be colored red.  
> **username_3**: as long as scrip can handle that manual operation it is a good solution :) @username_4  

---

