FUNCTION base_axis
(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP224
-- DIFF IN AP232
FUNCTION base_axis
(dim : INTEGER;
axis1 : direction;
axis2 : direction;
axis3 : direction ) : LIST [2:3] OF direction;
LOCAL
u : LIST [2:3] OF direction;
factor : REAL;
d1 : direction;
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;
Referenced By
Defintion base_axis is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00