FUNCTION IfcScalarTimesVector

(* SCHEMA IFC2X2_FINAL; *)
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 'IFC2X2_FINAL.IFCVECTOR' IN TYPEOF (Vec) THEN
        V := Vec.Orientation;
        Mag := Scalar * Vec.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;

Referenced By

Defintion IfcScalarTimesVector is references by the following definitions:
DefinitionType
 IfcFirstProjAxis FUNCTION
 IfcSecondProjAxis FUNCTION


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:20:56-04:00