(*
 * $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 dimension_tolerance(Dimension_tolerance_arm, Dimension_tolerance_mim);*)


entity_mapping Document_assignment(Document_assignment, (applied_document_reference)(* alternative moved to Partial_document... (applied_document_usage_constraint_assignment) *))
extended;

attribute_mapping is_assigned_to(is_assigned_to, ($PATH)($PATH), Externally_defined_size_dimension);
(
applied_document_reference
{applied_document_reference <=
document_reference
document_reference.assigned_document ->
document
document.description = 'external size dimension specification' }
applied_document_reference.items[i] ->
document_reference_item
document_reference_item *> 
dimension_tolerance_document_reference_item
dimension_tolerance_document_reference_item = externally_defined_dimension_definition
externally_defined_dimension_definition
       )
(* alternative moved to Partial_document... (applied_document_usage_constraint_assignment)       
(
applied_document_usage_constraint_assignment
{applied_document_usage_constraint_assignment <=
document_usage_constraint_assignment
document_usage_constraint_assignment.assigned_document_usage ->
document_usage_constraint
document_usage_constraint.source ->
document
document.description = 'external size dimension specification' }
applied_document_usage_constraint_assignment.items[i] ->
document_reference_item
document_reference_item *> 
dimension_tolerance_document_reference_item
dimension_tolerance_document_reference_item  = externally_defined_dimension_definition
) *)
end_attribute_mapping;

end_entity_mapping;

entity_mapping Angular_location_dimension(Angular_location_dimension, angular_location);

attribute_mapping orientation(orientation, $PATH, axis2_placement);
angular_location <=
dimensional_location <=
shape_aspect_relationship
shape_definition = shape_aspect_relationship
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_representation.definition

property_definition_representation
property_definition_representation.used_representation ->
representation

representation.items[i] ->
{representation_item
representation_item.name = 'orientation'}
representation_item =>
geometric_representation_item =>
placement =>

(axis2_placement_2d)
(axis2_placement_3d)

end_attribute_mapping;

end_entity_mapping;

entity_mapping Angular_size_dimension(Angular_size_dimension, angular_size);

attribute_mapping full(full, (representation_item.name)(representation_item.name));
((angular_size <= 
dimensional_size
dimensional_characteristic = dimensional_size
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i]  ->
representation_item
{representation_item.name = 'full angle'}))((angular_size <= 
dimensional_size
dimensional_characteristic = dimensional_size
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i]  ->
representation_item
{representation_item.name = 'half angle'}))
end_attribute_mapping;

attribute_mapping major_angle(major_angle, angular_size.angle_selection);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Curved_distance_dimension(Curved_distance_dimension, dimensional_location_with_path);

attribute_mapping used_path(used_path, $PATH, Measurement_path);
dimensional_location_with_path 
dimensional_location_with_path.path -> 
shape_aspect 
shape_definition = shape_aspect 
characterized_definition = shape_definition 
characterized_definition <- 
property_definition.definition 
property_definition 
represented_definition = property_definition 
represented_definition <- 
property_definition_representation.definition 
property_definition_representation 
property_definition_representation.used_representation -> 
representation
end_attribute_mapping;

end_entity_mapping;

entity_mapping Curved_size_dimension(Curved_size_dimension, dimensional_size);

mapping_constraints;
{dimensional_size
dimensional_size.name = 'curve length'}
end_mapping_constraints;

end_entity_mapping;

entity_mapping Diameter_size_dimension(Diameter_size_dimension, dimensional_size);

mapping_constraints;
{dimensional_size
dimensional_size.name = 'diameter'}
end_mapping_constraints;

end_entity_mapping;

entity_mapping Dimension_value_with_limitation(Dimension_value_with_limitation, plus_minus_tolerance);

attribute_mapping defined_by(defined_by, $PATH, Limits_and_fits);
plus_minus_tolerance 
plus_minus_tolerance.range -> 
tolerance_method_definition
tolerance_method_definition = limits_and_fits 
limits_and_fits
end_attribute_mapping;

