I am trying to query some information from an IFC file by reading out the rooms (IfcSpace) and their connectionsurfacegeometry. I am using a simple example, modeled in Revit and exported in IFC4:
3D view of the Model in Revit with some added information regarding to my question
I am kind of confused about the way the planes of the connectionsurfaces are defined in the IFC file:
#939= IFCRELSPACEBOUNDARY('3xhbPH49D9TfQKK9Lu08oz',#42,'1stLevel',$,#204,#785,#226,.PHYSICAL.,.INTERNAL.);
#204= IFCSPACE('04KCO36993gQtA70ZBoE3c',#42,'1',$,$,#180,#199,'Raum A',.ELEMENT.,.SPACE.,$);
#785= IFCSLAB('3e$xLVgOf3m8nQTYiFEy7v',#42,'Geschossdecke:STB 200:2441784',$,'Geschossdecke:STB 200',#755,#781,'2441784',.FLOOR.);
#226= IFCCONNECTIONSURFACEGEOMETRY(#224,$);
#224= IFCCURVEBOUNDEDPLANE(#223,#220,());
#223= IFCPLANE(#222);
#222= IFCAXIS2PLACEMENT3D(#212,#20,#14);
#212= IFCCARTESIANPOINT((24.,10.,8.));
#20= IFCDIRECTION((0.,0.,1.));
#14= IFCDIRECTION((-1.,0.,0.));
#220= IFCPOLYLINE((#10,#214,#216,#218,#10));
#10= IFCCARTESIANPOINT((0.,0.));
#214= IFCCARTESIANPOINT((24.,0.));
#216= IFCCARTESIANPOINT((24.,10.));
#218= IFCCARTESIANPOINT((0.,10.));
#10= IFCCARTESIANPOINT((0.,0.));
#942= IFCRELSPACEBOUNDARY('0WWFTh$2PB2hOrAyfp48qI',#42,'1stLevel',$,#204,#707,#241,.PHYSICAL.,.INTERNAL.);
#204= IFCSPACE('04KCO36993gQtA70ZBoE3c',#42,'1',$,$,#180,#199,'Raum A',.ELEMENT.,.SPACE.,$);
#707= IFCSLAB('3e$xLVgOf3m8nQTYiFEy7D',#42,'Geschossdecke:STB 200:2441740',$,'Geschossdecke:STB 200',#676,#703,'2441740',.FLOOR.);
#241= IFCCONNECTIONSURFACEGEOMETRY(#239,$);
#239= IFCCURVEBOUNDEDPLANE(#238,#235,());
#238= IFCPLANE(#237);
#237= IFCAXIS2PLACEMENT3D(#227,#22,#18);
#227= IFCCARTESIANPOINT((24.,10.,0.));
#22= IFCDIRECTION((0.,0.,-1.));
#18= IFCDIRECTION((0.,-1.,0.));
#235= IFCPOLYLINE((#10,#229,#231,#233,#10));
#10= IFCCARTESIANPOINT((0.,0.));
#229= IFCCARTESIANPOINT((10.,0.));
#231= IFCCARTESIANPOINT((10.,24.));
#233= IFCCARTESIANPOINT((0.,24.));
#10= IFCCARTESIANPOINT((0.,0.));
As you can see, the slab #785 has a polyline defined in #220. The coordinates match with the axes from the Revit file. However the slab #707 has a plane created by the polyline #235, with reversed coordinates for x and y. I see that there are differences between the directions of each plane, but i dont understand how they work together.
I hope that I made the problem clear somehow and I am looking forward to your feedback.
Best Regards!
ok.. sometimes 5 mins of relaxed thinking are better then 2 hours of googling.
The coordinate origin flips for the plane that faces top down. So the x and y axes are reversed. Simple geometry :| Finaly a rubber gum helped me :D
I will leave it here, just in case.
Have a nice day!