mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
set default position on creating window and door
to avoid validation errors like IfcProduct.PlacementForShapeRepresentation
This commit is contained in:
@@ -487,6 +487,7 @@ class BIM_OT_add_door(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
element = blenderbim.core.root.assign_class(
|
element = blenderbim.core.root.assign_class(
|
||||||
tool.Ifc, tool.Collector, tool.Root, obj=obj, ifc_class="IfcDoor", should_add_representation=False
|
tool.Ifc, tool.Collector, tool.Root, obj=obj, ifc_class="IfcDoor", should_add_representation=False
|
||||||
)
|
)
|
||||||
|
blenderbim.core.geometry.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
|
||||||
if tool.Ifc.get_schema() != "IFC2X3":
|
if tool.Ifc.get_schema() != "IFC2X3":
|
||||||
element.PredefinedType = "DOOR"
|
element.PredefinedType = "DOOR"
|
||||||
|
|
||||||
|
|||||||
@@ -456,6 +456,7 @@ class BIM_OT_add_window(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
element = blenderbim.core.root.assign_class(
|
element = blenderbim.core.root.assign_class(
|
||||||
tool.Ifc, tool.Collector, tool.Root, obj=obj, ifc_class="IfcWindow", should_add_representation=False
|
tool.Ifc, tool.Collector, tool.Root, obj=obj, ifc_class="IfcWindow", should_add_representation=False
|
||||||
)
|
)
|
||||||
|
blenderbim.core.geometry.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
|
||||||
if tool.Ifc.get_schema() != "IFC2X3":
|
if tool.Ifc.get_schema() != "IFC2X3":
|
||||||
element.PredefinedType = "WINDOW"
|
element.PredefinedType = "WINDOW"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user