mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix #1357. Remove temporary workaround for broadphase tree creation. Thanks aothms!
This commit is contained in:
@@ -3,9 +3,11 @@ PYVERSION:=py37
|
||||
|
||||
ifeq ($(PYVERSION), py37)
|
||||
PYLIBDIR:=python3.7
|
||||
PYNUMBER:=37
|
||||
endif
|
||||
ifeq ($(PYVERSION), py39)
|
||||
PYLIBDIR:=python3.9
|
||||
PYNUMBER:=39
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
@@ -67,12 +69,7 @@ endif
|
||||
cp -r blenderbim/* dist/blenderbim/
|
||||
|
||||
# Provides IfcOpenShell Python functionality
|
||||
ifeq ($(PYVERSION), py37)
|
||||
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcblender-python-37-v0.6.0-f14d349-$(PLATFORM)64.zip
|
||||
endif
|
||||
ifeq ($(PYVERSION), py39)
|
||||
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcblender-python-39-v0.6.0-f14d349-$(PLATFORM)64.zip
|
||||
endif
|
||||
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcblender-python-$(PYNUMBER)-v0.6.0-0087fa8-$(PLATFORM)64.zip
|
||||
cd dist/working && unzip ifcblender*
|
||||
cp -r dist/working/io_import_scene_ifc/ifcopenshell dist/blenderbim/libs/site/packages/
|
||||
|
||||
|
||||
@@ -31,23 +31,14 @@ class Collider:
|
||||
self.groups[name] = {"elements": {}, "objects": {}}
|
||||
|
||||
def create_objects(self, name, ifc_file, iterator, elements):
|
||||
self.tree.add_iterator(iterator)
|
||||
self.groups[name]["elements"].update({e.GlobalId: e for e in elements})
|
||||
|
||||
# Temporary hack. See #1357.
|
||||
import multiprocessing
|
||||
|
||||
iterator = ifcopenshell.geom.iterator(
|
||||
ifcopenshell.geom.settings(), ifc_file, multiprocessing.cpu_count(), include=elements
|
||||
)
|
||||
valid_file = iterator.initialize()
|
||||
if not valid_file:
|
||||
return False
|
||||
assert iterator.initialize()
|
||||
while True:
|
||||
self.tree.add_element(iterator.get_native())
|
||||
shape = iterator.get()
|
||||
self.create_object(name, shape.guid, shape)
|
||||
if not iterator.next():
|
||||
break
|
||||
self.groups[name]["elements"].update({e.GlobalId: e for e in elements})
|
||||
|
||||
def create_object(self, group_name, id, shape):
|
||||
obj = hppfcl.CollisionObject(
|
||||
|
||||
@@ -34,7 +34,7 @@ from . import collider
|
||||
class Clasher:
|
||||
def __init__(self, settings):
|
||||
self.settings = settings
|
||||
self.geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True)
|
||||
self.geom_settings = ifcopenshell.geom.settings()
|
||||
self.clash_sets = []
|
||||
self.collider = collider.Collider()
|
||||
self.selector = ifcopenshell.util.selector.Selector()
|
||||
|
||||
Reference in New Issue
Block a user