mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix errors loading bounding box representations #4832
This commit is contained in:
@@ -171,6 +171,7 @@ class CreateAllShapes(bpy.types.Operator):
|
||||
|
||||
total = len(elements)
|
||||
settings = ifcopenshell.geom.settings()
|
||||
settings.set("keep-bounding-boxes", True)
|
||||
settings_2d = ifcopenshell.geom.settings()
|
||||
settings_2d.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
|
||||
failures = []
|
||||
@@ -224,6 +225,7 @@ class CreateShapeFromStepId(bpy.types.Operator):
|
||||
self.file = IfcStore.get_file()
|
||||
element = self.file.by_id(self.step_id or int(context.scene.BIMDebugProperties.step_id))
|
||||
settings = ifcopenshell.geom.settings()
|
||||
settings.set("keep-bounding-boxes", True)
|
||||
if self.should_include_curves:
|
||||
settings.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
|
||||
shape = ifcopenshell.geom.create_shape(settings, element)
|
||||
|
||||
@@ -1168,6 +1168,7 @@ def create_mesh_from_shape(
|
||||
) -> bpy.types.Mesh:
|
||||
if settings is None:
|
||||
settings = ifcopenshell.geom.settings()
|
||||
settings.set("keep-bounding-boxes", True)
|
||||
shape = ifcopenshell.geom.create_shape(settings, element)
|
||||
geometry = shape.geometry if element.is_a("IfcRoot") else shape
|
||||
faces = geometry.faces
|
||||
|
||||
@@ -552,6 +552,7 @@ class Geometry(blenderbim.core.tool.Geometry):
|
||||
settings = ifcopenshell.geom.settings()
|
||||
settings.set("weld-vertices", True)
|
||||
settings.set("apply-default-materials", False)
|
||||
settings.set("keep-bounding-boxes", True)
|
||||
context = representation.ContextOfItems
|
||||
|
||||
if element.is_a("IfcTypeProduct"):
|
||||
|
||||
@@ -556,6 +556,7 @@ class Loader(blenderbim.core.tool.Loader):
|
||||
settings.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
|
||||
settings.set("context-ids", [context.id()])
|
||||
settings.set("apply-default-materials", False)
|
||||
settings.set("keep-bounding-boxes", True)
|
||||
if is_gross:
|
||||
settings.set("disable-opening-subtractions", True)
|
||||
results.append(settings)
|
||||
|
||||
@@ -16,6 +16,7 @@ class BlenderImporter:
|
||||
self.created_guids = set()
|
||||
|
||||
self.settings = ifcopenshell.geom.settings()
|
||||
self.settings.set("keep-bounding-boxes", True)
|
||||
self.settings.set("mesher-linear-deflection", self.deflection_tolerance)
|
||||
self.settings.set("mesher-angular-deflection", self.angular_tolerance)
|
||||
self.settings_2d = ifcopenshell.geom.settings()
|
||||
|
||||
Reference in New Issue
Block a user