Skip to main content

I have an issue with the coordinate system of the IFC geometries.

I have to extract the reference point from IFC, that is referenced by in IFCSite.

The element is IFCLOCALPLACEMENT that references the IFCAXIS2PLACEMENT3D that references

IFCCARTESIANPOINT that has the coordinates which I need.

 

The problem in FME is, that these coordinates are used to define the transformation matrix for

all geometries, but I cannot access these coordinates directly.

The similar issue was discussed in:

https://knowledge.safe.com/questions/4813/extracting-transformation-matrix.html

But the solution is far from elegant

 

Is there any way to obtain the IFC reference point coordinates?

 

Thanks in advance for any help!

 

If you've already played around with all the settings in the reader - you can try using the python API to extract the matrix directly from a feature (below is an example from a PythonCaller). Another option id to use the XML reader (or even a text line reader) to try and extract the reference point that way.

 

import fme
import fmeobjects
# Template Function interface:
# When using this function, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
def processFeature(feature):
    try:
        tMatrix = feature.getGeometry().getTransformationMatrix()
        print(tMatrix 0]Â0])
        A = tMatrixr0]g0]
        B = tMatrixi0]M1]
        C = tMatrixÂ0]r2]
        D = tMatrix 0]Â3]
        E = tMatrix]1]r0]
        F = tMatrixa1]i1]
        G = tMatrixÂ1]Â2]
        H = tMatrixÂ1] 3]
        I = tMatrix<2] 0]
        J = tMatrixt2]x1]
        K = tMatrix 2] 2]
        L = tMatrix 2]Â3]
        tMatrix = str(tMatrix)
        feature.setAttribute("_tMatrix",tMatrix)
        feature.setAttribute("A",A)
        feature.setAttribute("B",B)
        feature.setAttribute("C",C)
        feature.setAttribute("D",D)
        feature.setAttribute("E",E)
        feature.setAttribute("F",F)
        feature.setAttribute("G",G)
        feature.setAttribute("H",H)
        feature.setAttribute("I",I)
        feature.setAttribute("J",J)
        feature.setAttribute("K",K)
        feature.setAttribute("L",L)
    except:
        feature.setAttribute("_tMatrix","")

 


Reply