attribute_mapping limited_value(limited_value, ($PATH)($PATH), measure_representation_item);
((plus_minus_tolerance
plus_minus_tolerance.toleranced_dimension ->
dimensional_characteristic
dimensional_characteristic = dimensional_size
dimensional_size
dimensional_characteristic = dimensional_size
dimensional_characteristic <-
dimensional_characteristic_representation.dimension
dimensional_characteristic_representation
dimensional_characteristic_representation.representation ->
shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
representation_item =>
measure_representation_item))((plus_minus_tolerance
plus_minus_tolerance.toleranced_dimension ->
dimensional_characteristic
dimensional_characteristic = dimensional_location
dimensional_location
dimensional_characteristic = dimensional_location
dimensional_characteristic <-
dimensional_characteristic_representation.dimension
dimensional_characteristic_representation
dimensional_characteristic_representation.representation ->
shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
representation_item =>
measure_representation_item))
end_attribute_mapping;

attribute_mapping defined_by(defined_by, $PATH, Plus_minus_bounds);
plus_minus_tolerance 
plus_minus_tolerance.range -> 
tolerance_method_definition
tolerance_method_definition = tolerance_value 
tolerance_value
end_attribute_mapping;

end_entity_mapping;

entity_mapping Externally_defined_size_dimension(Externally_defined_size_dimension, externally_defined_dimension_definition); (* (([externally_defined_dimension_definition][dimensional_size_with_path]))); *)

mapping_constraints;

externally_defined_dimension_definition <=
externally_defined_item
{ externally_defined_item.item_id -> 
source_item
source_item = 'external size dimension'}
{ externally_defined_item.source -> 
external_source
external_source.source_id ->
source_item
source_item = 'external size dimension specification' }

end_mapping_constraints;

attribute_mapping name(name, dimensional_size.name);
externally_defined_dimension_definition <=
dimensional_size
dimensional_size.name

end_attribute_mapping;

attribute_mapping used_path(used_path, $PATH, Measurement_path);
externally_defined_dimension_definition <=
dimensional_size =>
dimensional_size_with_path 
dimensional_size_with_path.path -> 
shape_aspect 
shape_definition = shape_aspect 
characterized_definition = shape_definition 
characterized_definition <- 
property_definition.definition 
property_definition 
represented_definition = property_definition 
represented_definition <- 
property_definition_representation.definition 
property_definition_representation 
property_definition_representation.used_representation -> 
representation
end_attribute_mapping;

end_entity_mapping;

entity_mapping Geometric_dimension(Geometric_dimension, ((dimensional_location)
)((dimensional_size)));

mapping_constraints;
()()
end_mapping_constraints;

attribute_mapping dimension_value(dimension_value, ($PATH)($PATH), Dimension_value_with_limitation);
((dimensional_location 
dimensional_characteristic = dimensional_location
dimensional_characteristic <-
plus_minus_tolerance.toleranced_dimension
plus_minus_tolerance))((dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <-
plus_minus_tolerance.toleranced_dimension
plus_minus_tolerance))
end_attribute_mapping;

attribute_mapping dimension_value(dimension_value, ($PATH)($PATH), measure_representation_item);
((dimensional_location 
dimensional_characteristic = dimensional_location
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i] -> 
representation_item => 
measure_representation_item) 
)((dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i] -> 
representation_item => 
measure_representation_item) 
)
end_attribute_mapping;

attribute_mapping dimension_value(dimension_value, ($PATH)($PATH), Value_limit);
((dimensional_location 
dimensional_characteristic = dimensional_location
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i] -> 
representation_item => 
measure_representation_item) 
)((dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i] -> 
representation_item => 
measure_representation_item) 
)
end_attribute_mapping;

attribute_mapping dimension_value(dimension_value, ($PATH)($PATH), Tolerance_range);
((dimensional_location 
dimensional_characteristic = dimensional_location
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation) 
)((dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation) 
)
end_attribute_mapping;

attribute_mapping id(id, ((shape_aspect_relationship.name))((identification_assignment.assigned_id)));
((dimensional_location <= 
shape_aspect_relationship 
shape_aspect_relationship.name)  
)((dimensional_size identification_item = dimensional_size 
identification_item <- 
applied_identification_assignment.items[i] 
applied_identification_assignment <= 
identification_assignment 
{identification_assignment.role -> 
identification_role 
identification_role.name = 'size id'} 
identification_assignment.assigned_id))
end_attribute_mapping;

