span8
span4
我对IFC的几何坐标系统有一个问题。
我必须从IFC中提取参考点,它在IFCSite中被引用。
元素是引用IFCAXIS2PLACEMENT3D的IFCLOCALPLACEMENT
它有我需要的坐标。
FME的问题是,这些坐标是用来定义变换矩阵的
所有的几何图形,但我不能直接访问这些坐标。
类似的问题在下列文件中讨论:
https://knowledge.亚搏在线safe.com/questions/4813/extracting-transformation-matrix.html
但解决方案远非完美
是否有办法获取IFC参考点坐标?
预先感谢任何帮助!
如果您已经尝试了阅读器中的所有设置—您可以尝试使用python API直接从特性中提取矩阵(下面是来自PythonCaller的示例)。另一个选项id使用XML阅读器(甚至是文本行阅读器)尝试以这种方式提取引用点。
导入fme导入fmeobjects #模板函数接口:#在使用这个函数时,请确保将它的名称设置为‘类或函数来处理特性’的值#tMatrix = feature.getGeometry().getTransformationMatrix() print(tMatrix[0][0]) A = tMatrix[0][0] B = tMatrix[0][1] C = tMatrix[0][2] D = tMatrix[0][3] E = tMatrix[1][0] F = tMatrix[1][1] G = tMatrix[1][2] H = tMatrix[1][3] I = tMatrix[2][0] J = tMatrix[2][1] 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","")
©2019安全亚搏在线软件公司法律