bernd wrote: ↑Wed Feb 20, 2019 9:29 am
two hints from my side ...
- make sure you gone use the same Python (Py2 or Py3) for FreeCAD and IfcOpenShell
- does work ifcopenshell without FreeCAD- there are some ifcfiles in ifcopenshell sources included?
start python or python3
Code: Select all
import ifcopenshell
f = ifcopenshell.open('ifcopenshellsources/test/input/acad2010_objects.ifc')
f.by_type('IfcPerson')
f.by_type('IfcWall')
Yes, ifcopenshell works both on python2 and python3
Code: Select all
$:~/Documents$ python
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ifcopenshell
>>> f = ifcopenshell.open('lamp.ifc')
>>> f.by_type('IfcPerson')
[#4=IfcPerson($,'Maros','János',$,$,$,$,$)]
>>> g = ifcopenshell.open('wall.ifc')
>>> g.by_type('IfcWall')
[#36=IfcWall('3Y30_eCwGHwPsPuDLUGSGJ',#5,'Wall','',$,#33,#35,$)]
>>>
$:~/Documents$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ifcopenshell
>>> f = ifcopenshell.open('lamp.ifc')
>>> f.by_type('IfcPerson')
[#4=IfcPerson($,'Maros','János',$,$,$,$,$)]
>>> g = ifcopenshell.open('wall.ifc')
>>> g.by_type('IfcWall')
[#36=IfcWall('3Y30_eCwGHwPsPuDLUGSGJ',#5,'Wall','',$,#33,#35,$)]
>>>
The lamp.ifc file is a lamp I downloaded from
https://www.bimobject.com
The wall.ifc file (attached) is just a wall I modeled in freecad.
Both the files are imported without problem on Blender with the ifcblender addon