RULE valid_product_and_manufacturing_information_view_contexts

(* SCHEMA step_merged_ap_schema; *)
-- IN AP242
RULE valid_product_and_manufacturing_information_view_contexts FOR (product_definition_context );
   LOCAL
      design_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.life_cycle_stage = 'design');
      gdt_representation_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'geometrical dimensioning and tolerancing representation');
      machining_feature_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'machining feature');
      material_specification_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'material specification');
      model_based_3d_annotation_presentation_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'model based 3D annotation presentation');
      model_based_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'model based product geometry');
      process_state_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'process state');
      surface_finish_view_contexts : SET OF product_definition_context := QUERY (pdc <* product_definition_context| pdc.frame_of_reference.application = 'surface finish');
      additional_view_contexts : SET OF product_definition_context := gdt_representation_view_contexts + machining_feature_view_contexts + material_specification_view_contexts + model_based_3d_annotation_presentation_view_contexts + process_state_view_contexts + surface_finish_view_contexts;
      need_initial_model_based_view_contexts : SET OF product_definition_context := gdt_representation_view_contexts + model_based_3d_annotation_presentation_view_contexts;
   END_LOCAL;
   WHERE
      WR1:
         SIZEOF(gdt_representation_view_contexts * design_view_contexts) = SIZEOF(gdt_representation_view_contexts);
      WR2:
         SIZEOF(machining_feature_view_contexts * design_view_contexts) = SIZEOF(machining_feature_view_contexts);
      WR3:
         SIZEOF(material_specification_view_contexts * design_view_contexts) = SIZEOF(material_specification_view_contexts);
      WR4:
         SIZEOF(model_based_3d_annotation_presentation_view_contexts * design_view_contexts) = SIZEOF(model_based_3d_annotation_presentation_view_contexts);
      WR5:
         SIZEOF(model_based_view_contexts * design_view_contexts) = SIZEOF(model_based_view_contexts);
      WR6:
         SIZEOF(process_state_view_contexts * design_view_contexts) = SIZEOF(process_state_view_contexts);
      WR7:
         SIZEOF(surface_finish_view_contexts * design_view_contexts) = SIZEOF(surface_finish_view_contexts);
      WR8:
         SIZEOF(QUERY (mbvc <* model_based_view_contexts| (SIZEOF(USEDIN(mbvc, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.FRAME_OF_REFERENCE')) = 0))) = SIZEOF(model_based_view_contexts);
      WR9:
         SIZEOF(QUERY (avc <* additional_view_contexts| (SIZEOF(USEDIN(avc, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION.FRAME_OF_REFERENCE')) = 0))) = SIZEOF(additional_view_contexts);
      WR10:
         SIZEOF(QUERY (nimbvc <* need_initial_model_based_view_contexts| NOT (SIZEOF(QUERY (pdca <* USEDIN(nimbvc, 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.FRAME_OF_REFERENCE')| (pdca\product_definition_context_association.definition\product_definition.frame_of_reference IN model_based_view_contexts))) = SIZEOF(need_initial_model_based_view_contexts)))) = 0;
      WR11:
         SIZEOF(QUERY (gdt_pdc <* gdt_representation_view_contexts| (SIZEOF([ 'ISO 1101', 'ASME Y14.5' ] * get_associated_mandatory_document_ids(gdt_pdc)) = 0))) = 0;
      WR12:
         SIZEOF(QUERY (mb3d_pdc <* model_based_3d_annotation_presentation_view_contexts| (SIZEOF([ 'ISO 1101', 'ISO 16792', 'ASME Y14.41', 'ASME Y14.5' ] * get_associated_mandatory_document_ids(mb3d_pdc)) = 0))) = 0;
END_RULE;

[Top Level Definitions] [Exit]

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