|
11 | 11 | from compas_masonry.session import MasonrySession as Session |
12 | 12 | from compas_rui import feedback |
13 | 13 | from compas_tna.diagrams import FormDiagram |
| 14 | +from compas_tna.envelope import MeshEnvelope |
14 | 15 | from compas_tno.analysis import Analysis |
15 | 16 |
|
16 | 17 |
|
@@ -61,6 +62,10 @@ def RunCommand(): |
61 | 62 | analysis = Analysis.create_minthrust_analysis(formdiagram, envelope) |
62 | 63 |
|
63 | 64 | elif objective == "MinimumThickness": |
| 65 | + if type(envelope) is MeshEnvelope: |
| 66 | + feedback.warn("Minimum thickness analysis is only available for parametric envelopes") |
| 67 | + return |
| 68 | + |
64 | 69 | analysis = Analysis.create_minthk_analysis(formdiagram, envelope) |
65 | 70 |
|
66 | 71 | elif objective == "MaximumThrust": |
@@ -167,6 +172,10 @@ def RunCommand(): |
167 | 172 | print("Optimal Horizontal Thrust Calculated: {0:.3f}".format(fopt)) |
168 | 173 | elif objective == "MinimumThickness": |
169 | 174 | print("Minimum Thickness Calculated: {0:.3f}".format(fopt)) |
| 175 | + # Update the envelope for smaller thickness check if it works |
| 176 | + if analysis.optimiser.exitflag == 0: |
| 177 | + envelope.thickness = fopt |
| 178 | + envelope.update_envelope() |
170 | 179 | elif objective == "SupportDisplacement": |
171 | 180 | print("Complementary Energy to Assigned Displacements: {0:.3f}".format(fopt)) |
172 | 181 | elif objective == "Bestfit": |
|
0 commit comments