Remove deprecated STRICT_TOLERANCE setting #4832

Mentioned in #4565, it's now "set" by default
This commit is contained in:
Andrej730
2024-06-08 00:33:17 +05:00
parent 2d7a7a8bc3
commit cd2e33721e
9 changed files with 3 additions and 16 deletions
-1
View File
@@ -100,7 +100,6 @@ class IfcStore:
ifc_hash = hashlib.md5(ifc_key.encode("utf-8")).hexdigest()
IfcStore.cache_path = os.path.join(bpy.context.scene.BIMProperties.data_dir, "cache", f"{ifc_hash}.h5")
cache_settings = ifcopenshell.geom.settings()
cache_settings.set(cache_settings.STRICT_TOLERANCE, True)
try:
IfcStore.cache = ifcopenshell.geom.serializers.hdf5(IfcStore.cache_path, cache_settings)
except:
@@ -400,7 +400,6 @@ class IfcImporter:
settings = ifcopenshell.geom.settings()
settings.set('mesher-linear-deflection', self.ifc_import_settings.deflection_tolerance)
settings.set('mesher-angular-deflection', self.ifc_import_settings.angular_tolerance)
# settings.set(settings.STRICT_TOLERANCE, True)
settings.set('dimensionality', ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
settings.set('context-ids', [context.id()])
self.context_settings.append(settings)
@@ -408,7 +407,6 @@ class IfcImporter:
settings = ifcopenshell.geom.settings()
settings.set('mesher-linear-deflection', self.ifc_import_settings.deflection_tolerance)
settings.set('mesher-angular-deflection', self.ifc_import_settings.angular_tolerance)
# settings.set(settings.STRICT_TOLERANCE, True)
settings.set('dimensionality', ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
settings.set('disable-opening-subtractions', True)
settings.set('context-ids', [context.id()])
@@ -692,7 +692,6 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
tree = ifcopenshell.geom.tree()
shapes = {}
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
settings.set(settings.DISABLE_OPENING_SUBTRACTIONS, True)
iterator = ifcopenshell.geom.iterator(settings, tool.Ifc.get(), multiprocessing.cpu_count(), include=include)
if iterator.initialize():
@@ -831,7 +830,6 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
# Create shape of opening as a dissolved BMesh
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
shape = ifcopenshell.geom.create_shape(settings, opening)
m = shape.transformation.matrix
mat = Matrix(
@@ -1033,7 +1031,6 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
settings = ifcopenshell.geom.settings()
if not element.is_a("IfcOpeningElement"):
settings.set(settings.DISABLE_OPENING_SUBTRACTIONS, True)
settings.set(settings.STRICT_TOLERANCE, True)
# geometry = ifcopenshell.geom.create_shape(settings, body)
shape = ifcopenshell.geom.create_shape(settings, element)
m = shape.transformation.matrix
@@ -476,7 +476,7 @@ class CreateDrawing(bpy.types.Operator):
if not context or not drawing_elements:
continue
geom_settings = ifcopenshell.geom.settings(
DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True, INCLUDE_CURVES=True
DISABLE_TRIANGULATION=True, INCLUDE_CURVES=True
)
if ifc.by_id(context[0]).ContextType == "Plan" and "PLAN_VIEW" in target_view:
offset = ifcopenshell.ifcopenshell_wrapper.float_array_3()
@@ -561,7 +561,7 @@ class CreateDrawing(bpy.types.Operator):
if tool.Ifc.get() == ifc and self.camera_element not in drawing_elements:
with profile("Camera element"):
# The camera must always be included, regardless of any include/exclude filters.
geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True)
geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True)
it = ifcopenshell.geom.iterator(geom_settings, ifc, include=[self.camera_element])
for elem in it:
self.serialiser.write(elem)
@@ -875,7 +875,7 @@ class CreateDrawing(bpy.types.Operator):
def setup_serialiser(self, target_view):
self.svg_settings = ifcopenshell.geom.settings(
DISABLE_TRIANGULATION=True, STRICT_TOLERANCE=True, INCLUDE_CURVES=True
DISABLE_TRIANGULATION=True, INCLUDE_CURVES=True
)
self.svg_buffer = ifcopenshell.geom.serializers.buffer()
self.serialiser = ifcopenshell.geom.serializers.svg(self.svg_buffer, self.svg_settings)
@@ -644,7 +644,6 @@ class Drawing(blenderbim.core.tool.Drawing):
@classmethod
def import_drawing(cls, drawing: ifcopenshell.entity_instance) -> bpy.types.Object:
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
camera_type = "ORTHO"
body = ifcopenshell.util.representation.get_representation(drawing, "Model", "Body", "MODEL_VIEW")
@@ -18,10 +18,8 @@ class BlenderImporter:
self.settings = ifcopenshell.geom.settings()
self.settings.set_deflection_tolerance(self.deflection_tolerance)
self.settings.set_angular_tolerance(self.angular_tolerance)
self.settings.set(self.settings.STRICT_TOLERANCE, True)
self.settings_2d = ifcopenshell.geom.settings()
self.settings_2d.set(self.settings_2d.INCLUDE_CURVES, True)
self.settings_2d.set(self.settings.STRICT_TOLERANCE, True)
self.process_element_filter()
self.process_context_filter()
@@ -116,7 +114,6 @@ class BlenderImporter:
def get_cache(self):
cache_settings = ifcopenshell.geom.settings()
cache_settings.set(cache_settings.STRICT_TOLERANCE, True)
try:
return ifcopenshell.geom.serializers.hdf5(self.cache_path, cache_settings)
except:
-1
View File
@@ -214,7 +214,6 @@ class IfcDiff:
def get_settings(self, ifc):
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
# Are you feeling lucky?
settings.set(settings.DISABLE_BOOLEAN_RESULT, True)
# Are you feeling very lucky?
-1
View File
@@ -180,7 +180,6 @@ class Patcher:
self.elements = self.file.by_type("IfcElement")
self.settings = ifcopenshell.geom.settings()
self.settings.set(self.settings.STRICT_TOLERANCE, True)
self.body_contexts = [
c.id()
@@ -71,7 +71,6 @@ class Patcher:
return
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
settings.set_context_ids([context.id()])
iterator = ifcopenshell.geom.iterator(settings, self.file, multiprocessing.cpu_count(), include=elements)
replacements = {}