FUNCTION assembly_shape_is_defined

(* SCHEMA step_merged_ap_schema; *)
-- IN AP214
FUNCTION assembly_shape_is_defined
      (assy : next_assembly_usage_occurrence ) : BOOLEAN;
   LOCAL
      sdr_set : SET OF shape_definition_representation := [];
      srr_set : SET OF shape_representation_relationship := [];
      sdr1_set : SET OF shape_definition_representation := [];
      pd_set : SET OF property_definition := [];
      pdr_set : SET OF product_definition_relationship := [];
      pds_set : SET OF product_definition_shape := [];
      prop_set : SET OF property_definition := [];
   END_LOCAL;
      pd_set := bag_to_set(USEDIN(assy.related_product_definition, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
      pdr_set := QUERY (pdr <* bag_to_set(USEDIN(assy.related_product_definition, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'))| SIZEOF(USEDIN(pdr, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')) > 0);
      IF SIZEOF(pd_set) > 0 THEN
         REPEAT i := 1 TO HIINDEX(pd_set);
            sdr_set := sdr_set + QUERY (pdr <* USEDIN(pd_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ('STEP_MERGED_AP_SCHEMA.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr)));
         END_REPEAT;
      END_IF;
      IF SIZEOF(pdr_set) > 0 THEN
         REPEAT i := 1 TO HIINDEX(pdr_set);
            prop_set := prop_set + bag_to_set(USEDIN(pdr_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
         END_REPEAT;
         IF SIZEOF(prop_set) > 0 THEN
            REPEAT i := 1 TO HIINDEX(prop_set);
               sdr_set := sdr_set + QUERY (pdr <* USEDIN(prop_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ('STEP_MERGED_AP_SCHEMA.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr)));
            END_REPEAT;
         END_IF;
      END_IF;
      IF SIZEOF(sdr_set) > 0 THEN
         REPEAT i := 1 TO HIINDEX(sdr_set);
            srr_set := QUERY (rr <* bag_to_set(USEDIN(sdr_set[i]\property_definition_representation.used_representation, 'STEP_MERGED_AP_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2'))| 'STEP_MERGED_AP_SCHEMA.SHAPE_REPRESENTATION_RELATIONSHIP' IN TYPEOF(rr));
            pd_set := bag_to_set(USEDIN(assy.relating_product_definition, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
            IF SIZEOF(pd_set) > 0 THEN
               REPEAT i := 1 TO HIINDEX(pd_set);
                  sdr1_set := sdr1_set + QUERY (pdr <* USEDIN(pd_set[i], 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ('STEP_MERGED_AP_SCHEMA.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr)));
               END_REPEAT;
            END_IF;
            IF (SIZEOF(sdr_set) > 0) AND (SIZEOF(sdr1_set) > 0) THEN
               IF SIZEOF(srr_set) > 0 THEN
                  REPEAT j := 1 TO HIINDEX(srr_set);
                     IF SIZEOF(QUERY (pdr <* bag_to_set(USEDIN(srr_set[j]\representation_relationship.rep_1, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'))| ('STEP_MERGED_AP_SCHEMA.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr))) * sdr1_set) >= 1 THEN
                        pds_set := QUERY (x <* bag_to_set(USEDIN(assy, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION'))| 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(x));
                        IF SIZEOF(pds_set) = 0 THEN
                           RETURN (FALSE);
                        END_IF;
                        REPEAT k := 1 TO HIINDEX(pds_set);
                           IF SIZEOF(QUERY (cdsr <* USEDIN(pds_set[k], 'STEP_MERGED_AP_SCHEMA.CONTEXT_DEPENDENT_SHAPE_REPRESENTATION.REPRESENTED_PRODUCT_RELATION')| (cdsr.representation_relation :=: srr_set[j]))) > 0 THEN
                              RETURN (FALSE);
                           END_IF;
                        END_REPEAT;
                     END_IF;
                  END_REPEAT;
               END_IF;
            END_IF;
         END_REPEAT;
      END_IF;
      RETURN (TRUE);
END_FUNCTION;

Referenced By

Defintion assembly_shape_is_defined is references by the following definitions:
DefinitionType
 coordinated_assembly_and_shape RULE


[Top Level Definitions] [Exit]

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