(*
   $Id$
   ISO TC184/SC4/WG12 N4991 - ISO/CD-TS 10303-1309 Drawing definition - EXPRESS ARM
*)

SCHEMA Drawing_definition_arm;

USE FROM Presentation_hierarchy_arm;

  TYPE dd_view_element_select = SELECT BASED_ON view_element_select WITH 
    (Camera_image_2d_with_scale);
  END_TYPE; 

  TYPE draughting_titled_item = SELECT 
    (Drawing,
     Drawing_sheet);
  END_TYPE;

  ENTITY Camera_image_2d_with_scale
    SUBTYPE OF (Detailed_geometric_model_element);
      is_displaying : presented_model_select;
      source        : Camera_model_d2;
      target        : Planar_box;
  END_ENTITY;

  ENTITY Camera_model_d2
    SUBTYPE OF (Detailed_geometric_model_element);
      view_window          : Planar_box;
      view_window_clipping : BOOLEAN;
  END_ENTITY;

  ENTITY Draughting_title;
    contents : STRING;
    items    : SET [1:?] OF draughting_titled_item;
    language : STRING;
  END_ENTITY;

  ENTITY Drawing_definition; 
    drawing_number : STRING;
    drawing_type   : OPTIONAL STRING;
  END_ENTITY;

  ENTITY Drawing
    SUBTYPE OF (Presentation_set);
      revision_identifier : STRING;
      drawing_identifier  : Drawing_definition;
      intended_scale      : OPTIONAL STRING;
    UNIQUE
      UR1: revision_identifier, drawing_identifier;
  END_ENTITY;
  
  ENTITY Drawing_sequence; 
      predecessor : Drawing;
      successor   : Drawing;
    WHERE
      WR1: predecessor :<>: successor;
  END_ENTITY;
 
  ENTITY Drawing_sheet
    SUBTYPE OF (View_area);
      revision_identifier : STRING;
  END_ENTITY;

  ENTITY Drawing_sheet_sequence 
    SUBTYPE OF (View_area_relationship);
      SELF\View_area_relationship.relating : Drawing_sheet;
      SELF\View_area_relationship.related  : Drawing_sheet;
  WHERE
    WR1: SELF\View_area_relationship.relating :<>: SELF\View_area_relationship.related;
  END_ENTITY;

  SUBTYPE_CONSTRAINT dd_detailed_geometric_model_element_subtypes FOR Detailed_geometric_model_element;
    ONEOF (Camera_model_d2,
      Camera_image_2d_with_scale);
  END_SUBTYPE_CONSTRAINT;

END_SCHEMA;