mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
Enable curve imports by default, so rebar, profiles, are imported without user confusion. See #771 and #865.
This commit is contained in:
@@ -264,6 +264,7 @@ class IfcImporter():
|
|||||||
self.create_aggregates()
|
self.create_aggregates()
|
||||||
if self.ifc_import_settings.should_import_opening_elements:
|
if self.ifc_import_settings.should_import_opening_elements:
|
||||||
self.create_openings_collection()
|
self.create_openings_collection()
|
||||||
|
self.purge_non_body_representations()
|
||||||
self.parse_native_products()
|
self.parse_native_products()
|
||||||
self.filter_ifc()
|
self.filter_ifc()
|
||||||
self.patch_ifc()
|
self.patch_ifc()
|
||||||
@@ -324,6 +325,12 @@ class IfcImporter():
|
|||||||
or abs(point.Coordinates[1]) > 1000000 \
|
or abs(point.Coordinates[1]) > 1000000 \
|
||||||
or abs(point.Coordinates[2]) > 1000000
|
or abs(point.Coordinates[2]) > 1000000
|
||||||
|
|
||||||
|
def purge_non_body_representations(self):
|
||||||
|
# See https://github.com/IfcOpenShell/IfcOpenShell/issues/771
|
||||||
|
for element in self.file.by_type('IfcShapeRepresentation'):
|
||||||
|
if element.RepresentationIdentifier != 'Body':
|
||||||
|
self.file.remove(element)
|
||||||
|
|
||||||
def parse_native_products(self):
|
def parse_native_products(self):
|
||||||
# TODO: simple code for now as we only treat rebar specially
|
# TODO: simple code for now as we only treat rebar specially
|
||||||
for element in self.file.by_type('IfcReinforcingBar'):
|
for element in self.file.by_type('IfcReinforcingBar'):
|
||||||
|
|||||||
@@ -890,7 +890,7 @@ class BIMProperties(PropertyGroup):
|
|||||||
import_should_ignore_site_coordinates: BoolProperty(name="Import Ignoring Site Coordinates", default=False)
|
import_should_ignore_site_coordinates: BoolProperty(name="Import Ignoring Site Coordinates", default=False)
|
||||||
import_should_ignore_building_coordinates: BoolProperty(name="Import Ignoring Building Coordinates", default=False)
|
import_should_ignore_building_coordinates: BoolProperty(name="Import Ignoring Building Coordinates", default=False)
|
||||||
import_should_reset_absolute_coordinates: BoolProperty(name="Import Resetting Absolute Coordinates", default=False)
|
import_should_reset_absolute_coordinates: BoolProperty(name="Import Resetting Absolute Coordinates", default=False)
|
||||||
import_should_import_curves: BoolProperty(name="Import Curves", default=False)
|
import_should_import_curves: BoolProperty(name="Import Curves", default=True)
|
||||||
import_should_import_opening_elements: BoolProperty(name="Import Opening Elements", default=False)
|
import_should_import_opening_elements: BoolProperty(name="Import Opening Elements", default=False)
|
||||||
import_should_import_spaces: BoolProperty(name="Import Spaces", default=False)
|
import_should_import_spaces: BoolProperty(name="Import Spaces", default=False)
|
||||||
import_should_auto_set_workarounds: BoolProperty(name="Automatically Set Vendor Workarounds", default=True)
|
import_should_auto_set_workarounds: BoolProperty(name="Automatically Set Vendor Workarounds", default=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user