FUNCTION dimension_of

(* SCHEMA STRUCTURAL_FRAME_SCHEMA; *)

(* Modified for LPM/6 *)
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 'STRUCTURAL_FRAME_SCHEMA.CARTESIAN_POINT' IN TYPEOF(item) THEN
       dim := SIZEOF(item\cartesian_point.coordinates);
       RETURN(dim);
    END_IF;
    IF 'STRUCTURAL_FRAME_SCHEMA.DIRECTION' IN TYPEOF(item) THEN
       dim := SIZEOF(item\direction.direction_ratios);
       RETURN(dim);
    END_IF;
    IF 'STRUCTURAL_FRAME_SCHEMA.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;  (*  STEP Part 42 (modified in 2nd edition)  *)

Referenced By

Defintion dimension_of is references by the following definitions:
DefinitionType
 geometric_representation_item ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2023-03-25T00:11:39-04:00