(*
 * $Id$
 *
 * JSDAI(TM), a way to implement STEP, ISO 10303
 * Copyright (C) 1997-2008, LKSoftWare GmbH, Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License
 * version 3 as published by the Free Software Foundation (AGPL v3).
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * JSDAI is a registered trademark of LKSoftWare GmbH, Germany
 * This software is also available under commercial licenses.
 * See also http://www.jsdai.net/
 *)

(*
   Derived from ISO TC184/SC4/WG12 N - ISO/CD-TS 10303-xxxx Assembly module design - EXPRESS ARM 
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)

SCHEMA Assembly_module_design_xim;

USE FROM Assembly_module_usage_view_xim;

USE FROM Altered_package_xim;

USE FROM Bare_die_xim;

USE FROM Physical_component_feature_xim;

USE FROM Part_template_extension_xim;

USE FROM Assembly_module_design_mim;

	SUBTYPE_CONSTRAINT physical_component_subtypes FOR Physical_component_armx;         
	    ONEOF (Bare_die_component_armx,
		Packaged_component_armx,
		Routed_interconnect_component_armx,
		Routed_physical_component_armx);    
	END_SUBTYPE_CONSTRAINT;

	SUBTYPE_CONSTRAINT amd_physical_component_terminal_subtypes FOR Physical_component_terminal_armx;         
	    ONEOF (Bare_die_component_terminal,
		Minimally_defined_component_terminal,
		Packaged_component_join_terminal);    
	END_SUBTYPE_CONSTRAINT;

 	TYPE assembled_feature_select = EXTENSIBLE GENERIC_ENTITY SELECT
 		(Bare_die_component_terminal,
     	Component_mounting_feature_armx,
 		Packaged_component_join_terminal);
	END_TYPE;

	TYPE assembly_module_or_assembly_group_component = 
		EXTENSIBLE GENERIC_ENTITY SELECT 
		(Assembly_module);
	END_TYPE;

  ENTITY Assembly_connection_zone_position_relationship
  	(* CONNOTATIONAL *) SUBTYPE OF (representation_relationship_with_transformation);
      SELF\representation_relationship.rep_1 RENAMED associating_design_view_shape 								: Shape_representation;
      associated_usage                            																								: Connection_zone_in_design_view;
      SELF\representation_relationship.rep_2 RENAMED associated_connection_zone_shape_definition 	: Shape_representation;
      associated_usage_placement                  																								: axis2_placement;
      associating_design_view                     																								: Assembly_module;
    DERIVE
      SELF\representation_relationship.description : text := ?;
      SELF\representation_relationship_with_transformation.transformation_operator : transformation := ?;
      SELF\representation_relationship.name : label := ?;
  END_ENTITY;

  ENTITY Assembly_module
    (* CONNOTATIONAL *) SUBTYPE OF (Part_design_view, Assembly_definition_armx);
    DERIVE
      SELF\Product_view_definition.additional_characterization : STRING := 'assembly module';  
  END_ENTITY;

  ENTITY Bare_die_component_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Assembly_definition_armx, Physical_component_armx, Single_instance, bare_die_component);
      SELF\Definition_based_product_occurrence.derived_from : Bare_die_armx;
    DERIVE
      SELF\Product_view_definition.name_x : STRING := '';
  END_ENTITY;

  ENTITY Bare_die_component_terminal
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_terminal_armx);
      SELF\Component_feature_armx.definition           : Bare_die_terminal_armx;
      SELF\Component_feature_armx.associated_component(* TEMP-CF *) : Bare_die_component_armx;
  END_ENTITY;

  ENTITY Component_external_reference
  	(* CONNOTATIONAL *) SUBTYPE OF (representation);
      design_owner          : STRING;
      part_number           : STRING;
      revision_code         : STRING;
      product_definition_id : STRING;
      reference_designation : STRING;
    DERIVE
      SELF\representation.items : SET [1:?] OF representation_item := ?;
      SELF\representation.context_of_items : representation_context := ?;
      SELF\representation.name : label := ?;
  END_ENTITY;

  ENTITY Component_feature_external_reference
  	(* CONNOTATIONAL *) SUBTYPE OF (descriptive_representation_item);
      associated_component 																					: Component_external_reference;
    DERIVE
      SELF\descriptive_representation_item.description : text := ?; 
    UNIQUE
      UR1 : associated_component, description;
  END_ENTITY;

  ENTITY Component_mounting_clearance_relationship
  	(* CONNOTATIONAL *) SUBTYPE OF (representation);
      feature_relationship : Component_feature_relationship_armx;
      mounting_clearance   : Length_tolerance_characteristic;
    DERIVE
     SELF\representation.items : SET [1:?] OF representation_item := ?;
     SELF\representation.context_of_items : representation_context := ?;
     SELF\representation.name : label := ?;
  END_ENTITY;

  ENTITY Component_mounting_feature_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_feature_armx, component_mounting_feature);
      SELF\Component_feature_armx.definition : Part_mounting_feature_armx;
  END_ENTITY;

  ENTITY Component_overlap_relationship
  	(* CONNOTATIONAL *) SUBTYPE OF (representation);
      previously_placed_component : next_assembly_usage_occurrence;
      current_component           : next_assembly_usage_occurrence;
      added_clearance             : Length_tolerance_characteristic;
    DERIVE
      SELF\representation.items : SET [1:?] OF representation_item := ?;
      SELF\representation.context_of_items : representation_context := ?;
      SELF\representation.name : label := ?;
  END_ENTITY;

  ENTITY Minimally_defined_component_terminal
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_terminal_armx);
      SELF\Component_feature_armx.definition : Part_terminal_external_reference;
    DERIVE
      SELF\shape_aspect.description : text := 'minimally defined component terminal';
  END_ENTITY;

  ENTITY Movable_packaged_component_join_terminal
    (* CONNOTATIONAL *) SUBTYPE OF (Packaged_component_join_terminal);
      wire_terminal_length      : Length_tolerance_characteristic;
    WHERE
      WR1 : SIZEOF(QUERY(pt <* SELF\Component_feature_armx.definition\Packaged_part_terminal_armx.terminal_of_package | NOT('ASSEMBLY_MODULE_DESIGN_xim.WIRE_TERMINAL_ARMX' IN TYPEOF (pt))) = 0);
  END_ENTITY;

  ENTITY Packaged_component_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_armx, Single_instance, packaged_component);
      SELF\Definition_based_product_occurrence.derived_from : Packaged_part_armx;
      selected_package_alternate               							: OPTIONAL Altered_package;
    INVERSE
      access_mechanism : SET[1:?] OF packaged_component_join_terminal FOR containing_shape(* TEMP-AC! *);
  END_ENTITY;

  ENTITY Packaged_component_join_terminal
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_terminal_armx);
      SELF\Component_feature_armx.definition           : Packaged_part_join_terminal;
      SELF\Component_feature_armx.associated_component(* TEMP-CF *) : Packaged_component_armx;
    DERIVE
      SELF\shape_aspect.description : text := 'packaged component join terminal';
  END_ENTITY;

  ENTITY Pca
    (* CONNOTATIONAL *) SUBTYPE OF (Assembly_module, assembly_definition);
      SELF\Part_design_view.usage_view : Pca_usage_view;
  END_ENTITY;

  ENTITY Routed_interconnect_component_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_armx, routed_interconnect_component);
      routed_centreline_shape : Planar_path_shape_model_with_parameters;
    DERIVE
      SELF\Product_view_definition.name_x : STRING := '';
  END_ENTITY;

  ENTITY Routed_physical_component_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Physical_component_armx, routed_physical_component);
      routed_centreline_shape : Planar_path_shape_model_with_parameters;
  END_ENTITY;

END_SCHEMA;


