IFC 4.3.2.20241204 (IFC4X3_ADD2) under development

8.9.6.22 IfcScalarTimesVector

8.9.6.22.1 Semantic definition

8.9.6.22.2 Formal representation

FUNCTION IfcScalarTimesVector
  (Scalar : REAL; Vec : IfcVectorOrDirection)
    : IfcVector;
LOCAL
  V : IfcDirection;
  Mag : REAL;
  Result : IfcVector;
END_LOCAL;

  IF NOT EXISTS (Scalar) OR NOT EXISTS (Vec) THEN
    RETURN (?) ;
  ELSE
    IF 'IFC4X3_DEV_7e95fe8.IFCVECTOR' IN TYPEOF (Vec) THEN
      V := Vec\IfcVector.Orientation;
      Mag := Scalar * Vec\IfcVector.Magnitude;
    ELSE
      V := Vec;
      Mag := Scalar;
    END_IF;
    IF (Mag < 0.0 ) THEN
      REPEAT i := 1 TO SIZEOF(V.DirectionRatios);
        V.DirectionRatios[i] := -V.DirectionRatios[i];
      END_REPEAT;
      Mag := -Mag;
    END_IF;
    Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector(IfcNormalise(V), Mag);
  END_IF;
  RETURN (Result);

END_FUNCTION;

8.9.6.22.3 References

Edit on Github


Is this page difficult to understand? Let us know!