(*
   $Id$
   ISO TC184/SC4/WG12 N4759 - ISO/CD-TS 10303-1315 Mechanical design presentation representation with draughting - EXPRESS ARM
*)

SCHEMA Mechanical_design_presentation_representation_with_draughting_arm;

USE FROM Associative_draughting_elements_arm; -- ISO/CD-TS 10303-1311

USE FROM Mechanical_design_geometric_presentation_arm; -- ISO/CD-TS 10303-1313

USE FROM Mechanical_design_shaded_presentation_arm; -- ISO/CD-TS 10303-1314

  TYPE mdprwd_draughting_model_element_select = SELECT BASED_ON draughting_model_element_select WITH 
    (Camera_model_d3);
  END_TYPE; 

  TYPE mdprwd_element_select = EXTENSIBLE GENERIC_ENTITY SELECT 
    (Axis_placement,
    Camera_model_d3); 
  END_TYPE;   

  TYPE mechanical_design_and_draughting_relationship_select = EXTENSIBLE GENERIC_ENTITY SELECT ( 
    Draughting_model,
    Geometric_model,
    Mechanical_design_shaded_styled_model, 
    Mechanical_design_presentation_representation_with_draughting,
    Mechanical_representation_styled_model); 
  END_TYPE; 

  ENTITY Mechanical_design_and_draughting_relationship
    SUBTYPE OF(Definitional_representation_relationship); 
      SELF\representation_relationship.rep_1 : mechanical_design_and_draughting_relationship_select; 
      SELF\representation_relationship.rep_2 : mechanical_design_and_draughting_relationship_select; 
    WHERE    
      WR1: NOT('ASSOCIATIVE_DRAUGHTING_ELEMENTS_ARM.'+'DRAUGHTING_MODEL' IN TYPEOF(rep_2)) OR 
        (SIZEOF(['ASSOCIATIVE_DRAUGHTING_ELEMENTS_ARM.'+'DRAUGHTING_MODEL', 
        'ELEMENTAL_GEOMETRIC_SHAPE_ARM.'+'GEOMETRIC_MODEL'] * TYPEOF(rep_1)) = 1);
      WR2: NOT('MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_ARM.'+'MECHANICAL_REPRESENTATION_STYLED_MODEL' IN TYPEOF(rep_2)) 
        OR (SIZEOF(['MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_ARM.'+'MECHANICAL_REPRESENTATION_STYLED_MODEL', 
        'ELEMENTAL_GEOMETRIC_SHAPE_ARM.'+'GEOMETRIC_MODEL'] * TYPEOF(rep_1)) = 1);
      WR3: NOT('MECHANICAL_DESIGN_SHADED_PRESENTATION_ARM.'+'MECHANICAL_DESIGN_SHADED_STYLED_MODEL' IN TYPEOF(rep_2)) 
        OR (SIZEOF(['MECHANICAL_DESIGN_SHADED_PRESENTATION_ARM.'+'MECHANICAL_DESIGN_SHADED_STYLED_MODEL',
        'ELEMENTAL_GEOMETRIC_SHAPE_ARM.'+'GEOMETRIC_MODEL'] * TYPEOF(rep_1)) = 1);
  END_ENTITY;  

  ENTITY Mechanical_design_presentation_representation_with_draughting
    SUBTYPE OF (Styled_model); 
      SELF\Representation.items : SET [1:?] OF mdprwd_element_select; 
    WHERE 
      WR1: SELF\Representation.context_of_items\Geometric_coordinate_space.dimension_count = 3;
  END_ENTITY; 
 
END_SCHEMA;
