FUNCTION above_plane

(* SCHEMA STRUCTURAL_FRAME_SCHEMA; *)


(* Function Declarations *)

(* New for LPM/6 *)
FUNCTION above_plane
	(p1, p2, p3, p4 : cartesian_point) : REAL;
   LOCAL
     dir2, dir3, dir4 : direction :=
                 dummy_gri || direction([1.0, 0.0, 0.0]);
     val, 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;  (* STEP Part 42 (New for 2nd edition)  *)

Referenced By

Defintion above_plane is references by the following definitions:
DefinitionType
 convex_hexahedron ENTITY
 hexahedron_volume ENTITY
 same_side FUNCTION
 tetrahedron ENTITY
 tetrahedron_volume ENTITY


[Top Level Definitions] [Exit]

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