IfcSecondProjAxis

注:定义符合ISO/CD 10303-42:1992

此函数返回归一化向量,即arg在垂直于向量z轴的平面和垂直于向量x轴的平面上的投影。如果arg为空,则返回向量(0,1,0.)到z轴的投影。

注:根据ISO 10303-42中定义的第二个投影轴改编的功能。

IFC2x中的新函数

 

EXPRESS Specification

FUNCTION IfcSecondProjAxis
  (ZAxis, XAxis, Arg: IfcDirection)
    : IfcDirection;
LOCAL
  YAxis : IfcVector;
  V     : IfcDirection;
  Temp  : IfcVector;
END_LOCAL;

  IF NOT EXISTS(Arg) THEN
    V := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,1.0,0.0]);
  ELSE
    V := Arg;
  END_IF;
  Temp  := IfcScalarTimesVector(IfcDotProduct(V, ZAxis), ZAxis);
  YAxis := IfcVectorDifference(V, Temp);
  Temp  := IfcScalarTimesVector(IfcDotProduct(V, XAxis), XAxis);
  YAxis := IfcVectorDifference(YAxis, Temp);
  YAxis := IfcNormalise(YAxis);
  RETURN(YAxis.Orientation);
END_FUNCTION;

 

posted @ 2021-03-14 00:07  西北逍遥  阅读(53)  评论(0编辑  收藏  举报