mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Accommodate space boundaries with no connection geometry, fetch spatial structure for IFC2X3, and fix scale bug when editing boundary profiles.
This commit is contained in:
@@ -80,7 +80,7 @@ class BoundaryDecorator:
|
|||||||
|
|
||||||
for boundary in context.scene.BIMBoundaryProperties.boundaries:
|
for boundary in context.scene.BIMBoundaryProperties.boundaries:
|
||||||
obj = boundary.obj
|
obj = boundary.obj
|
||||||
if not obj:
|
if not obj or not obj.data: # A boundary may not have data if it has no connection geometry
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if obj.mode == "EDIT":
|
if obj.mode == "EDIT":
|
||||||
|
|||||||
@@ -70,7 +70,10 @@ class AuthoringData:
|
|||||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||||
names = [d.name() for d in declarations]
|
names = [d.name() for d in declarations]
|
||||||
|
|
||||||
declaration = tool.Ifc.schema().declaration_by_name("IfcSpatialElementType")
|
if tool.Ifc.get_schema() == "IFC2X3":
|
||||||
|
declaration = tool.Ifc.schema().declaration_by_name("IfcSpatialStructureElementType")
|
||||||
|
else:
|
||||||
|
declaration = tool.Ifc.schema().declaration_by_name("IfcSpatialElementType")
|
||||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||||
names.extend([d.name() for d in declarations])
|
names.extend([d.name() for d in declarations])
|
||||||
|
|
||||||
|
|||||||
@@ -279,6 +279,10 @@ class Model(blenderbim.core.tool.Model):
|
|||||||
|
|
||||||
if surface.is_a("IfcCurveBoundedPlane"):
|
if surface.is_a("IfcCurveBoundedPlane"):
|
||||||
position = Matrix(ifcopenshell.util.placement.get_axis2placement(surface.BasisSurface.Position).tolist())
|
position = Matrix(ifcopenshell.util.placement.get_axis2placement(surface.BasisSurface.Position).tolist())
|
||||||
|
position[0][3] *= cls.unit_scale
|
||||||
|
position[1][3] *= cls.unit_scale
|
||||||
|
position[2][3] *= cls.unit_scale
|
||||||
|
|
||||||
cls.import_curve(obj, position, surface.OuterBoundary)
|
cls.import_curve(obj, position, surface.OuterBoundary)
|
||||||
for inner_boundary in surface.InnerBoundaries:
|
for inner_boundary in surface.InnerBoundaries:
|
||||||
cls.import_curve(obj, position, inner_boundary)
|
cls.import_curve(obj, position, inner_boundary)
|
||||||
|
|||||||
Reference in New Issue
Block a user