mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
You can now set facet tolerances (angular and deflection tolerance) when importing. See #766.
This commit is contained in:
@@ -251,6 +251,9 @@ class IfcImporter():
|
||||
self.diff = None
|
||||
self.file = None
|
||||
self.settings = ifcopenshell.geom.settings()
|
||||
self.settings.set_deflection_tolerance(self.ifc_import_settings.deflection_tolerance)
|
||||
# Uncomment this when the latest IfcOpenBot build is ready
|
||||
# self.settings.set_angular_tolerance(self.ifc_import_settings.angular_tolerance)
|
||||
if self.ifc_import_settings.should_import_curves:
|
||||
self.settings.set(self.settings.INCLUDE_CURVES, True)
|
||||
self.settings_native = ifcopenshell.geom.settings()
|
||||
@@ -2066,4 +2069,6 @@ class IfcImportSettings:
|
||||
settings.should_merge_by_material = scene_bim.import_should_merge_by_material
|
||||
settings.should_merge_materials_by_colour = scene_bim.import_should_merge_materials_by_colour
|
||||
settings.should_clean_mesh = scene_bim.import_should_clean_mesh
|
||||
settings.deflection_tolerance = scene_bim.import_deflection_tolerance
|
||||
settings.angular_tolerance = scene_bim.import_angular_tolerance
|
||||
return settings
|
||||
|
||||
@@ -1215,6 +1215,8 @@ class BIMProperties(PropertyGroup):
|
||||
import_should_merge_by_material: BoolProperty(name="Import and Merge by Material", default=False)
|
||||
import_should_merge_materials_by_colour: BoolProperty(name="Import and Merge Materials by Colour", default=False)
|
||||
import_should_clean_mesh: BoolProperty(name="Import and Clean Mesh", default=True)
|
||||
import_deflection_tolerance: FloatProperty(name="Import Deflection Tolerance", default=0.001)
|
||||
import_angular_tolerance: FloatProperty(name="Import Angular Tolerance", default=0.5)
|
||||
qa_reject_element_reason: StringProperty(name="Element Rejection Reason")
|
||||
person: EnumProperty(items=getPersons, name="Person")
|
||||
organisation: EnumProperty(items=getOrganisations, name="Organisation")
|
||||
|
||||
@@ -1700,6 +1700,10 @@ class BIM_PT_mvd(Panel):
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, 'import_should_import_with_profiling')
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, 'import_deflection_tolerance')
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, 'import_angular_tolerance')
|
||||
row = layout.row()
|
||||
row.prop(bim_properties, 'export_json_compact')
|
||||
|
||||
layout.label(text='Simplifications:')
|
||||
|
||||
Reference in New Issue
Block a user