FUNCTION dimension_of
(* SCHEMA Ap210_electronic_assembly_interconnect_and_packaging_design_mim_lf; *)
FUNCTION dimension_of
(item: geometric_representation_item) : dimension_count;
LOCAL
x : SET OF representation;
y : representation_context;
dim : dimension_count;
END_LOCAL;
-- For cartesian_point, direction, or vector dimension is determined by
-- counting components.
IF 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.CARTESIAN_POINT' IN TYPEOF(item) THEN
dim := SIZEOF(item\cartesian_point.coordinates);
RETURN(dim);
END_IF;
IF 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.DIRECTION' IN TYPEOF(item) THEN
dim := SIZEOF(item\direction.direction_ratios);
RETURN(dim);
END_IF;
IF 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.VECTOR' IN TYPEOF(item) THEN
dim := SIZEOF(item\vector.orientation\direction.direction_ratios);
RETURN(dim);
END_IF;
-- For all other types of geometric_representation_item dim is obtained
-- via context.
-- Find the set of representation in which the item is used.
x := using_representations(item);
-- Determines the dimension_count of the
-- geometric_representation_context. Note that the
-- RULE compatible_dimension ensures that the context_of_items
-- is of type geometric_representation_context and has
-- the same dimension_count for all values of x.
-- The SET x is non-empty since this is required by WR1 of
-- representation_item.
y := x[1].context_of_items;
dim := y\geometric_representation_context.coordinate_space_dimension;
RETURN (dim);
END_FUNCTION;
Referenced By
Defintion dimension_of is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:15:33-04:00