FUNCTION above_plane
(* SCHEMA step_merged_ap_schema; *)
-- IN AP238 STEP-NC/AP242
FUNCTION above_plane
(p1 : cartesian_point;
p2 : cartesian_point;
p3 : cartesian_point;
p4 : cartesian_point ) : REAL;
LOCAL
dir2 : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
dir3 : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
dir4 : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
val : REAL;
mag : REAL;
END_LOCAL;
IF p1.dim <> 3 THEN
RETURN (?);
END_IF;
REPEAT i := 1 TO 3;
dir2.direction_ratios[i] := p2.coordinates[i] - p1.coordinates[i];
dir3.direction_ratios[i] := p3.coordinates[i] - p1.coordinates[i];
dir4.direction_ratios[i] := p4.coordinates[i] - p1.coordinates[i];
mag := dir4.direction_ratios[i] * dir4.direction_ratios[i];
END_REPEAT;
mag := SQRT(mag);
val := mag * dot_product(dir4, cross_product(dir2, dir3).orientation);
RETURN (val);
END_FUNCTION;
Referenced By
Defintion above_plane 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