(*
   $Id$
   ISO TC184/SC4/WG12 N4069 - ISO/TS 10303-1707 Package - EXPRESS MIM
   Supersedes ISO TC184/SC4/WG12 N3499
*)


SCHEMA Package_mim;
	USE FROM Extended_geometric_tolerance_mim;	-- ISO/TS 10303-1666
	USE FROM Part_feature_function_mim;	-- ISO/TS 10303-1712

	SUBTYPE_CONSTRAINT package_part_feature_subtypes FOR shape_aspect; 
		(ONEOF (package_body,
		primary_orientation_feature,
		secondary_orientation_feature,
		tertiary_orientation_feature));
	END_SUBTYPE_CONSTRAINT;

	TYPE p_groupable_item = SELECT BASED_ON groupable_item WITH 
	   (representation_item);
	END_TYPE; 

 	TYPE pa_external_identification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON external_identification_item WITH  
		(package,
		package_terminal_template_definition);
	END_TYPE;

ENTITY visual_orientation_feature
 SUBTYPE OF (shape_aspect);
END_ENTITY;

ENTITY guided_wave_terminal
   SUBTYPE OF (package_terminal);
END_ENTITY;

ENTITY package
 SUBTYPE OF (physical_unit);
END_ENTITY;

ENTITY package_body
 SUBTYPE OF (shape_aspect);
END_ENTITY;

ENTITY package_body_bottom_surface
 SUBTYPE OF (package_body_surface);
END_ENTITY;

ENTITY package_body_edge_segment_surface
  SUBTYPE OF (shape_aspect, shape_aspect_relationship);
    SELF\shape_aspect_relationship.relating_shape_aspect : edge_segment_vertex;
    SELF\shape_aspect_relationship.related_shape_aspect  : edge_segment_vertex;
WHERE
  WR1: SELF\shape_aspect_relationship.relating_shape_aspect :<>:
       SELF\shape_aspect_relationship.related_shape_aspect;
END_ENTITY;

ENTITY package_body_edge_surface
 SUBTYPE OF (package_body_surface);
END_ENTITY;

ENTITY package_body_surface
ABSTRACT SUPERTYPE OF (ONEOF(package_body_top_surface,
                         package_body_edge_surface,
                         package_body_bottom_surface))
 SUBTYPE OF (shape_aspect);
END_ENTITY;

ENTITY package_body_top_surface
 SUBTYPE OF (package_body_surface);
END_ENTITY;

ENTITY package_terminal_template_definition
  SUBTYPE OF (part_feature_template_definition);
END_ENTITY;  

ENTITY package_terminal
 SUPERTYPE OF (guided_wave_terminal 
 	ANDOR primary_reference_terminal)
  SUBTYPE OF (placed_feature);
END_ENTITY;

ENTITY primary_orientation_feature
 SUBTYPE OF (shape_aspect);
WHERE
  WR1: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY;

ENTITY primary_reference_terminal
  SUBTYPE OF (package_terminal);
END_ENTITY;

ENTITY secondary_orientation_feature
 SUBTYPE OF (shape_aspect);
WHERE
 WR1: SELF.product_definitional = TRUE;
END_ENTITY;

ENTITY tertiary_orientation_feature
 SUBTYPE OF (shape_aspect);
WHERE
 WR1: SELF.product_definitional = TRUE;
END_ENTITY;

ENTITY wire_terminal
   SUBTYPE OF (package_terminal);
END_ENTITY;

ENTITY wire_terminal_template_definition
   SUBTYPE OF (package_terminal_template_definition);
END_ENTITY;

END_SCHEMA;


