FUNCTION get_tri_for_pd

(* SCHEMA step_merged_ap_schema; *)
-- IN AP238 STEP-NC/AP242
FUNCTION get_tri_for_pd
      (def_instance : product_definition ) : SET OF topological_representation_item;
   LOCAL
      pd1_set : SET OF property_definition := bag_to_set(USEDIN(def_instance, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
      pd2_set : SET OF property_definition := [];
      pdr_set : SET OF property_definition_representation := [];
      pds_set : SET OF product_definition_shape := [];
      r_set : SET OF representation := [];
      sa_set : SET OF shape_aspect := [];
      tri_set : SET OF topological_representation_item := [];
   END_LOCAL;
      IF SIZEOF(pd1_set) < 1 THEN
         RETURN (?);
      END_IF;
      REPEAT i := LOINDEX(pd1_set) TO HIINDEX(pd1_set);
         pdr_set := pdr_set + bag_to_set(USEDIN(pd1_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'));
         IF 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd1_set[i]) THEN
            pds_set := pds_set + pd1_set[i];
         END_IF;
      END_REPEAT;
      REPEAT i := LOINDEX(pds_set) TO HIINDEX(pds_set);
         sa_set := sa_set + bag_to_set(USEDIN(pds_set[i], 'STEP_MERGED_AP_SCHEMA.SHAPE_ASPECT.OF_SHAPE'));
      END_REPEAT;
      REPEAT i := LOINDEX(sa_set) TO HIINDEX(sa_set);
         pd2_set := pd2_set + bag_to_set(USEDIN(sa_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
      END_REPEAT;
      IF SIZEOF(pd2_set) > 0 THEN
         BEGIN
            REPEAT i := LOINDEX(pd2_set) TO HIINDEX(pd2_set);
               pdr_set := pdr_set + bag_to_set(USEDIN(pd2_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'));
            END_REPEAT;
         END;
      END_IF;
      IF SIZEOF(pdr_set) < 1 THEN
         RETURN (?);
      END_IF;
      REPEAT i := LOINDEX(pdr_set) TO HIINDEX(pdr_set);
         r_set := r_set + pdr_set[i]\property_definition_representation.used_representation;
      END_REPEAT;
      IF SIZEOF(r_set) < 1 THEN
         RETURN (?);
      END_IF;
      REPEAT i := LOINDEX(r_set) TO HIINDEX(r_set);
         REPEAT j := LOINDEX(r_set[i]\representation.items) TO HIINDEX(r_set[i]\representation.items);
            IF 'STEP_MERGED_AP_SCHEMA.TOPOLOGICAL_REPRESENTATION_ITEM' IN TYPEOF(r_set[i]\representation.items[j]) THEN
               tri_set := tri_set + r_set[i]\representation.items[j];
            END_IF;
         END_REPEAT;
      END_REPEAT;
      RETURN (tri_set);
END_FUNCTION;

Referenced By

Defintion get_tri_for_pd is references by the following definitions:
DefinitionType
 tri_identification_within_product_definition RULE


[Top Level Definitions] [Exit]

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