IfcSecondProjAxis

Natural language names
Second Proj Axis
Semantic definitions at the function
Function Definition

NOTE  Definition according to ISO/CD 10303-42:1992
This function returns the normalized vector that is simultaneously the projection of arg onto the plane normal to the vector z-axis and onto the plane normal to the vector x-axis. If arg is NULL then the projection of the vector (0.,1.,0.) onto z-axis is returned.
NOTE  Function adapted from second_proj_axis defined in ISO 10303-42.
HISTORY  New function in IFC2x

Formal representations
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;

Link to this page  Link to this page