mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +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.diff = None
|
||||||
self.file = None
|
self.file = None
|
||||||
self.settings = ifcopenshell.geom.settings()
|
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:
|
if self.ifc_import_settings.should_import_curves:
|
||||||
self.settings.set(self.settings.INCLUDE_CURVES, True)
|
self.settings.set(self.settings.INCLUDE_CURVES, True)
|
||||||
self.settings_native = ifcopenshell.geom.settings()
|
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_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_merge_materials_by_colour = scene_bim.import_should_merge_materials_by_colour
|
||||||
settings.should_clean_mesh = scene_bim.import_should_clean_mesh
|
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
|
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_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_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_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")
|
qa_reject_element_reason: StringProperty(name="Element Rejection Reason")
|
||||||
person: EnumProperty(items=getPersons, name="Person")
|
person: EnumProperty(items=getPersons, name="Person")
|
||||||
organisation: EnumProperty(items=getOrganisations, name="Organisation")
|
organisation: EnumProperty(items=getOrganisations, name="Organisation")
|
||||||
|
|||||||
@@ -1700,6 +1700,10 @@ class BIM_PT_mvd(Panel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(bim_properties, 'import_should_import_with_profiling')
|
row.prop(bim_properties, 'import_should_import_with_profiling')
|
||||||
row = layout.row()
|
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')
|
row.prop(bim_properties, 'export_json_compact')
|
||||||
|
|
||||||
layout.label(text='Simplifications:')
|
layout.label(text='Simplifications:')
|
||||||
|
|||||||
Reference in New Issue
Block a user