IfcBaseAxis
作者:互联网
IfcBaseAxis
函数定义
注:根据ISO/CD 10303-42:1992的定义
此函数返回归一化正交方向u[1]、u[2],如果合适,还返回u[3]。在三维情况下,对于完整的输入数据,u[3]位于axis3的方向,u[1]位于axis1在垂直于u[3]的平面上的投影方向,u[2]与u[1]和u[3正交,与axis2具有相同的意义。在二维情况下,u[1]在轴1的方向上,u[2]垂直于轴1,从轴2取其意义。对于不完整的输入数据,将导出相应的默认值。
注:根据ISO 10303-42中定义的基准轴调整功能。
IFC2x中的新函数
EXPRESS Specification
FUNCTION IfcBaseAxis (Dim : INTEGER; Axis1, Axis2, Axis3 : IfcDirection) : LIST [2:3] OF IfcDirection; LOCAL U : LIST [2:3] OF IfcDirection; Factor : REAL; D1, D2 : IfcDirection; END_LOCAL; IF (Dim = 3) THEN D1 := NVL(IfcNormalise(Axis3), IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,0.0,1.0])); D2 := IfcFirstProjAxis(D1, Axis1); U := [D2, IfcSecondProjAxis(D1, D2, Axis2), D1]; ELSE IF EXISTS(Axis1) THEN D1 := IfcNormalise(Axis1); U := [D1, IfcOrthogonalComplement(D1)]; IF EXISTS(Axis2) THEN Factor := IfcDotProduct(Axis2, U[2]); IF (Factor < 0.0) THEN U[2].DirectionRatios[1] := -U[2].DirectionRatios[1]; U[2].DirectionRatios[2] := -U[2].DirectionRatios[2]; END_IF; END_IF; ELSE IF EXISTS(Axis2) THEN D1 := IfcNormalise(Axis2); U := [IfcOrthogonalComplement(D1), D1]; U[1].DirectionRatios[1] := -U[1].DirectionRatios[1]; U[1].DirectionRatios[2] := -U[1].DirectionRatios[2]; ELSE U := [IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.0, 0.0]), IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0, 1.0])]; END_IF; END_IF; END_IF; RETURN(U); END_FUNCTION;
########################################
标签:IfcBaseAxis,END,Axis2,0.0,IfcDirection,DirectionRatios,D1 来源: https://www.cnblogs.com/herd/p/15627333.html