mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 04:24:39 +00:00
When you force an object to be a tessellation, automatically remove all parametric constraints for you.
This commit is contained in:
@@ -269,6 +269,12 @@ class UpdateRepresentation(bpy.types.Operator, Operator):
|
|||||||
core.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
|
core.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
|
||||||
|
|
||||||
if material and material.is_a() in ["IfcMaterialProfileSet", "IfcMaterialLayerSet"]:
|
if material and material.is_a() in ["IfcMaterialProfileSet", "IfcMaterialLayerSet"]:
|
||||||
|
if self.ifc_representation_class == "IfcTessellatedFaceSet":
|
||||||
|
# We are explicitly casting to a tessellation, so remove all parametric materials.
|
||||||
|
element_type = ifcopenshell.util.element.get_type(product)
|
||||||
|
ifcopenshell.api.run("material.unassign_material", tool.Ifc.get(), product=element_type)
|
||||||
|
ifcopenshell.api.run("material.unassign_material", tool.Ifc.get(), product=product)
|
||||||
|
else:
|
||||||
# These objects are parametrically based on an axis and should not be modified as a mesh
|
# These objects are parametrically based on an axis and should not be modified as a mesh
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user