mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +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)
|
ifeq ($(PYVERSION), py37)
|
||||||
PYLIBDIR:=python3.7
|
PYLIBDIR:=python3.7
|
||||||
|
PYNUMBER:=37
|
||||||
endif
|
endif
|
||||||
ifeq ($(PYVERSION), py39)
|
ifeq ($(PYVERSION), py39)
|
||||||
PYLIBDIR:=python3.9
|
PYLIBDIR:=python3.9
|
||||||
|
PYNUMBER:=39
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM), linux)
|
ifeq ($(PLATFORM), linux)
|
||||||
@@ -67,12 +69,7 @@ endif
|
|||||||
cp -r blenderbim/* dist/blenderbim/
|
cp -r blenderbim/* dist/blenderbim/
|
||||||
|
|
||||||
# Provides IfcOpenShell Python functionality
|
# Provides IfcOpenShell Python functionality
|
||||||
ifeq ($(PYVERSION), py37)
|
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcblender-python-$(PYNUMBER)-v0.6.0-0087fa8-$(PLATFORM)64.zip
|
||||||
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 && unzip ifcblender*
|
cd dist/working && unzip ifcblender*
|
||||||
cp -r dist/working/io_import_scene_ifc/ifcopenshell dist/blenderbim/libs/site/packages/
|
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": {}}
|
self.groups[name] = {"elements": {}, "objects": {}}
|
||||||
|
|
||||||
def create_objects(self, name, ifc_file, iterator, elements):
|
def create_objects(self, name, ifc_file, iterator, elements):
|
||||||
self.tree.add_iterator(iterator)
|
assert iterator.initialize()
|
||||||
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
|
|
||||||
while True:
|
while True:
|
||||||
|
self.tree.add_element(iterator.get_native())
|
||||||
shape = iterator.get()
|
shape = iterator.get()
|
||||||
self.create_object(name, shape.guid, shape)
|
self.create_object(name, shape.guid, shape)
|
||||||
if not iterator.next():
|
if not iterator.next():
|
||||||
break
|
break
|
||||||
|
self.groups[name]["elements"].update({e.GlobalId: e for e in elements})
|
||||||
|
|
||||||
def create_object(self, group_name, id, shape):
|
def create_object(self, group_name, id, shape):
|
||||||
obj = hppfcl.CollisionObject(
|
obj = hppfcl.CollisionObject(
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ from . import collider
|
|||||||
class Clasher:
|
class Clasher:
|
||||||
def __init__(self, settings):
|
def __init__(self, settings):
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
self.geom_settings = ifcopenshell.geom.settings(DISABLE_TRIANGULATION=True)
|
self.geom_settings = ifcopenshell.geom.settings()
|
||||||
self.clash_sets = []
|
self.clash_sets = []
|
||||||
self.collider = collider.Collider()
|
self.collider = collider.Collider()
|
||||||
self.selector = ifcopenshell.util.selector.Selector()
|
self.selector = ifcopenshell.util.selector.Selector()
|
||||||
|
|||||||
Reference in New Issue
Block a user