FUNCTION get_diameter_for_round_hole

(* SCHEMA step_merged_ap_schema; *)
-- IN AP214
FUNCTION get_diameter_for_round_hole
      (rh : round_hole ) : REAL;
   LOCAL
      sa_set : SET OF shape_aspect;
      sar_set : SET OF shape_aspect_relationship;
      pdr_set : SET OF property_definition_representation;
      ri_set : SET OF representation_item;
   END_LOCAL;
      sa_set := get_shape_aspects(rh);
      REPEAT i := 1 TO HIINDEX(sa_set);
         IF sa_set[i].description = 'diameter occurrence' THEN
            sar_set := bag_to_set(USEDIN(sa_set[i], 'STEP_MERGED_AP_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'));
            REPEAT j := 1 TO HIINDEX(sar_set);
               IF (((sar_set[j].name = 'diameter') AND (sar_set[j].description = 'profile usage')) AND ('STEP_MERGED_AP_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF(sar_set[j]))) AND ('STEP_MERGED_AP_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN TYPEOF(sar_set[j].relating_shape_aspect)) THEN
                  pdr_set := get_shape_aspect_property_definition_representations(sar_set[j].relating_shape_aspect);
                  REPEAT k := 1 TO HIINDEX(pdr_set);
                     IF 'STEP_MERGED_AP_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr_set[k].used_representation) THEN
                        ri_set := pdr_set[k].used_representation.items;
                        REPEAT l := 1 TO HIINDEX(ri_set);
                           IF ('STEP_MERGED_AP_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(ri_set[l])) AND ('STEP_MERGED_AP_SCHEMA.LENGTH_MEASURE_WITH_UNIT' IN TYPEOF(ri_set[l])) THEN
                              RETURN (ri_set[l]\measure_with_unit.value_component);
                           END_IF;
                        END_REPEAT;
                     END_IF;
                  END_REPEAT;
               END_IF;
            END_REPEAT;
         END_IF;
      END_REPEAT;
      RETURN (?);
END_FUNCTION;

Referenced By

    Not referenced by any other definition


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00