Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM - Native IFC

Post by paullee »

Noted there are several issues in github and items in roadmap, maybe more peoples can help contributing if there is more information there? :)


Testing ifc_tools.create_document(doc), some errors returned, not sure if I am following correctly -

Code: Select all

>>> import ifc_tools
>>> doc=FreeCAD.ActiveDocument
>>> ifc_tools.create_document(doc)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-BlenderBIM/./ifc_tools.py", line 67, in create_document
    ifcfile = create_ifcfile()
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-BlenderBIM/./ifc_tools.py", line 94, in create_ifcfile
    comp = ifcfile.by_type("IfcCompany")[0]
  File "/home/paullee/.local/lib/python3.10/site-packages/ifcopenshell/file.py", line 363, in by_type
    return [entity_instance(e, self) for e in self.wrapped_data.by_type(type)]
  File "/home/paullee/.local/lib/python3.10/site-packages/ifcopenshell/ifcopenshell_wrapper.py", line 3472, in by_type
    return _ifcopenshell_wrapper.file_by_type(self, *args)
RuntimeError: Entity with name 'IfcCompany' not found in schema 'IFC4'
Screenshot from 2023-03-26 00-23-32.png
Screenshot from 2023-03-26 00-23-32.png (245.41 KiB) Viewed 2802 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM - Native IFC

Post by paullee »

When recomputing the IfcObject -

Code: Select all

00:51:48  Traceback (most recent call last):
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-BlenderBIM/./ifc_viewproviders.py", line 187, in setupContextMenu
    super().setupContextMenu(vobj, menu)
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-BlenderBIM/./ifc_viewproviders.py", line 81, in setupContextMenu
    if vobj.Object.ShapeMode == "Shape":
<class 'AttributeError'>: 'FeaturePython' object has no attribute 'ShapeMode'
00:51:49  Traceback (most recent call last):
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-BlenderBIM/./ifc_objects.py", line 95, in execute
    self.rebuild_classlist(obj)
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-BlenderBIM/./ifc_objects.py", line 69, in rebuild_classlist
    obj.Type = ifc_tools.get_ifc_classes(obj, obj.IfcType)
<class 'AttributeError'>: 'FeaturePython' object has no attribute 'IfcType'
00:51:49  Recompute failed! Please check report view.
Screenshot from 2023-03-26 00-52-08.png
Screenshot from 2023-03-26 00-52-08.png (243.94 KiB) Viewed 2791 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM - Native IFC

Post by yorik »

Entity with name 'IfcCompany' not found in schema 'IFC4'
Oops.. I think it should be IfcOrganization instead. Will fix.

But @Moult actually suggested me to stay away from filling all this project info at IFC file creation, so with the next commit this should hopefully vanish :)
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM - Native IFC

Post by ebrahim raeyat »

@yorik Thanks you so much. I found this files and I think these are useful for test. some of those files are very heavy for import.

by U.S. ARMY Corps of Engineers, Engineering Research Developmental Center (ERDC), Construction Engineering Research Laboratory (CERL)

Common Building Information Model Files And Tools

Other examples
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM - Native IFC

Post by paullee »

Cross-posting, testing import an ifc file in OSArch discussion :-

https://community.osarch.org/discussion ... -17#latest

( BlenderBim Tutorial - Floorplan Update - in 20mins - BlenderBim 23.04.17 )
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC

Post by paullee »

@yorik

ifc model imported fine with legacy ifc import, but not Native-IFC :)


Screenshot from 2023-07-05 02-35-10.png
Screenshot from 2023-07-05 02-35-10.png (21.59 KiB) Viewed 2261 times
Screenshot from 2023-07-05 02-35-42.png
Screenshot from 2023-07-05 02-35-42.png (194.27 KiB) Viewed 2261 times
Screenshot from 2023-07-05 02-37-16.png
Screenshot from 2023-07-05 02-37-16.png (189.33 KiB) Viewed 2261 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC

Post by yorik »

Indeed furnishing elements are disabled by default currently... https://github.com/yorikvanhavre/FreeCA ... ls.py#L651
I'll work on that https://github.com/yorikvanhavre/FreeCA ... /issues/50
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC

Post by paullee »

@yorik Just updated Native-IFC, found some new features, thanks :)

Importing a simple IFC to test / learn how IFC works, found some error as screen capture shown -

Code: Select all

01:22:31  Traceback (most recent call last):
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-NativeIFC/./ifc_objects.py", line 129, in execute
    ifc_generator.generate_geometry(obj, cached=cached)
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-NativeIFC/./ifc_generator.py", line 65, in generate_geometry
    elements = get_decomposition(obj)
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-NativeIFC/./ifc_generator.py", line 316, in get_decomposition
    elements = get_decomposed_elements(element, obj)
  File "/home/paullee/.local/share/FreeCAD/Mod/FreeCAD-NativeIFC/./ifc_generator.py", line 347, in get_decomposed_elements
    for child in ifcopenshell.util.element.get_decomposition(
<class 'TypeError'>: get_decomposition() got an unexpected keyword argument 'is_recursive'
01:22:31  Recompute failed!
Test_ ArchWall_ To_ IFC_ 11_Simple_ArchSketch.FCStd
(15.55 KiB) Downloaded 27 times
Screenshot from 2023-10-24 01-23-35.png
Screenshot from 2023-10-24 01-23-35.png (352.03 KiB) Viewed 1815 times

Code: Select all

OS: Fedora Linux 38 (Workstation Edition) (GNOME/gnome-xorg)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33675 (Git)
Build type: Release
Branch: (HEAD detached at 0.21.0)
Hash: 41b058e2087de60dc8fef3d3e68c7d0129e13abf
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * BIM 2021.12.0
  * FreeCAD-NativeIFC 2022.10.20
  * Curves 0.6.13
  * Link to SketchArchPlus
User avatar
Moult
Posts: 321
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC

Post by Moult »

You have an outdated ifcopenshell. Try updating?
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC

Post by paullee »

Thanks @Moult , my IfcOpenShell comes with the FreeCad AppImage, will need to try latest 0.22_pre AppImage then :)
Post Reply