RULE dimensioning_data_requires_document

(* SCHEMA step_merged_ap_schema; *)
-- IN AP242
RULE dimensioning_data_requires_document FOR (applied_document_reference, product_definition_context_association, role_association );
   LOCAL
      adr : SET OF applied_document_reference := QUERY (adr <* applied_document_reference| (adr\document_reference.assigned_document\document.kind\document_type.product_data_type = 'Standards Document') AND (((adr\document_reference.assigned_document\document.id = 'ASME Y14.41-2003') OR (adr\document_reference.assigned_document\document.id = 'ASME Y14.5M-1994')) OR (adr\document_reference.assigned_document\document.id = 'ISO 1101: 2004')));
      pdca : SET OF product_definition_context_association := QUERY (pdca <* product_definition_context_association| (pdca\product_definition_context_association.role\product_definition_context_role.name = 'additional context') AND (pdca\product_definition_context_association.frame_of_reference\application_context_element.name = 'Geometric Dimensioning and Tolerancing Product Specification'));
      ra : SET OF role_association := QUERY (ra <* role_association| ra\role_association.role\object_role.name = 'dimensioning standard');
      ra1 : SET OF role_association := [];
      pdpdca : SET OF product_definition := [];
      pdadr : SET OF product_definition := [];
      pass : BOOLEAN := TRUE;
   END_LOCAL;
      REPEAT i := 1 TO HIINDEX(pdca);
         pdpdca := pdpdca + pdca[i]\product_definition_context_association.definition;
      END_REPEAT;
      REPEAT i := 1 TO HIINDEX(adr);
         ra1 := bag_to_set(USEDIN(adr[i], 'STEP_MERGED_AP_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'));
         IF ra1 * ra <> ra1 THEN
            pass := FALSE;
         END_IF;
         REPEAT j := 1 TO HIINDEX(adr[i]\applied_document_reference.items);
            IF 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION' IN TYPEOF(adr[i]\applied_document_reference.items[j]) THEN
               pdadr := pdadr + adr[i]\applied_document_reference.items[j];
            END_IF;
         END_REPEAT;
      END_REPEAT;
   WHERE
      WR1:
         pass;
      WR2:
         pdpdca = pdadr;
END_RULE;

[Top Level Definitions] [Exit]

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