(*
   $Id$
   ISO TC184/SC4/WG12 N4144 - ISO/TS 10303-1732 Physical unit usage view - EXPRESS MIM
   Supersedes ISO TC184/SC4/WG12 N3580
*)


SCHEMA Physical_unit_usage_view_mim;
USE FROM Analytical_model_mim;	-- ISO/TS 10303-1603
USE FROM Feature_and_connection_zone_mim;	-- ISO/TS 10303-1671
USE FROM Item_definition_structure_mim;	-- ISO/TS 10303-1345
USE FROM Part_feature_location_mim;	-- ISO/TS 10303-1714
USE FROM Requirement_assignment_mim;	-- ISO/TS 10303-1233
USE FROM Shape_composition_mim;	-- ISO/TS 10303-1742
	
USE FROM application_context_schema(application_context_element);
USE FROM material_property_definition_schema(property_definition_relationship);

  TYPE puuv_groupable_item = SELECT BASED_ON groupable_item WITH 
    (shape_aspect);
  END_TYPE; 

  TYPE puuv_requirement_assigned_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON requirement_assigned_item WITH 
    (shape_aspect);
  END_TYPE;

  TYPE puuv_document_reference_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON document_reference_item WITH 
    (shape_aspect);
  END_TYPE;
	
  ENTITY connection_zone_map_identification
    SUBTYPE OF (shape_aspect,representation_relationship);
      SELF\representation_relationship.rep_1 : usage_view_connection_zone_terminal_shape_relationship;
      SELF\representation_relationship.rep_2 : usage_view_connection_zone_terminal_shape_relationship;
    WHERE
      WR1: SELF\representation_relationship.rep_2 :<>:
        SELF\representation_relationship.rep_1;
  END_ENTITY; 

  ENTITY make_from_part_feature_relationship
    SUBTYPE OF (shape_aspect, shape_aspect_relationship);
    UNIQUE
      UR1: SELF\shape_aspect_relationship.relating_shape_aspect, 
        SELF\shape_aspect_relationship.related_shape_aspect;
    WHERE
      WR1: SELF\shape_aspect.product_definitional = FALSE;
  END_ENTITY; 

  ENTITY part_feature_template_definition
    SUBTYPE OF (shape_feature_definition, group);
    WHERE
      WR1: SELF\group.name = SELF\characterized_object.name;
      WR2: SELF\group.description = SELF\characterized_object.description;
  END_ENTITY;
	
  ENTITY physical_unit
    SUBTYPE OF (product_definition, product_definition_shape);
    DERIVE
      SELF\property_definition.definition : physical_unit := SELF;
    WHERE
      WR1: SIZEOF (USEDIN (SELF, 'BASIC_ATTRIBUTE_SCHEMA.' +'NAME_ATTRIBUTE.NAMED_ITEM')) = 0;
      WR2: NOT EXISTS(SELF\property_definition.description);
  END_ENTITY;

  ENTITY usage_view_connection_zone_terminal_shape_relationship
    SUBTYPE OF (representation, representation_relationship_with_transformation);
      SELF\representation_relationship.rep_1 : shape_representation;
      SELF\representation_relationship.rep_2 : shape_representation;    
    UNIQUE
      UR1: SELF\representation_relationship.rep_1, SELF\representation_relationship.rep_2;
    WHERE
      WR1: SELF\representation_relationship.rep_1 <> 
        SELF\representation_relationship.rep_2;
  END_ENTITY; 

END_SCHEMA;


