(*
   $Id$
   ISO TC184/SC4/WG12 N4708 - ISO/CD-TS 10303-1310 Draughting element - EXPRESS ARM
*)

SCHEMA Draughting_element_arm;

USE FROM Associative_text_arm; -- ISO/CD-TS 10303-1132

USE FROM Curve_appearance_arm; -- ISO/CD-TS 10303-1003

  TYPE curve_appearance_select = SELECT BASED_ON appearance_select WITH 
    (Curve_appearance, 
     Point_appearance,
     Text_style);
  END_TYPE; 

  TYPE draughting_callout_content_select = EXTENSIBLE GENERIC_ENTITY SELECT
    (Generic_annotation_curve, 
    Text);
  END_TYPE; 

  TYPE plane_or_planar_box = SELECT(
    Planar_box,
    Plane);
  END_TYPE; 

  ENTITY Annotation_fill_area 
    SUBTYPE OF (Detailed_geometric_model_element); 
      boundaries : SET [1:?] OF Curve; 
  END_ENTITY; 

  ENTITY Annotation_plane
    SUBTYPE OF (Annotation_element);
      SELF\Styled_element.element : plane_or_planar_box;
  END_ENTITY;

  ENTITY Dimension_curve 
    SUBTYPE OF (Annotation_curve);
      terminator : SET[0:2] OF Terminator;
  END_ENTITY;

  ENTITY Dimension_curve_directed_callout
    SUBTYPE OF (Draughting_callout);
      dimension_curve : Dimension_curve;
    WHERE
      WR1: dimension_curve IN SELF\Draughting_callout.contents;
  END_ENTITY;

  ENTITY Draughting_callout 
    SUPERTYPE OF(ONEOF(
      Dimension_curve_directed_callout,
      Leader_directed_callout,
      Projection_directed_callout))
    SUBTYPE OF (Representation_item);
      contents : LIST [1:?] OF draughting_callout_content_select;
  END_ENTITY;

  ENTITY Fill_area 
    SUBTYPE OF (Annotation_element);
      SELF\Styled_element.element : Annotation_fill_area;
      reference_point             : point_select;
  END_ENTITY;

  ENTITY Generic_annotation_curve
    SUBTYPE OF (Annotation_curve);
  END_ENTITY;

  ENTITY Leader 
    SUBTYPE OF (Annotation_curve);
    curve : Curve;
  END_ENTITY;

  ENTITY Leader_directed_callout
    SUBTYPE OF (Draughting_callout);
      leader : Leader;
    WHERE
      WR1: leader IN SELF\Draughting_callout.contents;
  END_ENTITY;

  ENTITY Projection_curve 
    SUBTYPE OF (Annotation_curve);
  END_ENTITY;

  ENTITY Projection_directed_callout
    SUBTYPE OF (Draughting_callout);
      projection_curve : Projection_curve;
    WHERE
      WR1: projection_curve IN SELF\Draughting_callout.contents;
  END_ENTITY;

  ENTITY Text_style;  
    font_size_scale  : REAL; 
    mirror_placement : OPTIONAL Axis_placement;
    text_colour      : Colour; 
  END_ENTITY;

  SUBTYPE_CONSTRAINT annotation_curve_subtypes FOR Annotation_curve;
    (ONEOF(Leader, Projection_curve, Dimension_curve) ANDOR (Generic_annotation_curve));
  END_SUBTYPE_CONSTRAINT;

END_SCHEMA;
