FUNCTION scalar_times_vector
(* SCHEMA AP239_PRODUCT_LIFE_CYCLE_SUPPORT_MIM_LF; *)
FUNCTION scalar_times_vector(scalar : REAL; vec : vector_or_direction) : vector
;
LOCAL
v : direction;
mag : REAL;
result : vector;
END_LOCAL;
IF NOT EXISTS(scalar) OR NOT EXISTS(vec) THEN
RETURN (?);
ELSE
IF 'AP239_PRODUCT_LIFE_CYCLE_SUPPORT_MIM_LF.VECTOR' IN TYPEOF(vec) THEN
v := dummy_gri||direction(vec.orientation.direction_ratios);
mag := scalar * vec.magnitude;
ELSE
v := dummy_gri||direction(vec.direction_ratios);
mag := scalar;
END_IF;
IF mag < 0.0 THEN
REPEAT i := 1 TO SIZEOF(v.direction_ratios);
v.direction_ratios[i] := -v.direction_ratios[i];
END_REPEAT;
mag := -mag;
END_IF;
result := dummy_gri||vector(normalise(v), mag);
END_IF;
RETURN (result);
END_FUNCTION; (* declared in: geometry_schema *)
Referenced By
Defintion scalar_times_vector is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:19:36-04:00