Skip to content

Commit a896c13

Browse files
hide objects
1 parent aa182df commit a896c13

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

commands/TNA_envelope.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ def RunCommand():
250250
if not thickness:
251251
return
252252

253+
rs.HideObject(guid)
254+
253255
envelope = MeshEnvelope.from_middle_mesh(mesh_middle, thickness)
254256

255257
# # =============================================================================
@@ -267,17 +269,21 @@ def RunCommand():
267269
# =============================================================================
268270

269271
elif option == "FromBounds":
272+
guids_bounds = []
273+
270274
guid = compas_rhino.objects.select_mesh("Select intrados")
271275
rs.UnselectAllObjects()
272276
if not guid:
273277
return
278+
guids_bounds.append(guid)
274279
obj = compas_rhino.objects.find_object(guid)
275280
mesh_intrados = compas_rhino.conversions.mesh_to_compas(obj.Geometry, cls=Mesh)
276281

277282
guid = compas_rhino.objects.select_mesh("Select extrados")
278283
rs.UnselectAllObjects()
279284
if not guid:
280285
return
286+
guids_bounds.append(guid)
281287
obj = compas_rhino.objects.find_object(guid)
282288
mesh_extrados = compas_rhino.conversions.mesh_to_compas(obj.Geometry, cls=Mesh)
283289

@@ -287,9 +293,12 @@ def RunCommand():
287293
mesh_middle = None
288294
pass
289295
else:
296+
guids_bounds.append(guid)
290297
obj = compas_rhino.objects.find_object(guid)
291298
mesh_middle = compas_rhino.conversions.mesh_to_compas(obj.Geometry, cls=Mesh)
292299

300+
rs.HideObjects(guids_bounds)
301+
293302
envelope = MeshEnvelope.from_meshes(mesh_intrados, mesh_extrados, mesh_middle)
294303

295304
# =============================================================================

0 commit comments

Comments
 (0)