attribute_mapping notes(notes, (descriptive_representation_item.description)(descriptive_representation_item.description));
((dimensional_location 
dimensional_characteristic = dimensional_location
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i] -> 
representation_item 
{representation_item.name = 'dimensional note'} 
representation_item => 
descriptive_representation_item
{(descriptive_representation_item.description)
(descriptive_representation_item.description = 'auxiliary')
(descriptive_representation_item.description = 'theoretical')}) 
)((dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <- 
dimensional_characteristic_representation.dimension 
dimensional_characteristic_representation 
dimensional_characteristic_representation.representation -> 
shape_dimension_representation <= 
shape_representation <=  
representation  
representation.items[i] -> 
representation_item 
{representation_item.name = 'dimensional note'} 
representation_item => 
descriptive_representation_item
{( descriptive_representation_item.description)
(descriptive_representation_item.description = 'auxiliary')
(descriptive_representation_item.description = 'theoretical')}) 
)
end_attribute_mapping;

end_entity_mapping;

entity_mapping Height_size_dimension(Height_size_dimension, ((dimensional_size))((dimensional_size_with_path)));

mapping_constraints;
({dimensional_size
dimensional_size.name = 'height'})({dimensional_size_with_path <=
dimensional_size
dimensional_size.name = 'height'})
end_mapping_constraints;

attribute_mapping used_path(used_path, $PATH, Measurement_path);
dimensional_size_with_path 
dimensional_size_with_path.path -> 
shape_aspect 
shape_definition = shape_aspect 
characterized_definition = shape_definition 
characterized_definition <- 
property_definition.definition 
property_definition 
represented_definition = property_definition 
represented_definition <- 
property_definition_representation.definition 
property_definition_representation 
property_definition_representation.used_representation -> 
representation
end_attribute_mapping;

end_entity_mapping;

entity_mapping Length_size_dimension(Length_size_dimension, ((dimensional_size))((dimensional_size_with_path)));

mapping_constraints;
({dimensional_size
dimensional_size.name = 'length'})({dimensional_size_with_path <=
dimensional_size
dimensional_size.name = 'length'})
end_mapping_constraints;

attribute_mapping used_path(used_path, $PATH, Measurement_path);
dimensional_size_with_path 
dimensional_size_with_path.path -> 
shape_aspect 
shape_definition = shape_aspect 
characterized_definition = shape_definition 
characterized_definition <- 
property_definition.definition 
property_definition 
represented_definition = property_definition 
represented_definition <- 
property_definition_representation.definition 
property_definition_representation 
property_definition_representation.used_representation -> 
representation
end_attribute_mapping;

end_entity_mapping;
(* Entity with the same name is taken from AIM
entity_mapping Limits_and_fits(Limits_and_fits, limits_and_fits);

attribute_mapping deviation(deviation, limits_and_fits.form_variance);

end_attribute_mapping;

attribute_mapping fitting_type(fitting_type, limits_and_fits.zone_variance);

end_attribute_mapping;

attribute_mapping grade(grade, limits_and_fits.grade);

end_attribute_mapping;

end_entity_mapping;
*)
entity_mapping Linear_distance_dimension(Linear_distance_dimension, ((dimensional_location))((directed_dimensional_location)));

mapping_constraints;
((dimensional_location <=
shape_aspect_relationship
{shape_aspect_relationship.name = 'linear distance'}))((directed_dimensional_location <= dimensional_location <=
shape_aspect_relationship
{shape_aspect_relationship.name = 'linear distance'}))
end_mapping_constraints;

attribute_mapping orientation(orientation, $PATH, axis2_placement);
dimensional_location <=
shape_aspect_relationship
shape_definition = shape_aspect_relationship
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_representation.definition

property_definition_representation
property_definition_representation.used_representation ->
representation

representation.items[i] ->
{representation_item
representation_item.name = 'orientation'}
representation_item =>
geometric_representation_item =>
placement =>

(axis2_placement_2d)
(axis2_placement_3d)

end_attribute_mapping;

end_entity_mapping;

entity_mapping Location_dimension(Location_dimension, dimensional_location);


attribute_mapping directed(directed, $IDENTICAL_MAPPING); (* It has to be directed_dimensional_location subtype *)

end_attribute_mapping;

attribute_mapping origin(origin, $PATH, element_with_dimension_select);
dimensional_location <= 
  shape_aspect_relationship
end_attribute_mapping;

attribute_mapping origin(origin, $PATH, placed_element_select);
dimensional_location <= 
shape_aspect_relationship 
shape_aspect_relationship.relating_shape_aspect
end_attribute_mapping;

