(*
   $Id$
   ISO TC184/SC4/WG12 N3945 - ISO/TS 10303-1666 Extended geometric tolerance - EXPRESS ARM
   Supersedes ISO TC184/SC4/WG12 N3399
*)

SCHEMA Extended_geometric_tolerance_arm;
USE FROM Requirement_decomposition_arm;	-- ISO/TS 10303-1740
USE FROM Default_tolerance_arm;	-- ISO/TS 10303-1052
USE FROM Geometric_tolerance_arm;	-- ISO/TS 10303-1051
USE FROM Non_feature_shape_element_arm;	-- ISO/TS 10303-1706

REFERENCE FROM Requirement_decomposition_arm(get_rvd);	-- ISO/TS 10303-1740
	
  TYPE physical_feature_or_part_template = EXTENSIBLE GENERIC_ENTITY SELECT
    (Shape_element);
  END_TYPE;

  TYPE centre_type = ENUMERATION OF
    (centred_on_arc,
     centred_on_radial);
  END_TYPE;

  TYPE descriptive_or_geometric_orientation = SELECT
    (measure_orientation,
     Direction);
  END_TYPE;

  TYPE dimension_qualifiers = ENUMERATION OF
    (free_state,
     average);
  END_TYPE;

  TYPE dimensional_location_or_dimensional_size = SELECT
    (Size_dimension,
     Location_dimension);
  END_TYPE;

  TYPE egt_external_identification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON external_identification_item WITH  
    (Externally_defined_dimension_representation);
  END_TYPE;

  TYPE egt_requirement_assignment_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON requirement_assignment_item WITH 
	(Restraint_condition, 
	Statistical_dimensional_location,
    Statistical_dimensional_size,
    Statistical_geometric_tolerance);
  END_TYPE; 

  TYPE geometric_or_dimension_select = SELECT
    (Geometric_tolerance,
     Geometric_dimension);
  END_TYPE;

  TYPE geometric_tolerance_qualifiers = ENUMERATION OF
    (pitch_diameter,
     minor_diameter,
     each_element,
     major_diameter,
     each_radial_element,
     not_concave,
     not_convex,
     free_state);
  END_TYPE;

  TYPE locating_or_refinement_linear_profile_tolerance = SELECT
    (Line_profile_tolerance,
     Composite_linear_profile_refinement_tolerance);
  END_TYPE;

  TYPE locating_or_refinement_surface_profile_tolerance = SELECT
    (Surface_profile_tolerance,
     Composite_surface_profile_refinement_tolerance);
  END_TYPE;

  TYPE measure_orientation = ENUMERATION OF
    (reversed,
     normal);
  END_TYPE;

  SUBTYPE_CONSTRAINT egt_non_feature_shape_element_subtypes FOR Non_feature_shape_element; 
	(ONEOF (
     Derived_non_feature_shape_element,
     Directed_axis,
     Positional_boundary,
     Positional_boundary_member,
     Tolerance_zone_boundary,
     Tolerance_zone_boundary_member,
     Viewing_plane,
     Seating_plane,
     Reference_graphic_registration_mark));
  END_SUBTYPE_CONSTRAINT;

  TYPE offset_types = ENUMERATION OF
    (towards_material,
     away_from_material);
  END_TYPE;

  TYPE orientation_select = SELECT
    (Datum_axis_related_orientation,
     Viewing_plane_based_orientation,
     Datum_based_vector_orientation);
  END_TYPE;

  TYPE restrained_item_select = SELECT
    (Single_datum,
     physical_feature_or_part_template);
  END_TYPE;

  TYPE true_profile_representations = EXTENSIBLE SELECT(
    Dimension_set,
    Document_definition,
    Func);
  END_TYPE;

  ENTITY Apex
    SUBTYPE OF (Derived_non_feature_shape_element);
  END_ENTITY;

  ENTITY Boundary_size_characteristic
    ABSTRACT SUPERTYPE OF (ONEOF (Diametrical_boundary_size_characteristic,
      Opposing_boundary_set_size_characteristic));
      tolerance_value         : Length_data_element;
      maximum_tolerance_value : OPTIONAL Length_data_element;
  END_ENTITY;

  ENTITY Centre_axis
    SUBTYPE OF (Centre_of_symmetry);
  WHERE
    WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Centre_of_symmetry
    ABSTRACT SUPERTYPE OF (ONEOF (Centre_axis,
    Centre_plane,
    Centre_point))
    SUBTYPE OF (Derived_non_feature_shape_element);
  END_ENTITY;

  ENTITY Centre_plane
    SUBTYPE OF (Centre_of_symmetry);
  WHERE
    WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Centre_point
    SUBTYPE OF (Centre_of_symmetry);
  WHERE
    WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Composite_linear_profile_refinement_tolerance
    SUBTYPE OF (Line_profile_tolerance);
      refined_control : locating_or_refinement_linear_profile_tolerance;
    WHERE
      WR1 : NOT EXISTS(SELF\Geometric_tolerance.name);
  END_ENTITY;

  ENTITY Composite_surface_profile_refinement_tolerance
    SUBTYPE OF (Surface_profile_tolerance);
      refined_control : locating_or_refinement_surface_profile_tolerance;
    WHERE
      WR1 : NOT EXISTS(SELF\Geometric_tolerance.name);
  END_ENTITY;

  ENTITY Conical_tolerance_zone_boundary
    SUBTYPE OF (Tolerance_zone_boundary);
    INVERSE
      boundary_and_surface_relationships : SET[2:2] OF conical_tolerance_zone_boundary_and_surface_relationship FOR sized_tolerance_zone_boundary;
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Conical_tolerance_zone_boundary_and_surface_relationship;
      sized_tolerance_zone_boundary : Conical_tolerance_zone_boundary;
      terminating_surface           : physical_feature_or_part_template;
      terminating_surface_datum     : OPTIONAL Datum_defined_by_feature;
    INVERSE
      size_characteristic : conical_tolerance_zone_boundary_diametrical_size_characteristic FOR sized_boundary_at_surface;
    WHERE
      WR1: NOT EXISTS(terminating_surface_datum) OR 
          (terminating_surface :=: terminating_surface_datum\Datum_defined_by_feature.defined_by);
  END_ENTITY;

  ENTITY Conical_tolerance_zone_boundary_diametrical_size_characteristic;
    sized_boundary_at_surface : Conical_tolerance_zone_boundary_and_surface_relationship;
    tolerance_value           : Length_data_element;
  END_ENTITY;

  ENTITY Conical_tolerance_zone_definition
    SUBTYPE OF (Tolerance_zone_definition);
  END_ENTITY;

  ENTITY Datum_axis
    SUBTYPE OF (Datum_defined_by_derived_shape);
  END_ENTITY;

  ENTITY Datum_axis_and_tolerance_zone_orienting_relationship;
      oriented_tolerance_zone : Tolerance_zone;
      orienting_datum_axis    : Datum_axis;
    INVERSE
      zone_orientation : datum_axis_related_orientation FOR orienting_relationship;
  END_ENTITY;

  ENTITY Datum_axis_related_orientation;
    orienting_relationship : Datum_axis_and_tolerance_zone_orienting_relationship;
    orientation_type       : centre_type;
  END_ENTITY;

  ENTITY Datum_based_direction_element;
      direction                     : Datum_based_direction_vector;
      angle_value                   : Angle_data_element;
      base_datum_plane              : Datum_plane;
      direction_of_half_datum_plane : Datum_based_direction_vector;
    INVERSE
      elements_of : SET[1:?] OF datum_based_vector_orientation FOR direction_components;
  END_ENTITY;

  ENTITY Datum_based_direction_vector;
    direction_vector_representation : Axis_placement;
    vector_of                       : Datum_plane;
    positive_direction_vector       : BOOLEAN;
  END_ENTITY;

  ENTITY Datum_based_length_measure;
    measure             : Length_data_element;
    measure_orientation : descriptive_or_geometric_orientation;
    of_datum            : Datum_plane;
  END_ENTITY;

  ENTITY Datum_based_vector_orientation;
    direction_components : SET[2:2] OF Datum_based_direction_element;
  END_ENTITY;

  ENTITY Datum_difference;
      precedent_datum  : Datum;
      subsequent_datum : Datum;
  END_ENTITY;

  ENTITY Datum_difference_based_characteristic
    SUBTYPE OF (Representation_item); --characteristic);
      of_datum_difference : Datum_difference;
  END_ENTITY;

  ENTITY Datum_plane
    SUBTYPE OF (Single_datum);
  END_ENTITY;

  ENTITY Datum_point
    SUBTYPE OF (Datum_defined_by_derived_shape);
  END_ENTITY;

  ENTITY Datum_shape_element
	SUBTYPE OF (Datum, Non_feature_shape_element);
  END_ENTITY;

  ENTITY Derived_non_feature_shape_element
    ABSTRACT SUPERTYPE OF (ONEOF (Apex,
      Centre_of_symmetry,
      Linear_extension,
      Geometric_intersection,
      Geometric_alignment,
      Tangent_shape_element))
    SUBTYPE OF (Non_feature_shape_element);
    INVERSE
      deriving_relationships : SET[1:?] OF shape_element_deriving_relationship FOR relating;
  END_ENTITY; 

  ENTITY Diametrical_boundary_size_characteristic
    SUBTYPE OF (Boundary_size_characteristic);
      sized_boundary : Tolerance_zone_circular_or_cylindrical_or_spherical_boundary;
  END_ENTITY; 

  ENTITY Dimension_qualifier
    ABSTRACT SUPERTYPE OF (ONEOF (Pre_defined_dimension_qualifier,
      User_defined_dimension_qualifier));
      qualified_dimensions : SET[1:?] OF Geometric_dimension;
  END_ENTITY;

  ENTITY Dimension_related_positional_boundary
    SUBTYPE OF (Positional_boundary);
      boundary_members                       : SET[1:?] OF Positional_boundary_member;
      constrained_physical_feature           : physical_feature_or_part_template;
      constrained_physical_feature_datum     : OPTIONAL Datum_defined_by_feature;
    WHERE
      WR1: NOT EXISTS(constrained_physical_feature_datum) OR 
          (constrained_physical_feature :=: constrained_physical_feature_datum\Datum_defined_by_feature.defined_by);
  END_ENTITY;

  ENTITY Dimension_related_positional_boundary_definition
    SUBTYPE OF (Positional_boundary_definition);
      SELF\Positional_boundary_definition.defined_positional_boundary : Dimension_related_positional_boundary;
      characterized_boundary_member_definitions                       : SET[1:?] OF Positional_boundary_member_definition;
  END_ENTITY;

  ENTITY Dimension_set;
    associated_dimensions : SET[1:?] OF Geometric_dimension;
  END_ENTITY;

  ENTITY Dimensional_characteristic_representation;
    representation                     : Shape_dimension_representation;
    dimension                          : dimensional_location_or_dimensional_size;
    auxiliary_dimension_representation : BOOLEAN;
  END_ENTITY;

  ENTITY Dimensional_size_based_on_opposing_boundaries
    SUBTYPE OF (Size_dimension);
      boundary_separation           		: Shape_element_locating_relationship;
      SELF\Size_dimension.is_applied_to : Composite_unit_shape_element;
  END_ENTITY;

  ENTITY Directed_axis
    SUBTYPE OF (Non_feature_shape_element);
      axis_to_be_oriented : Centre_axis;
      start_shape_element : Shape_element;
      end_shape_element   : Shape_element;
    UNIQUE
      UR1 : axis_to_be_oriented, start_shape_element;
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Edge_segment_vertex
    SUBTYPE OF (Datum_point);
  END_ENTITY;

  ENTITY Externally_defined_dimension_representation
    SUBTYPE OF (Shape_dimension_representation);
      dimension_value : OPTIONAL Value_with_unit;
    INVERSE
      definitions			: SET[1:?] OF External_source_identification FOR item;
  END_ENTITY;

  ENTITY Geometric_alignment
    SUBTYPE OF (Derived_non_feature_shape_element);
  END_ENTITY;

  ENTITY Geometric_intersection
    SUBTYPE OF (Derived_non_feature_shape_element);
  END_ENTITY;

  ENTITY Geometric_tolerance_qualifier
    ABSTRACT SUPERTYPE OF (ONEOF (Pre_defined_geometric_tolerance_qualifier,
      User_defined_geometric_tolerance_qualifier));
      qualified_geometric_tolerances : SET[1:?] OF Geometric_tolerance;
  END_ENTITY;

  ENTITY Geometric_tolerance_with_applied_material_condition_property
    SUBTYPE OF (Geometric_tolerance);
      applied_material_condition_property_name : material_condition_property_names;
  END_ENTITY; 
  
  ENTITY Limit_dimension_representation
    SUBTYPE OF (Shape_dimension_representation);
      upper_dimension_value : Value_with_unit;
      lower_dimension_value : Value_with_unit;
  END_ENTITY;

  ENTITY Linear_extension
    SUBTYPE OF (Derived_non_feature_shape_element);
  END_ENTITY;

  ENTITY Maximum_dimension_representation
    SUBTYPE OF (Singular_dimension_representation);
  END_ENTITY;

  ENTITY Minimum_dimension_representation
    SUBTYPE OF (Singular_dimension_representation);
  END_ENTITY;

  ENTITY Opposing_boundary_set_size_characteristic
    SUBTYPE OF (Boundary_size_characteristic);
      sized_boundary_set : Tolerance_zone_opposing_boundary_set;
  END_ENTITY;

  ENTITY Parallel_shape_element_relationship
    SUBTYPE OF (Shape_element_relationship);
    WHERE
      WR1 : NOT EXISTS (SELF\Shape_element_relationship.relation_type);
  END_ENTITY;

  ENTITY Perpendicular_shape_element_relationship
    SUBTYPE OF (Shape_element_relationship);
    WHERE
      WR1 : NOT EXISTS (SELF\Shape_element_relationship.relation_type);
  END_ENTITY; 

  ENTITY Positional_boundary
    ABSTRACT SUPERTYPE OF (ONEOF (Profile_related_positional_boundary,
      Dimension_related_positional_boundary))
    SUBTYPE OF (Non_feature_shape_element);
    INVERSE
      boundary_definition : positional_boundary_definition FOR defined_positional_boundary;
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Positional_boundary_and_profile_boundary_member_relationship;
      offset_positional_boundary                  : Profile_related_positional_boundary;
      base_profile_tolerance_zone_boundary_member : Tolerance_zone_boundary_member;
    INVERSE
      offset : positional_boundary_offset FOR offset_boundary_relationship;
  END_ENTITY;

  ENTITY Positional_boundary_definition
    ABSTRACT SUPERTYPE OF (ONEOF (Profile_related_positional_boundary_definition,
      Dimension_related_positional_boundary_definition));
      defined_positional_boundary : Positional_boundary;
  END_ENTITY;

  ENTITY Positional_boundary_member
    SUBTYPE OF (Non_feature_shape_element);
    INVERSE
      composed_positional_boundary : dimension_related_positional_boundary FOR boundary_members;
      boundary_member_definition   : positional_boundary_member_definition FOR defined_positional_boundary_member;
  END_ENTITY;

  ENTITY Positional_boundary_member_definition;
      defined_positional_boundary_member : Positional_boundary_member;
      tolerance_value                    : Length_data_element;
      associated_dimension               : Size_dimension;
    INVERSE
      boundary_definition : dimension_related_positional_boundary_definition FOR characterized_boundary_member_definitions;
  END_ENTITY;

  ENTITY Positional_boundary_offset;
      offset_boundary_relationship : Positional_boundary_and_profile_boundary_member_relationship;
      tolerance_value              : Length_data_element;
    INVERSE
      boundary_definition : profile_related_positional_boundary_definition FOR boundary_offset;
  END_ENTITY;

  ENTITY Pre_defined_dimension_qualifier
    SUBTYPE OF (Dimension_qualifier);
      description : dimension_qualifiers;
  END_ENTITY;

  ENTITY Pre_defined_geometric_tolerance_qualifier
    SUBTYPE OF (Geometric_tolerance_qualifier);
      description : geometric_tolerance_qualifiers;
  END_ENTITY; 

  ENTITY Profile_related_positional_boundary
    SUBTYPE OF (Positional_boundary);
    INVERSE
      associating_relationship : positional_boundary_and_profile_boundary_member_relationship FOR offset_positional_boundary;
  END_ENTITY;

  ENTITY Profile_related_positional_boundary_definition
    SUBTYPE OF (Positional_boundary_definition);
      SELF\Positional_boundary_definition.defined_positional_boundary : Profile_related_positional_boundary;
      boundary_offset                                                 : Positional_boundary_offset;
  END_ENTITY;

  ENTITY Projected_zone_and_base_relationship;
      base_physical_feature           : physical_feature_or_part_template;
      projected_zone                  : Tolerance_zone;
    INVERSE
      size_characteristic : projected_zone_height_characteristic FOR defined_height_of;
    WHERE
      WR1: NOT('SHAPE_PROPERTY_ASSIGNMENT_ARM.SHAPE_ELEMENT' IN TYPEOF(base_physical_feature)) OR
       (SIZEOF(USEDIN(base_physical_feature,'GEOMETRIC_TOLERANCE_ARM.DATUM_DEFINED_BY_FEATURE.DEFINED_BY'))> 0); 
  END_ENTITY;

  ENTITY Projected_zone_height_characteristic;
    defined_height_of      : Projected_zone_and_base_relationship;
    projected_height_value : Length_data_element;
  END_ENTITY;
 
  ENTITY Restraint_condition
    SUPERTYPE OF (Tolerance_specific_restraint_condition);
      applied_to            : restrained_item_select;
	DERIVE
      restraint_description: SET[0:?] OF Requirement_view_definition :=
      get_rvd(SELF, 'restraint description');
	WHERE
      WR1 : (SIZEOF(restraint_description) = 1);
  END_ENTITY;
  
  ENTITY Runout_tolerance_zone_definition_with_specified_angle
    SUBTYPE OF (Tolerance_zone_definition);
      runout_orientation : Runout_zone_orientation;
  END_ENTITY;

  ENTITY Runout_tolerance_zone_orienting_relationship;
      oriented_zone  : Tolerance_zone;
      orienting_axis : Directed_axis;
    INVERSE
      angular_size_characteristic : runout_zone_orientation FOR oriented_relationship;
  END_ENTITY;

  ENTITY Runout_zone_orientation;
      oriented_relationship : Runout_tolerance_zone_orienting_relationship;
      semi_angle_value      : Angle_data_element;
    INVERSE
      zone_definition : runout_tolerance_zone_definition_with_specified_angle FOR runout_orientation;
  END_ENTITY;

  ENTITY Separate_geometric_tolerance_requirement;
    separated_geometric_tolerances : SET[1:?] OF Geometric_tolerance;
  END_ENTITY;

  ENTITY Shape_dimension_representation
    ABSTRACT SUPERTYPE OF (ONEOF (Limit_dimension_representation,
      Singular_dimension_representation,
      externally_defined_dimension_representation));
  END_ENTITY;

  ENTITY Shape_element_deriving_relationship
    SUBTYPE OF (Shape_element_relationship);
      SELF\Shape_element_relationship.relating : Derived_non_feature_shape_element;
    UNIQUE
      UR1 : SELF\Shape_element_relationship.related, 
        SELF\Shape_element_relationship.relating;
  END_ENTITY;

  ENTITY Simultaneous_geometric_tolerance_requirement;
    grouped_geometric_tolerances : SET[2:?] OF Geometric_tolerance;
  END_ENTITY;

  ENTITY Singular_dimension_representation
    ABSTRACT SUPERTYPE OF (ONEOF (Theoretically_exact_dimension_representation,
      Maximum_dimension_representation,
      Minimum_dimension_representation))
    SUBTYPE OF (Shape_dimension_representation);
      dimension_value : Value_with_unit;
  END_ENTITY;

  ENTITY Statistical_dimensional_location
    SUBTYPE OF (Geometric_dimension);
      alternate_dimension             : OPTIONAL Geometric_dimension;
	DERIVE
      statistical_control_requirement: SET[0:?] OF Requirement_view_definition :=
      get_rvd(SELF, 'statistical control requirement');
	WHERE
      WR1 : (SIZEOF(statistical_control_requirement) = 1);
  END_ENTITY;

  ENTITY Statistical_dimensional_size
    SUBTYPE OF (Geometric_dimension);
      alternate_dimension             : OPTIONAL Geometric_dimension;
	DERIVE
      statistical_control_requirement: SET[0:?] OF Requirement_view_definition :=
      get_rvd(SELF, 'statistical control requirement');
	WHERE
      WR1 : (SIZEOF(statistical_control_requirement) = 1);
  END_ENTITY;

  ENTITY Statistical_geometric_tolerance
    SUBTYPE OF (Geometric_tolerance);
      alternate_tolerance             : OPTIONAL Geometric_tolerance;
	DERIVE
      statistical_control_requirement: SET[0:?] OF Requirement_view_definition :=
      get_rvd(SELF, 'statistical control requirement');
	WHERE
      WR1 : (SIZEOF(statistical_control_requirement) = 1);
  END_ENTITY;

  ENTITY Tangent_plane
    SUBTYPE OF (Tangent_shape_element);
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Tangent_shape_element
    SUPERTYPE OF (Tangent_plane)
    SUBTYPE OF (Derived_non_feature_shape_element);
  END_ENTITY;

  ENTITY Theoretically_exact_dimension_representation
    SUBTYPE OF (Singular_dimension_representation);
  END_ENTITY;

  ENTITY Tolerance_specific_restraint_condition
    SUBTYPE OF (Restraint_condition);
      affected_tolerances : SET[1:?] OF geometric_or_dimension_select;
  END_ENTITY;

  ENTITY Tolerance_zone_and_viewing_plane_orienting_relationship;
      orienting_viewing_plane : Viewing_plane;
      oriented_tolerance_zone : Tolerance_zone;
    INVERSE
      zone_orientation : viewing_plane_based_orientation FOR orienting_relationship;
  END_ENTITY;

  ENTITY Tolerance_zone_boundary
    ABSTRACT SUPERTYPE OF (ONEOF (Tolerance_zone_circular_or_cylindrical_or_spherical_boundary,
      Tolerance_zone_opposing_boundary_set,
      Conical_tolerance_zone_boundary))
    SUBTYPE OF (Non_feature_shape_element);
  END_ENTITY;

  ENTITY Tolerance_zone_boundary_member
    SUBTYPE OF (Non_feature_shape_element);
    INVERSE
      explicit_opposing_boundary_set : tolerance_zone_explicit_opposing_boundary_set FOR boundary_members;
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Tolerance_zone_boundary_member_offset;
    offset_tolerance_zone_boundary_member : Tolerance_zone_boundary_member;
    offset_value                          : Length_data_element;
    type_of_offset                        : offset_types;
  END_ENTITY;

  ENTITY Tolerance_zone_circular_or_cylindrical_or_spherical_boundary
    SUBTYPE OF (Tolerance_zone_boundary);
    INVERSE
      size_characteristic : diametrical_boundary_size_characteristic FOR sized_boundary;
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Tolerance_zone_definition_with_per_unit_size_specification
    SUBTYPE OF (Tolerance_zone_definition);
      per_unit_size_specification : Tolerance_zone_per_unit_size_specification;
  END_ENTITY;

  ENTITY Tolerance_zone_definition_with_specified_orientation
    SUBTYPE OF (Tolerance_zone_definition);
      zone_orientation : orientation_select;
  END_ENTITY;

  ENTITY Tolerance_zone_explicit_opposing_boundary_set
    SUBTYPE OF (Tolerance_zone_opposing_boundary_set);
      boundary_members : SET[2:2] OF Tolerance_zone_boundary_member;
  END_ENTITY;

  ENTITY Tolerance_zone_form;
    name                         : STRING; 
    characterized_tolerance_zone : Tolerance_zone;
  END_ENTITY;

  ENTITY Tolerance_zone_implicit_opposing_boundary_set
    SUBTYPE OF (Tolerance_zone_opposing_boundary_set);
  END_ENTITY;

  ENTITY Tolerance_zone_opposing_boundary_set
    ABSTRACT SUPERTYPE OF (ONEOF (Tolerance_zone_explicit_opposing_boundary_set,
      Tolerance_zone_implicit_opposing_boundary_set))
    SUBTYPE OF (Tolerance_zone_boundary);
    INVERSE
      size_characteristic : opposing_boundary_set_size_characteristic FOR sized_boundary_set;
  END_ENTITY;

  ENTITY Tolerance_zone_per_unit_size_specification;
      specified_tolerance_zone : Tolerance_zone;
      per_unit_size            : SET[1:2] OF Length_data_element;
    INVERSE
      zone_definition : tolerance_zone_definition_with_per_unit_size_specification FOR per_unit_size_specification;
  END_ENTITY;

  ENTITY True_profile;
    profiled_surface           : physical_feature_or_part_template;
    profiled_surface_datum     : OPTIONAL Datum_defined_by_feature;
    profile_representation     : true_profile_representations;
   WHERE
    WR1: NOT EXISTS(profiled_surface_datum) OR 
          (profiled_surface :=: profiled_surface_datum\Datum_defined_by_feature.defined_by);
  END_ENTITY;

  ENTITY User_defined_dimension_qualifier
    SUBTYPE OF (Dimension_qualifier);
      name        : STRING; 
      description : STRING; 
  END_ENTITY;

  ENTITY User_defined_geometric_tolerance_qualifier
    SUBTYPE OF (Geometric_tolerance_qualifier);
      name        : STRING; 
      description : STRING; 
  END_ENTITY;

  ENTITY Viewing_plane
    SUBTYPE OF (Non_feature_shape_element);
    INVERSE
      viewing_plane_specification : viewing_plane_definition FOR defined_viewing_plane;
    WHERE
      WR1 : NOT EXISTS(SELF\Shape_element.description);
  END_ENTITY;

  ENTITY Viewing_plane_based_orientation;
    orienting_relationship      : Tolerance_zone_and_viewing_plane_orienting_relationship;
    viewing_plane_specification : Viewing_plane_definition;
  END_ENTITY;

  ENTITY Viewing_plane_definition;
      defined_viewing_plane        : Viewing_plane;
      viewing_plane_representation : Axis_placement;
    INVERSE
      zone_orientation : viewing_plane_based_orientation FOR viewing_plane_specification;
  END_ENTITY;

END_SCHEMA;
