(*
 $Id$
 ISO TC184/SC4/WG12 N4955 - ISO/CD-TS 10303-1110 Surface conditions - EXPRESS ARM
 Supersedes ISO TC184/SC4/WG12 N2604
*)

SCHEMA Surface_conditions_arm;

USE FROM Dimension_tolerance_arm;

USE FROM Generic_material_aspects_arm;

USE FROM Part_view_definition_arm;

USE FROM Value_with_unit_extension_arm;

  TYPE measuring_gauge_select = EXTENSIBLE GENERIC_ENTITY SELECT (
    Part_view_definition);
  END_TYPE;

  TYPE sf_material_item_select = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON material_item_select WITH
	(Coating_layer);
  END_TYPE;

  TYPE shaped_element_select = SELECT
    (Shape_element,Item_shape);
  END_TYPE;

  TYPE texture_select = SELECT
    (Surface_texture);
  END_TYPE;

  ENTITY Coating_layer
    SUBTYPE OF (Shape_element);
    INVERSE
      thickness : SET[0:1] OF Thickness_size_dimension FOR is_applied_to;
    WHERE
      WR1: SIZEOF(USEDIN(SELF, 'GENERIC_MATERIAL_ASPECTS_ARM.MATERIAL_IDENTIFICATION.ITEMS'))=1;
  END_ENTITY;

  ENTITY Contact_ratio
   SUBTYPE OF (Surface_condition);
     ratio_value     : Measure_item;
     measuring_gauge : measuring_gauge_select;
  END_ENTITY;

  ENTITY Extended_visual_appearance
    SUBTYPE OF (Visual_appearance);
      opacity          : OPTIONAL Measure_item;
      orientation      : OPTIONAL Angle_data_element;
      refraction_index : OPTIONAL Measure_item;  
      texture_map      : Digital_file;  
  END_ENTITY;

  ENTITY Hardness
    SUBTYPE OF (Surface_condition);
      description           : OPTIONAL STRING;      
      depth                 : OPTIONAL Measure_item;      
      environment_condition : SET[0:?] OF STRING;
      hardness_value        : Measure_item;
      measuring_method      : STRING;      
      measuring_position    : OPTIONAL STRING;
  END_ENTITY;

  ENTITY Surface_condition
    ABSTRACT SUPERTYPE OF (ONEOF(Contact_ratio,Hardness,Tactile_appearance,
                         Treatment_result,Visual_appearance,Surface_texture));
      value_determination : OPTIONAL STRING;
  END_ENTITY;

  ENTITY Surface_condition_association;
    describing_surface_condition : Surface_condition;
    described_element            : shaped_element_select;
  END_ENTITY;

  ENTITY Surface_texture
    SUBTYPE OF (Surface_condition);
      measuring_method    : STRING;
      measuring_direction : OPTIONAL Measurement_path;
  END_ENTITY;

  ENTITY Surface_texture_parameter;
    parameter_value   : Measure_item;
    parameter_name    : STRING;
    described_texture : texture_select;
  END_ENTITY;

  ENTITY Tactile_appearance
    SUBTYPE OF (Surface_condition);
      id          : OPTIONAL STRING;
      name        : OPTIONAL STRING;
      depth       : OPTIONAL Measure_item;
      description : OPTIONAL STRING;
  END_ENTITY;

  ENTITY Treatment_result
    SUBTYPE OF (Surface_condition);
      id          : OPTIONAL STRING;
      name        : OPTIONAL STRING;
      description : STRING;
      purpose     : OPTIONAL STRING;
  END_ENTITY;

  ENTITY Visual_appearance
    SUBTYPE OF (Surface_condition);
      id           : OPTIONAL STRING;
      colour_id    : STRING;
      name         : OPTIONAL STRING;
      colour_name  : OPTIONAL STRING;
      lustre       : STRING;
      transparency : OPTIONAL STRING;
      pattern      : OPTIONAL STRING;
  END_ENTITY;
 
END_SCHEMA;
