(*
   $Id$
   ISO TC184/SC4/WG12 N4005 - ISO/TS 10303-1686 Interconnect module usage view - EXPRESS ARM
   Supersedes ISO TC184/SC4/WG12 N3447
*)

SCHEMA Interconnect_module_usage_view_arm;

	USE FROM Extended_geometric_tolerance_arm;	-- ISO/TS 10303-1666
	USE FROM Functional_assignment_to_part_arm;	-- ISO/TS 10303-1674
	USE FROM Functional_usage_view_arm;	-- ISO/TS 10303-1705

	TYPE cavity_reference_select = SELECT(
		Interconnect_module_primary_surface,
		Interconnect_module_secondary_surface);
	END_TYPE;

  ENTITY Interconnect_module_cavity_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
      reference_surface : cavity_reference_select;
    WHERE
      WR1 : SELF :<>: reference_surface;
      WR2 : SIZEOF(QUERY(ucur <* USEDIN(SELF,
            'PART_FEATURE_LOCATION_ARM.USAGE_CONCEPT_USAGE_RELATIONSHIP.' +
            'ASSOCIATED_USAGE') | NOT
            ('PART_TEMPLATE_EXTENSION_ARM.PLANAR_CLOSED_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN TYPEOF(ucur.associated_shape_definition))
            )) = 0;  
  END_ENTITY;

  ENTITY Interconnect_module_cutout_segment_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
      composed_surface : Interconnect_module_cutout_surface;
      start_vertex     : Edge_segment_vertex;
      end_vertex       : Edge_segment_vertex;
    WHERE
      WR1 : start_vertex :<>: end_vertex;
      WR2 : SIZEOF(QUERY(ucur <* USEDIN(SELF,
            'PART_FEATURE_LOCATION_ARM.USAGE_CONCEPT_USAGE_RELATIONSHIP.' +
            'ASSOCIATED_USAGE') | NOT
            (('PART_TEMPLATE_EXTENSION_ARM.PLANAR_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN TYPEOF(ucur.associated_shape_definition)) AND NOT
            ('PART_TEMPLATE_EXTENSION_ARM.PLANAR_CLOSED_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN TYPEOF(ucur.associated_shape_definition)))            
            )) = 0;  
  END_ENTITY;

  ENTITY Interconnect_module_cutout_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
  WHERE
    WR1: SIZEOF(QUERY(ucur <* USEDIN(SELF,
         'PART_FEATURE_LOCATION_ARM.USAGE_CONCEPT_USAGE_RELATIONSHIP.' +
         'ASSOCIATED_USAGE') | NOT
         ('PART_TEMPLATE_EXTENSION_ARM.PLANAR_CLOSED_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN
         TYPEOF(ucur.associated_shape_definition)))) = 0;  
  END_ENTITY;

  ENTITY Interconnect_module_edge_segment_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
      composed_surface : Interconnect_module_edge_surface;
      start_vertex     : Edge_segment_vertex;
      end_vertex       : Edge_segment_vertex;
    WHERE
      WR1 : start_vertex :<>: end_vertex;
      WR2 : SIZEOF(QUERY(ucur <* USEDIN(SELF,
            'PART_FEATURE_LOCATION_ARM.USAGE_CONCEPT_USAGE_RELATIONSHIP.' +
            'ASSOCIATED_USAGE') | NOT
            (('PART_TEMPLATE_EXTENSION_ARM.PLANAR_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN TYPEOF(ucur.associated_shape_definition)) AND NOT
            ('PART_TEMPLATE_EXTENSION_ARM.PLANAR_CLOSED_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN TYPEOF(ucur.associated_shape_definition)))            
            )) = 0;  
  END_ENTITY;

  ENTITY Interconnect_module_edge_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
  WHERE
    WR1: SIZEOF(QUERY(ucur <* USEDIN(SELF,
         'PART_FEATURE_LOCATION_ARM.USAGE_CONCEPT_USAGE_RELATIONSHIP.' +
         'ASSOCIATED_USAGE') | NOT
         ('PART_TEMPLATE_EXTENSION_ARM.PLANAR_CLOSED_PATH_SHAPE_MODEL_WITH_PARAMETERS' IN
         TYPEOF(ucur.associated_shape_definition)))) = 0;  
  END_ENTITY;

  ENTITY Interconnect_module_interface_terminal
    SUBTYPE OF (Interconnect_module_terminal);
  END_ENTITY;

  ENTITY Interconnect_module_primary_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
  END_ENTITY;

  ENTITY Interconnect_module_secondary_surface
    SUBTYPE OF (Interconnect_module_surface_feature);
  END_ENTITY;

  ENTITY Interconnect_module_surface_feature
    ABSTRACT SUPERTYPE OF (ONEOF (Interconnect_module_cavity_surface,
 Interconnect_module_cutout_segment_surface,
 Interconnect_module_cutout_surface,
 Interconnect_module_secondary_surface,
 Interconnect_module_primary_surface,
 Interconnect_module_edge_surface,
 Interconnect_module_edge_segment_surface))
    SUBTYPE OF (Part_feature);
      SELF\Part_feature.associated_definition : Interconnect_module_usage_view;
  END_ENTITY;

  ENTITY Interconnect_module_terminal
    SUBTYPE OF (Part_terminal);
      SELF\Shape_feature.connection_area      : OPTIONAL SET[1:?] OF Connection_zone_in_usage_view;            
      SELF\Part_feature.associated_definition : Interconnect_module_usage_view;
  END_ENTITY;

  ENTITY Interconnect_module_terminal_surface_constituent_relationship
    SUBTYPE OF (Shape_element_constituent_relationship);
      SELF\Shape_element_relationship.relating : Interconnect_module_surface_feature;
      SELF\Shape_element_relationship.related  : Interconnect_module_terminal;
  END_ENTITY;

  ENTITY Interconnect_module_usage_view
    SUPERTYPE OF (Pcb_usage_view)
    SUBTYPE OF (Part_usage_view);
      thickness_over_dielectric_requirement : OPTIONAL Length_tolerance_characteristic;
      thickness_over_metal_requirement      : OPTIONAL Length_tolerance_characteristic;
      measurement_condition                 : OPTIONAL Restraint_condition;
      located_thickness_requirement         : OPTIONAL SET[1:?] OF Located_interconnect_module_thickness_requirement;
      implemented_function                  : OPTIONAL Functional_unit_usage_view;
    WHERE
      WR1 : SIZEOF(QUERY(pf <* USEDIN(SELF,
 'INTERCONNECT_MODULE_USAGE_VIEW_ARM.INTERCONNECT_MODULE_SURFACE_FEATURE.ASSOCIATED_DEFINITION') | ('INTERCONNECT_MODULE_USAGE_VIEW_ARM.' + 'INTERCONNECT_MODULE_PRIMARY_SURFACE' IN TYPEOF(pf)))) <= 1;
      WR2 : SIZEOF(QUERY(pf <* USEDIN(SELF,
 'INTERCONNECT_MODULE_USAGE_VIEW_ARM.INTERCONNECT_MODULE_SURFACE_FEATURE.ASSOCIATED_DEFINITION') | ('INTERCONNECT_MODULE_USAGE_VIEW_ARM.' + 'INTERCONNECT_MODULE_SECONDARY_SURFACE' IN TYPEOF(pf)))) <= 1;
      WR3 : SIZEOF(QUERY(pf <* USEDIN(SELF,
 'INTERCONNECT_MODULE_USAGE_VIEW_ARM.INTERCONNECT_MODULE_SURFACE_FEATURE.ASSOCIATED_DEFINITION') | ('INTERCONNECT_MODULE_USAGE_VIEW_ARM.' + 'INTERCONNECT_MODULE_EDGE_SURFACE' IN TYPEOF(pf)))) <= 1;
      WR4 : NOT EXISTS(SELF\Product_view_definition.additional_characterization);
  END_ENTITY;

  ENTITY Located_interconnect_module_thickness_requirement;
      reference_location    : Axis_placement;
      thickness_requirement : Length_tolerance_characteristic;
    INVERSE
      design : SET[1:?] OF interconnect_module_usage_view FOR located_thickness_requirement;
    UNIQUE
      UR1 : design,
 reference_location;
  END_ENTITY;

  ENTITY Pcb_usage_view
    SUBTYPE OF (Interconnect_module_usage_view);
    WHERE
      WR1 : EXISTS(thickness_over_metal_requirement) OR EXISTS(thickness_over_dielectric_requirement);
  END_ENTITY;

END_SCHEMA;

