Hello,
currently I am using ifcopenshell 0.6.0.a0 for OSx64 in the Anaconda Distribution to analyze the geometric representation of elements. I am programming a tool for my master thesis which should run on a windows server with python 3.6. Therefore I created a new environment (python3.6) on my Mac with anaconda over a VM (parallel desktop) using windowsx64 and installed ifcopenshell 0.6.0.a0 for Windowsx64 and pythonOCC-core 0.17.3 over anaconda cloud. Now I have a problem with the create_shape function.
import ifcopenshell
import ifcopenshell.geom
pack_ifc_file = ifcopenshell.open('AC20-Institute-Var-2.ifc')
products = pack_ifc_file.by_type("IfcProduct")
settings = ifcopenshell.geom.settings()
#settings.set(settings.USE_PYTHON_OPENCASCADE, True)
for product in products:
if product.Representation is not None:
try:
shape = ifcopenshell.geom.create_shape(settings, inst=product).geometry
print('worked once')
except:
print('Error')
This prints out an error for every product: "RuntimeError: Failed to process shape"
Also, when I run the script a second time, the programm isn't able to open the given .ifc file and the Kernel dies in Spyder and has to restart.
The IFC-model is a popular model and can be downloaded at this link:
http://www.ifcwiki.org/index.php?title=KIT_IFC_Examples
Any ideas what I can change to make it work again? And do you need more information on my system to locate the error?
Thanks
Nico
Hello,
currently I am using ifcopenshell 0.6.0.a0 for OSx64 in the Anaconda Distribution to analyze the geometric representation of elements. I am programming a tool for my master thesis which should run on a windows server with python 3.6. Therefore I created a new environment (python3.6) on my Mac with anaconda over a VM (parallel desktop) using windowsx64 and installed ifcopenshell 0.6.0.a0 for Windowsx64 and pythonOCC-core 0.17.3 over anaconda cloud. Now I have a problem with the create_shape function.
import ifcopenshell
import ifcopenshell.geom
pack_ifc_file = ifcopenshell.open('AC20-Institute-Var-2.ifc')
products = pack_ifc_file.by_type("IfcProduct")
settings = ifcopenshell.geom.settings()
#settings.set(settings.USE_PYTHON_OPENCASCADE, True)
for product in products:
if product.Representation is not None:
try:
shape = ifcopenshell.geom.create_shape(settings, inst=product).geometry
print('worked once')
except:
print('Error')
This prints out an error for every product: "RuntimeError: Failed to process shape"
Also, when I run the script a second time, the programm isn't able to open the given .ifc file and the Kernel dies in Spyder and has to restart.
The IFC-model is a popular model and can be downloaded at this link:
http://www.ifcwiki.org/index.php?title=KIT_IFC_Examples
Any ideas what I can change to make it work again? And do you need more information on my system to locate the error?
Thanks
Nico