FUNCTION same_side

(* SCHEMA step_merged_ap_schema; *)
-- IN AP238 STEP-NC/AP242
FUNCTION same_side
      (plane_pts : LIST [3:3] OF cartesian_point;
       test_points : LIST [2:?] OF cartesian_point ) : BOOLEAN;
   LOCAL
      val1 : REAL;
      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
2024-09-06T14:00:33-04:00