FUNCTION base_axis
(* SCHEMA STRUCTURAL_FRAME_SCHEMA; *)
(* Modified for LPM/6 *)
FUNCTION base_axis
(dim : INTEGER; axis1, axis2, axis3 : direction) : LIST [2:3] OF direction;
LOCAL
u : LIST [2:3] OF direction;
factor : REAL;
d1, d2 : direction;
END_LOCAL;
IF (dim = 3) THEN
d1 := NVL(normalise(axis3), dummy_gri || direction([0.0,0.0,1.0]));
d2 := first_proj_axis(d1,axis1);
u := [d2, second_proj_axis(d1,d2,axis2), d1];
ELSE
IF EXISTS(axis1) THEN
d1 := normalise(axis1);
u := [d1, orthogonal_complement(d1)];
IF EXISTS(axis2) THEN
factor := dot_product(axis2,u[2]);
IF (factor < 0.0) THEN
u[2].direction_ratios[1] := -u[2].direction_ratios[1];
u[2].direction_ratios[2] := -u[2].direction_ratios[2];
END_IF;
END_IF;
ELSE
IF EXISTS(axis2) THEN
d1 := normalise(axis2);
u := [orthogonal_complement(d1), d1];
u[1].direction_ratios[1] := -u[1].direction_ratios[1];
u[1].direction_ratios[2] := -u[1].direction_ratios[2];
ELSE
u := [dummy_gri || direction([1.0, 0.0]), dummy_gri ||
direction([0.0, 1.0])];
END_IF;
END_IF;
END_IF;
RETURN(u);
END_FUNCTION; (* STEP Part 42 (modified in 2nd edition) *)
Referenced By
Defintion base_axis is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2023-03-25T00:11:39-04:00