Grid, IfcGrid is imported with wrong placement

This forum section is only for IFC-related issues
Post Reply
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Grid, IfcGrid is imported with wrong placement

Post by bernd »

attached a simple example file.

See grid in IFC++ and in FreeCAD. In FreeCAD it misses the grid placement. I will give more informations in a separate post.

Code: Select all

OS: Debian GNU/Linux 10 (buster) (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18515 (Git)
Build type: Unknown
Branch: master
Hash: 90fad8180fac6d514048e3ca9179c9705a736b82
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)

ifcgrid_example.ifc
(43.26 KiB) Downloaded 117 times

Screenshot_20191011_215721.png
Screenshot_20191011_215721.png (107.19 KiB) Viewed 7369 times

Screenshot_20191011_215619.png
Screenshot_20191011_215619.png (28.8 KiB) Viewed 7369 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Grid, IfcGrid is imported with wrong placement

Post by bernd »

attached the important entities

Code: Select all

#134= IFCGRID('0GRU0LrWCHwPzj636$u4oZ',#11,'Grid CW',$,$,#68,#132,(#104,#108,#112,#116,#120,#124),(#72,#76,#80,#84,#88,#92,#96,#100),$);

#68= IFCLOCALPLACEMENT(#60,#67);

#60= IFCLOCALPLACEMENT($,#59);
#59= IFCAXIS2PLACEMENT3D(#56,#58,#57);
#56= IFCCARTESIANPOINT((-18.003500,-83.838410,0.));
#57= IFCDIRECTION((1.,0.,0.));
#58= IFCDIRECTION((0.,0.,1.));

#67= IFCAXIS2PLACEMENT3D(#66,#39,#37);
#66= IFCCARTESIANPOINT((2942.607195,68435.881370,0.));
#39= IFCDIRECTION((0.,0.,1.));
#37= IFCDIRECTION((1.,0.,0.));

It is not difficault to fix. Since in FreeCAD all axes are in one grid object we just need to set the placement of this grid object. The cool thing is, with this we have set up the grid in FreeCAD the same way as in the ifc file.

I was wondering if there is some code in Arch already to read IfcLocalPlacement and create a FreeCAD placement from it?


yorik wrote: ping
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Grid, IfcGrid is imported with wrong placement

Post by bernd »

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Grid, IfcGrid is imported with wrong placement

Post by bernd »

eventually the fix was quite easy because there is a method to get a FreeCAD placement from a IFC placement, thanks to Yorik :D

git commit a431cf7
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Grid, IfcGrid is imported with wrong placement

Post by yorik »

great!! thanks for the fix!
pdpb59
Posts: 28
Joined: Thu Feb 18, 2021 1:43 pm
Location: Saarbrücken

Re: Grid, IfcGrid is imported with wrong placement

Post by pdpb59 »

bernd wrote: Fri Oct 11, 2019 7:59 pm
See grid in IFC++ and in FreeCAD. In FreeCAD it misses the grid placement. I will give more informations in a separate post.
How do I manage to assign the Axis system to the ifcGrid? I can not find a connection?
Peter
Attachments
128-Objekte-IFCGrid.JPG
128-Objekte-IFCGrid.JPG (149.15 KiB) Viewed 6552 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Grid, IfcGrid is imported with wrong placement

Post by bernd »

pdpb59 wrote: Thu Nov 03, 2022 7:18 pm
bernd wrote: Fri Oct 11, 2019 7:59 pm
See grid in IFC++ and in FreeCAD. In FreeCAD it misses the grid placement. I will give more informations in a separate post.
How do I manage to assign the Axis system to the ifcGrid? I can not find a connection?
Peter
viewtopic.php?p=661374#p661374
Post Reply