FUNCTION IfcDotProduct

(* SCHEMA IFC4; *)
FUNCTION IfcDotProduct
  (Arg1, Arg2 : IfcDirection) 
    : REAL;
LOCAL
  Scalar : REAL;
  Vec1, Vec2 : IfcDirection;
  Ndim   : INTEGER;
END_LOCAL;

  IF NOT EXISTS (Arg1) OR NOT EXISTS (Arg2) THEN
    Scalar := ?;
  ELSE
    IF (Arg1.Dim <> Arg2.Dim) THEN
      Scalar := ?;
    ELSE
      BEGIN
        Vec1 := IfcNormalise(Arg1);
        Vec2 := IfcNormalise(Arg2);
        Ndim := Arg1.Dim;
        Scalar := 0.0;
        REPEAT i := 1 TO Ndim;
          Scalar := Scalar + Vec1.DirectionRatios[i]*Vec2.DirectionRatios[i];
        END_REPEAT;
      END;
    END_IF;
  END_IF;
  RETURN (Scalar);

END_FUNCTION;

Referenced By

Defintion IfcDotProduct is references by the following definitions:
DefinitionType
 IfcBaseAxis FUNCTION
 IfcExtrudedAreaSolid ENTITY
 IfcFirstProjAxis FUNCTION
 IfcSecondProjAxis FUNCTION


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-07-11T21:39:05-04:00