Integration of BlenderBIM Features : FreeCAD Arch/BIM - Native IFC
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
I have long used AppImage on Fedora, with built-in IfcOpenShell
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
Trying to understand the code, ifc_tools.py get_children reads -
( https://github.com/yorikvanhavre/FreeCA ... #L110-L124 )
Googling BuildingSmart + IsDecomposedBy or ContainsElements seems return pages not directly relevant. Any hint ? Thanks.
( https://github.com/yorikvanhavre/FreeCA ... #L110-L124 )
Code: Select all
def get_children(obj, ifcfile):
"""Returns the direct descendants of an object"""
ifcentity = ifcfile[obj.StepId]
children = []
for rel in getattr(ifcentity, "IsDecomposedBy", []):
children.extend(rel.RelatedObjects)
for rel in getattr(ifcentity, "ContainsElements", []):
children.extend(rel.RelatedElements)
for rel in getattr(ifcentity, "HasOpenings", []):
children.extend([rel.RelatedOpeningElement])
for rel in getattr(ifcentity, "HasFillings", []):
children.extend([rel.RelatedBuildingElement])
return filter_elements(children)
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
Latest update, working expand children working
( some error in report )
Seems there is no hint which objects have children until user right click on every object, can have different object icon ? Thanks.
( some error in report )
Seems there is no hint which objects have children until user right click on every object, can have different object icon ? Thanks.
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
It's complicated because each IFC file is different schependomlaan is also my base example..
1) install ifcopenshell via pip OUTSIDE FreeCAD (in a terminal for ex) - I think you did this already
2) verify if ifcopenshell is available within FreeCAD ( in the python console of FreeCAD)
3) If not, verify what python paths are available to FreeCAD ()
4) Verify where ifcopenshell is installed ( from a terminal where you launch 'python')
5) Verify that the path given is in the sys.path informed in point 3). If not, we might need to adapt something in the snap packages I think...
No and I also found weird things in different files... But still not sure how best to deal with this and have a reliable method to get children. Also because the question "what is a child" is complicated within IFC
Indeed I'm not sure the addon manager can install stuff on a snap version of FreeCAD.. I'd suggest:
1) install ifcopenshell via pip OUTSIDE FreeCAD (in a terminal for ex) - I think you did this already
2) verify if ifcopenshell is available within FreeCAD (
Code: Select all
import FreeCAD
3) If not, verify what python paths are available to FreeCAD (
Code: Select all
import sys; print(sys.path)
4) Verify where ifcopenshell is installed (
Code: Select all
import ifcopenshell;print(ifcopenshell.__file__
5) Verify that the path given is in the sys.path informed in point 3). If not, we might need to adapt something in the snap packages I think...
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
ifcopenshell it's correctly installed in my system, that's for sure also because in the Daily (last update 1 month ago) version (in PPA repos) of FreeCAD that I still use, nativeifc it's working I can import ifc files without any problem. Here is the log from the shellragohix769 wrote: ↑Fri Dec 02, 2022 12:49 am In my system ifcopenshell is already installed:
[...]
5) Verify that the path given is in the sys.path informed in point 3). If not, we might need to adapt something in the snap packages I think...
Code: Select all
:~$ pip install ifcopenshell
Requirement already satisfied: ifcopenshell in ./.local/lib/python3.8/site-packages (0.7.0)
Code: Select all
IfcOpenShell was not found on this system. IFC support is disabled.
Visit https://wiki.freecadweb.org/IfcOpenShell to learn about installing it.
This is another (big) advantage of PPA packages, IMHO, pity that was abandoned.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
A minor observation:-
Just try to update the Add-on again, have noted that the reported date of current installation is not updated.
I have just updated, restarted, and noted the date of latest/current update is still outdated, a bit confused
Just try to update the Add-on again, have noted that the reported date of current installation is not updated.
I have just updated, restarted, and noted the date of latest/current update is still outdated, a bit confused
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
Unfortunately, importing / opening the IFC Schependomlaan.ifc crash FC, everytime when it seems import / opening reach almost 100%
Code: Select all
OS: Fedora Linux 36 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.30345 (Git)
Build type: Release
Branch: master
Hash: f42a47aa0fd8c4f34ef63c185d9f29b9b6e84737
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:
* dodo 1.0.0
* DynamicData 2.46.0
* ArchTextures
* BOLTSFC.backup1666323893.5041647
* BOLTSFC
* FreeCAD-BlenderBIM.backup1666328110.015535
* FreeCAD-BlenderBIM.backup1666737837.420096
* FreeCAD-BlenderBIM 2022.10.20
* 3rd link to Paul
* 3rd link to SketchArchPlus
* BIM.backup1670731522.690569
* BIM 2021.12.0
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
Curiously, after a few attempt, it now open (not sure if it is to do with I have rebooted the system) but crash when i try expand Children.
EDIT - Then I try closed my FireFox and it expand Children without problem; and then I re-open FireFox, and when the latter is up, FC crahes; not enough memory ?
EDIT - Then I try closed my FireFox and it expand Children without problem; and then I re-open FireFox, and when the latter is up, FC crahes; not enough memory ?
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
If it's a memory problem and you have a swap file enabled (like is very common in every standard installation) IMHO it's difficult having a crash, you should have a continuous read/write on disk rather then a crash. Anyway you can log memory in realtime to see if that's the problem, open the shell and use a top or htop command on background when running programs.
I cannot use or test anymore NativeIFC because I cannot install or use ifcopenshell with the snap package (I had to use snap because the daily on PPA repos it's not updated anymore ), so for me it's not possibile to try anything on edge with this addon
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
Re: Integration of BlenderBIM Feaures : FreeCAD Arch/BIM
Thanks for the heads-up, will have a look if the system has read/write swap on native IFC importing.
Not sure if you can use AppImage, which has built-in IfcOpenShell, and I have no problem on Fedora 36.
Now, (without running firefox) I have expanded all children in my last attempt. 2 weird things though:-
1. In an earlier attempt to import, unknown to me what I had done during the process, I had expanded a few objects, but found the rest of objects had no more options to expand
(see screencapture - can't capture the context menu which has no 'expand children' )
(No problem in my last attempt w/o Firefox as mentioned above)
2. There are a few cubes, large and small, associated with the IFC objects.
(see screencapture)
Not sure if you can use AppImage, which has built-in IfcOpenShell, and I have no problem on Fedora 36.
Now, (without running firefox) I have expanded all children in my last attempt. 2 weird things though:-
1. In an earlier attempt to import, unknown to me what I had done during the process, I had expanded a few objects, but found the rest of objects had no more options to expand
(see screencapture - can't capture the context menu which has no 'expand children' )
(No problem in my last attempt w/o Firefox as mentioned above)
2. There are a few cubes, large and small, associated with the IFC objects.
(see screencapture)