(*
 * $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/
 *)

(*schema_mapping assembly_module_with_cable_component_2d(Assembly_module_with_cable_component_2d_arm, Assembly_module_with_cable_component_2d_mim);*)


entity_mapping Routed_cable_component_2d_shape_model(Routed_cable_component_2d_shape_model, shape_representation);

mapping_constraints;
shape_representation <=
representation
{representation
[representation.name = 'ppsm']
[representation.description = 'routed cable component shape model']}

end_mapping_constraints;

attribute_mapping shape_characterized_component(shape_characterized_component, $PATH, Cable_component);
shape_representation <=
representation <-
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation =>
shape_definition_representation}
property_definition_representation.definition ->
property_definition =>
product_definition_shape =>
assembly_component =>
physical_component =>
cable_component

end_attribute_mapping;

attribute_mapping cable_path_shape(cable_path_shape, $PATH, Curve);
shape_representation <=
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
curve

end_attribute_mapping;

attribute_mapping junction_placement(junction_placement, $PATH, geometric_model_element_relationship);
shape_representation <=
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
geometric_model_element_relationship

end_attribute_mapping;

attribute_mapping connector_placement(connector_placement, $PATH, Sub_model_placement_2d);
shape_representation <=
representation
representation.items[i] ->
representation_item =>
{representation_item.name = 'sub model placement 2d'}
mapped_item

end_attribute_mapping;

end_entity_mapping;

entity_mapping Sub_model_placement_2d(Sub_model_placement_2d, mapped_item);

mapping_constraints;
{mapped_item <=
representation_item
representation_item.name = 'sub model placement 2d'}
			
end_mapping_constraints;

attribute_mapping sub_model(sub_model, $PATH, Component_2d_location_armx);

					mapped_item 
					mapped_item.mapping_source -> 
					representation_map 
					representation_map.mapping_origin -> 
					{representation_item => 
					{representation_item 
					representation_item.name = 'component assembly 2d position'} 
					mapped_item}
					representation_item <-
					representation.items[i]
					{[representation.name = 'ppsm'] 
					[representation.id = 'ac2ds']}
					{representation =>
					shape_representation}
					representation <-
					representation_relationship.rep_1					
					representation_relationship =>
					representation_relationship_with_transformation =>
					component_2d_location
				
end_attribute_mapping;

attribute_mapping placement(placement, $PATH, axis2_placement_2d);
mapped_item
mapped_item.mapping_target ->
axis2_placement_2d

end_attribute_mapping;

end_entity_mapping;
(*end_schema_mapping;*)
