RULE restrict_part_occurrence

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP214
-- IN AP203e2/AP214/AP238 STEP-NC/AP242
RULE restrict_part_occurrence FOR (product_definition );
   LOCAL
      part_occurrences : SET OF product_definition := QUERY (pd <* product_definition| pd.frame_of_reference.name = 'part occurrence');
   END_LOCAL;
   WHERE
      WR1:
         SIZEOF(QUERY (pd <* part_occurrences| NOT (pd.name IN [ 'single instance', 'selected instance', 'quantified instance', 'specified instance' ]))) = 0;
      WR2:
         SIZEOF(QUERY (pd <* part_occurrences| (SIZEOF(QUERY (pdr <* USEDIN(pd, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION')| (pdr.name = 'definition usage'))) <> 1) AND (SIZEOF(QUERY (cd <* USEDIN(pd, 'STEP_MERGED_AP_SCHEMA.CONFIGURATION_DESIGN.DESIGN')| (cd.name = 'occurrence usage definition') AND NOT ('STEP_MERGED_AP_SCHEMA.PRODUCT_IDENTIFICATION' IN TYPEOF(cd.configuration)))) <> 1))) = 0;
      WR3:
         SIZEOF(QUERY (pd <* part_occurrences| (SIZEOF(QUERY (cd <* USEDIN(pd, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION')| ('STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_USAGE' IN TYPEOF(cd)))) = 0) AND (SIZEOF(USEDIN(pd, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE')) = 0))) = 0;
      WR4:
         SIZEOF(QUERY (pd <* part_occurrences| (pd.name = 'selected instance') AND NOT valid_selected_instance_representation(pd))) = 0;
      WR5:
         SIZEOF(QUERY (pd <* part_occurrences| (pd.name = 'quantified instance') AND (SIZEOF(QUERY (ppd <* USEDIN(pd, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (ppd.name = 'occurrence quantity') AND (SIZEOF(QUERY (pdr <* USEDIN(ppd, 'STEP_MERGED_AP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ((pdr.used_representation.name = 'quantity') AND (SIZEOF(pdr.used_representation.items) = 1)) AND (SIZEOF(QUERY (i <* pdr.used_representation.items| ('STEP_MERGED_AP_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF(i)) AND (i.name = 'quantity measure'))) = 1))) = 1))) = 0))) = 0;
      WR6:
         SIZEOF(QUERY (pd <* part_occurrences| (pd.name = 'specified instance') AND (SIZEOF(QUERY (pdor <* USEDIN(pd, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE')| ('STEP_MERGED_AP_SCHEMA.SPECIFIED_HIGHER_USAGE_OCCURRENCE' IN TYPEOF(pdor.occurrence_usage)))) = 0))) = 0;
END_RULE;

[Top Level Definitions] [Exit]

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