FUNCTION geometric_dimensionalities_in_contexts

(* SCHEMA step_merged_ap_schema; *)
-- IN AP238 STEP-NC/AP242
FUNCTION geometric_dimensionalities_in_contexts
      (grcs : SET [1:?] OF geometric_representation_context ) : INTEGER;
   LOCAL
      grcs_1d : INTEGER := 0;
      grcs_2d : INTEGER := 0;
      grcs_3d : INTEGER := 0;
   END_LOCAL;
      IF SIZEOF(grcs) = 1 THEN
         RETURN (grcs[1]\geometric_representation_context.coordinate_space_dimension);
      ELSE
         REPEAT i := 1 TO HIINDEX(grcs);
            IF grcs[i]\geometric_representation_context.coordinate_space_dimension = 1 THEN
               grcs_1d := grcs_1d + 1;
            ELSE
               IF grcs[i]\geometric_representation_context.coordinate_space_dimension = 2 THEN
                  grcs_2d := grcs_2d + 1;
               ELSE
                  IF grcs[i]\geometric_representation_context.coordinate_space_dimension = 3 THEN
                     grcs_3d := grcs_3d + 1;
                  END_IF;
               END_IF;
            END_IF;
         END_REPEAT;
      END_IF;
      IF grcs_1d + grcs_2d = 0 THEN
         RETURN (3);
      ELSE
         IF grcs_1d + grcs_3d = 0 THEN
            RETURN (2);
         ELSE
            IF grcs_2d + grcs_3d = 0 THEN
               RETURN (1);
            ELSE
               RETURN (0);
            END_IF;
         END_IF;
      END_IF;
END_FUNCTION;

Referenced By

Defintion geometric_dimensionalities_in_contexts is references by the following definitions:
DefinitionType
 check_geometric_dimension FUNCTION


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00