attribute_mapping origin(origin, $PATH, Shape_element);
(dimensional_location <= 
shape_aspect_relationship 
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect)
end_attribute_mapping;

attribute_mapping origin(origin, $PATH, Derived_geometry);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
derived_shape_aspect

end_attribute_mapping;

attribute_mapping origin(origin, $PATH, constructive_element_select);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item 


end_attribute_mapping;

attribute_mapping origin(origin, $PATH, Curve);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
curve

end_attribute_mapping;

attribute_mapping origin(origin, $PATH, Point_on_curve);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
point  =>
point_on_curve

end_attribute_mapping;

attribute_mapping origin(origin, ($PATH)($PATH), Point_on_surface);
((dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
point =>
point_on_surface)
)((dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
point =>
degenerate_pcurve)
)
end_attribute_mapping;

attribute_mapping origin(origin, ($PATH)($PATH), Surface);
(dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
surface
)(dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
surface =>
oriented_surface
)
end_attribute_mapping;

attribute_mapping target(target, $PATH, placed_element_select);
dimensional_location <= 
shape_aspect_relationship 
shape_aspect_relationship.related_shape_aspect
end_attribute_mapping;

attribute_mapping target(target, $PATH, element_with_dimension_select);
dimensional_location <= 
  shape_aspect_relationship
  shape_aspect_relationship.related_shape_aspect
end_attribute_mapping;

attribute_mapping target(target, $PATH, Shape_element);
dimensional_location <= 
shape_aspect_relationship 
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
end_attribute_mapping;

attribute_mapping target(target, $PATH, Derived_geometry);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
derived_shape_aspect

end_attribute_mapping;

attribute_mapping target(target, $PATH, constructive_element_select);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item


end_attribute_mapping;

attribute_mapping target(target, $PATH, Curve);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
curve

end_attribute_mapping;

attribute_mapping target(target, $PATH, Point_on_curve);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
point =>
point_on_curve

end_attribute_mapping;

attribute_mapping target(target, ($PATH)($PATH), Point_on_surface);
((dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
point =>
point_on_surface)
)((dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
point =>
degenerate_pcurve)
)
end_attribute_mapping;

attribute_mapping target(target, ($PATH)($PATH), Surface);
(dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
surface
)(dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
shape_definition = shape_aspect
shape_definition
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition
represented_definition = property_definition
represented_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
representation_item =>
geometric_representation_item =>
surface =>
oriented_surface
)
end_attribute_mapping;

attribute_mapping description(description, shape_aspect_relationship.description
);
dimensional_location <=
shape_aspect_relationship
shape_aspect_relationship.description

end_attribute_mapping;

end_entity_mapping;

entity_mapping Plus_minus_bounds(Plus_minus_bounds, tolerance_value);

attribute_mapping lower_bound(lower_bound, $PATH, measure_with_unit);
tolerance_value
tolerance_value.lower_bound ->
measure_with_unit
end_attribute_mapping;

attribute_mapping significant_digits(significant_digits, precision_qualifier.precision_value);
[tolerance_value
tolerance_value.lower_bound ->
measure_with_unit <-]
[tolerance_value
tolerance_value.upper_bound ->
measure_with_unit <-]
measure_qualification.qualified_measure
measure_qualification
measure_qualification.qualifiers[i] ->
value_qualifier
value_qualifier = precision_qualifier
precision_qualifier
precision_qualifier.precision_value
end_attribute_mapping;

attribute_mapping upper_bound(upper_bound, $PATH, measure_with_unit);
tolerance_value
tolerance_value.upper_bound ->
measure_with_unit
end_attribute_mapping;

attribute_mapping value_determination(value_determination, type_qualifier.name);
tolerance_value
[tolerance_value.lower_bound ->]
[tolerance_value.upper_bound ->] 
measure_with_unit <- 
measure_qualification.qualified_measure measure_qualification 
measure_qualification.qualifiers[i] -> 
value_qualifier value_qualifier = type_qualifier type_qualifier 
type_qualifier.name
{(type_qualifier.name)
(type_qualifier.name = 'required')
(type_qualifier.name = 'designed')
(type_qualifier.name = 'calculated')
(type_qualifier.name = 'measured')
(type_qualifier.name = 'estimated')}
end_attribute_mapping;

end_entity_mapping;

entity_mapping Radial_size_dimension(Radial_size_dimension, dimensional_size);

mapping_constraints;
{dimensional_size
dimensional_size.name = 'radius'}
end_mapping_constraints;

