mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +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(
|
||||
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":
|
||||
element.PredefinedType = "DOOR"
|
||||
|
||||
|
||||
@@ -456,6 +456,7 @@ class BIM_OT_add_window(bpy.types.Operator, tool.Ifc.Operator):
|
||||
element = blenderbim.core.root.assign_class(
|
||||
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":
|
||||
element.PredefinedType = "WINDOW"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user