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
2020-07-28T17:02:20-04:00