attribute_mapping radius_type(radius_type, (descriptive_representation_item.description)(descriptive_representation_item.description));
(dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <-
dimensional_characteristic_representation.dimension
dimensional_characteristic_representation
dimensional_characteristic_representation.representation ->
shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
representation_item
{representation_item.name = 'radius type'}
representation_item =>
descriptive_representation_item
{descriptive_representation_item.description = 'centred'})
(dimensional_size 
dimensional_characteristic = dimensional_size
dimensional_characteristic <-
dimensional_characteristic_representation.dimension
dimensional_characteristic_representation
dimensional_characteristic_representation.representation ->
shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
representation_item
{representation_item.name = 'radius type'}
representation_item =>
descriptive_representation_item
{descriptive_representation_item.description = 'adjoining'})
end_attribute_mapping;

end_entity_mapping;

entity_mapping Size_dimension(Size_dimension, dimensional_size);

attribute_mapping is_applied_to(is_applied_to, dimensional_size.applies_to, element_with_dimension_select);
dimensional_size 
dimensional_size.applies_to
end_attribute_mapping;

attribute_mapping is_applied_to(is_applied_to, $PATH, Shape_element);
dimensional_size 
dimensional_size.applies_to ->
shape_aspect
end_attribute_mapping;

attribute_mapping envelope_principle(envelope_principle, representation.name);
dimensional_size
dimensional_characteristic = dimensional_size
dimensional_characteristic <-
dimensional_characteristic_representation.dimension
dimensional_characteristic_representation
dimensional_characteristic_representation.representation ->
shape_dimension_representation <=
shape_representation <=
representation
representation.name
{representation.name = 'envelope tolerance'}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Thickness_size_dimension(Thickness_size_dimension, (dimensional_size)(dimensional_size_with_path));

mapping_constraints;
({dimensional_size
dimensional_size.name = 'thickness size'})((dimensional_size_with_path <= 
dimensional_size)
{dimensional_size.name = 'thickness size'})
end_mapping_constraints;

attribute_mapping used_path(used_path, $PATH, Measurement_path);
dimensional_size_with_path 
dimensional_size_with_path.path -> 
shape_aspect 
shape_definition = shape_aspect 
characterized_definition = shape_definition 
characterized_definition <- 
property_definition.definition 
property_definition 
represented_definition = property_definition 
represented_definition <- 
property_definition_representation.definition 
property_definition_representation 
property_definition_representation.used_representation -> 
representation
end_attribute_mapping;

end_entity_mapping;

entity_mapping Tolerance_range(Tolerance_range, shape_dimension_representation);

attribute_mapping lower_range(lower_range, $PATH, measure_representation_item);
shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
{representation_item
representation_item.name = 'lower range'}
representation_item =>
measure_representation_item
end_attribute_mapping;

attribute_mapping significant_digits(significant_digits, precision_qualifier.precision_value);

shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
representation_item =>
measure_representation_item <=
measure_with_unit <-
measure_qualification.qualified_measure
measure_qualification
measure_qualification.qualifiers[1] ->
value_qualifier = precision_qualifier
precision_qualifier
precision_qualifier.precision_value
end_attribute_mapping;

attribute_mapping upper_range(upper_range, $PATH, measure_representation_item);
shape_dimension_representation <=
shape_representation <=
representation
representation.items[i] ->
{representation_item
representation_item.name = 'upper range'}
representation_item =>
measure_representation_item
end_attribute_mapping;

end_entity_mapping;

entity_mapping Width_size_dimension(Width_size_dimension, ((dimensional_size))((dimensional_size_with_path)));

mapping_constraints;
({dimensional_size
dimensional_size.name = 'width'})({dimensional_size_with_path <=
dimensional_size
dimensional_size.name = 'width'})
end_mapping_constraints;

attribute_mapping used_path(used_path, $PATH, Measurement_path);
dimensional_size_with_path 
dimensional_size_with_path.path -> 
shape_aspect 
shape_definition = shape_aspect 
characterized_definition = shape_definition 
characterized_definition <- 
property_definition.definition 
property_definition 
represented_definition = property_definition 
represented_definition <- 
property_definition_representation.definition 
property_definition_representation 
property_definition_representation.used_representation -> 
representation
end_attribute_mapping;

end_entity_mapping;
(*end_schema_mapping;*)
