FUNCTION same_side

(* SCHEMA STRUCTURAL_FRAME_SCHEMA; *)

(* New for LPM/6 *)
FUNCTION same_side
	(plane_pts : LIST [3:3] of cartesian_point;
		test_points : LIST [2:?] of cartesian_point) : BOOLEAN;
   LOCAL
     val1, val2 : REAL;
     n          : INTEGER;
   END_LOCAL;

   IF (plane_pts[1].dim = 2) OR (test_points[1].dim = 2) THEN
     RETURN(?);
   END_IF;
   n := SIZEOF(test_points);
   val1 := above_plane(plane_pts[1], plane_pts[2], plane_pts[3],
                       test_points[1] );
   REPEAT i := 2 TO n;
     val2 := above_plane(plane_pts[1], plane_pts[2], plane_pts[3],
                       test_points[i] );
     IF (val1*val2 <= 0.0) THEN
       RETURN(FALSE);
     END_IF;
   END_REPEAT;
   RETURN(TRUE);
END_FUNCTION;

Referenced By

Defintion same_side is references by the following definitions:
DefinitionType
 convex_hexahedron ENTITY
 hexahedron_volume ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2023-03-25T00:11:39-04:00