Application module: Foundation representation | ISO/TS 10303-1006:2021(E) © ISO |
This clause specifies the information requirements for the Foundation representation application module. The information requirements are specified as the Application Reference Model (ARM) of this application module.
NOTE 1 A graphical representation of the information requirements is given in Annex C.
NOTE 2 The mapping specification is specified in 5.1. It shows how the information requirements are met by using common resources and constructs defined or imported in the MIM schema of this application module.
This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following begins the Foundation_representation_arm schema and identifies the necessary external references.
EXPRESS specification:
*)
SCHEMA Foundation_representation_arm;
(*
The following EXPRESS interface statements specify the elements imported from the ARMs of other application modules.
EXPRESS specification:
*)
USE FROM
Support_resource_arm;
--
ISO/TS 10303-1800
USE FROM
Value_with_unit_arm;
--
ISO/TS 10303-1054
REFERENCE FROM
Support_resource_arm
--
ISO/TS 10303-1800
(bag_to_set);
(*
NOTE 1 The schemas referenced above are specified in the following part of ISO 10303:
Support_resource_arm ISO/TS 10303-1800 Value_with_unit_arm ISO/TS 10303-1054 Support_resource_arm ISO/TS 10303-1800
NOTE 2 See Annex C, Figures C.1and C.2 for a graphical representation of this schema.
This subclause specifies the ARM type for this application module. The ARM type and definition is specified below.
The representation_or_representation_reference type allows for the designation of the data types Representation and Representation_reference.
EXPRESS specification:
*)
TYPE
representation_or_representation_reference =
SELECT
(Representation,
Representation_reference);
END_TYPE;
(*
This subclause specifies the ARM entities for this module. Each ARM application entity is an atomic element that embodies a unique application concept and contains attributes specifying the data elements of the entity. The ARM entities and definitions are specified below.
EXPRESS specification:
*)
ENTITY Numerical_representation_context
SUBTYPE OF (Representation_context);
units :
OPTIONAL
SET[1:?] OF Unit;
accuracies :
OPTIONAL
SET[1:?] OF Uncertainty_with_unit;
END_ENTITY;
(*
Attribute definitions:
units: the set of Units that apply for attribute values of instances of Representation_item used in that context. The value of this attribute need not be specified.
NOTE The units of Numerical_representation_context is only intended to provide a default unit. Its use is not intended to prevent representation items being specified with the same or different units to the context.
accuracies: the uncertainty measures that apply on attribute values of instances of Representation_item used in that context. The value of this attribute need not be specified.
EXPRESS specification:
*)
ENTITY Representation;
id :
OPTIONAL
identifier;
name :
OPTIONAL
label;
description :
OPTIONAL
text;
context_of_items : Representation_context;
items : SET[1:?] OF Representation_item;
WHERE
WR1: EXISTS(name) OR (TYPEOF(SELF\Representation) <> TYPEOF(SELF));
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the Representation. The value of this attribute need not be specified.
name: the words by which the Representation is known.
EXAMPLE The name of a Representation may be the name of a CAD model.
description: the text that provides further information about the Representation. The value of this attribute need not be specified.
context_of_items: the Representation_context that specifies the context of the Representation.
items: the set of Representation_item instances directly included in the Representation.
Formal propositions:
WR1: If SELF is exact instance of Representation, then name shall be provided.
EXPRESS specification:
*)
ENTITY Representation_context;
id : identifier;
kind : text;
INVERSE
representations_in_context : SET[1:?] OF Representation FOR context_of_items;
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the Representation_context.
kind: the text that describes the type of the context.
EXAMPLE 1 'numeric values' is an example of kind of Representation_context.
EXAMPLE 2 '2D space' or '3D space' are examples of kind which can be used for geometric representation contexts.
representations_in_context: the set of instances of Representation that share the Representation_context. This set shall contain at least one element.
EXPRESS specification:
*)
ENTITY Representation_context_reference;
context_identifier : identifier;
INVERSE
representations_in_context : SET[1:?] OF Representation_reference FOR context_of_items;
END_ENTITY;
(*
Attribute definitions:
context_identifier: the identifier that distinguishes the Representation_context_reference.
representations_in_context: the instances of Representation_reference that refer to the Representation_context_reference.
A Representation_item shall be in the set of items of one or more instances of Representation or it shall belong to one or more instances of Representation, being referred to, directly or indirectly, by items of these instances of Representation.
NOTE this constraint is formally represented in the Express specification of the resource entity that corresponds to Representation_item in the MIM schema.
Only specializations of Representation_item can be instantiated.EXPRESS specification:
*)
ENTITY Representation_item
ABSTRACT SUPERTYPE
;
name :
OPTIONAL
label;
END_ENTITY;
(*
Attribute definitions:
name: the words by which the Representation_item is known.
EXAMPLE The name of a geometric Representation_item may be its element tag in the originating CAD system.
Informal propositions:
IP1: the Representation_item shall be used directly or indirectly, in at least a Representation.
EXPRESS specification:
*)
ENTITY Representation_item_relationship;
name : label;
description :
OPTIONAL
text;
relating_representation_item : Representation_item;
related_representation_item : Representation_item;
END_ENTITY;
(*
Attribute definitions:
name: the words by which the Representation_item_relationship is known.
description: the text that provides further information about the relationship.
relating_representation_item: one of the instances of Representation_item that is a part of the relationship.
related_representation_item: the other instance of Representation_item that is a part of the relationship. If one element of the relationship is the dependent upon the other, this attribute shall be the dependent one.
EXPRESS specification:
*)
ENTITY Representation_reference;
id : identifier;
context_of_items : Representation_context_reference;
END_ENTITY;
(*
Attribute definitions:
id: the identifier that distinguishes the Representation_reference.
context_of_items: the Representation_context_reference in which the items are related to form a Representation_reference of some concept.
EXPRESS specification:
*)
ENTITY Representation_relationship;
relation_type :
OPTIONAL
label;
description :
OPTIONAL
text;
rep_1 : Representation;
rep_2 : Representation;
WHERE
WR1: EXISTS(relation_type) OR (TYPEOF(SELF\Representation_relationship) <> TYPEOF(SELF));
WR2: EXISTS(description) OR (TYPEOF(SELF\Representation_relationship) <> TYPEOF(SELF));
END_ENTITY;
(*
Attribute definitions:
relation_type: the string that specifies the type of the relationship.
Where applicable, the following values shall be used:
EXAMPLE A faceted representation may be derived from a boundary representation.
description: the text that provides further information about the relationship.
rep_1: one of the instances of Representation that is a part of the relationship.
rep_2: the other instance of Representation that is a part of the relationship. If one element of the relationship is the dependent upon the other, this attribute shall be the dependent one.
Formal propositions:
WR1: If SELF is exact instance of Representation_relationship, then relation_type shall be provided.
WR2: If SELF is exact instance of Representation_relationship, then description shall be provided.
EXPRESS specification:
*)
ENTITY String_representation_item
SUBTYPE OF (Representation_item);
string_value : STRING;
END_ENTITY;
(*
Attribute definitions:
string_value: the string that is the element of representation.
This subclause specifies the ARM functions for this module. The ARM functions and definitions are specified below.
The function item_in_context determines if a Representation_item is related to a Representation_context. The function returns TRUE if the item argument is related by a Representation to the input cntxt argument. Function item_in_context returns FALSE otherwise. The type of the function is BOOLEAN.
A Representation_item is related to a Representation_context if it is:
NOTE 1 The second condition is a recursive check allowing for a Representation_item to be related to a Representation_context by being part of a tree of related instances of Representation_item. The tree is rooted in an entity that is related to a Representation_context by fulfilling the first or second condition.
NOTE 2 The function item_in_context only determines if an item is related to a specific Representation_context. The relationship of the item to some other Representation_context is not determined.
EXPRESS specification:
*)
FUNCTION item_in_context (item : Representation_item; cntxt : Representation_context) : BOOLEAN;
LOCAL y : BAG OF Representation_item; END_LOCAL; -- If there is one or more representation using both the item -- and cntxt return true. IF SIZEOF(USEDIN(item,'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION.ITEMS') * cntxt.representations_in_context) > 0 THEN RETURN (TRUE); -- Determine the bag of representation_items that reference -- item ELSE y := QUERY(z <* USEDIN (item , '') | 'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION_ITEM' IN TYPEOF(z)); -- Ensure that the bag is not empty IF SIZEOF(y) > 0 THEN -- For each element in the bag REPEAT i := 1 TO HIINDEX(y); -- Check to see it is an item in the input cntxt. IF item_in_context(y[i], cntxt) THEN RETURN (TRUE); END_IF; END_REPEAT; END_IF; END_IF; -- Return false when all possible branches have been checked -- with no success. RETURN (FALSE);
END_FUNCTION;
(*
Argument definitions:
item: the Representation_item checked for relationship in cntxt. This is input to the function.
cntxt: the Representation_context for which relationship to item is determined. This is input to the function.
EXPRESS specification:
*)
FUNCTION using_items (item : Representation_item; checked_items : SET[0:?] OF Representation_item) : SET[0:?] OF Representation_item;
LOCAL new_check_items : SET OF Representation_item; result_items : SET OF Representation_item; next_items : SET OF Representation_item; END_LOCAL; result_items := []; new_check_items := checked_items + item; -- Find the set of representation_items or founded_items -- in which item is used directly. next_items := QUERY(z <* bag_to_set( USEDIN(item , '')) | ('FOUNDATION_REPRESENTATION_ARM.REPRESENTATION_ITEM' IN TYPEOF(z))); -- If the set of next_items is not empty; IF SIZEOF(next_items) > 0 THEN -- For each element in the set, find the using_items recursively REPEAT i := 1 TO HIINDEX(next_items); -- Check for loop in data model, i.e. one of the next_items -- occurred earlier in the set of check_items; IF NOT(next_items[i] IN new_check_items) THEN result_items := result_items + next_items[i] + using_items(next_items[i],new_check_items); END_IF; END_REPEAT; END_IF; -- return the set of representation_items or founded_items -- in which the input item is used directly and indirectly. RETURN (result_items);
END_FUNCTION;
(*
Argument definitions:
item: the Representation_item for which the referencing instances of Representation_item are determined. This is input to the function.
checked_items: the set of instances of Representation_item that have been checked already in order to ensure termination of the recursive function. This is input to the function.
The function using_representations returns the set of Representations in which a Representation_item is used.
A Representation_item is used in a Representation if it is:
NOTE The second condition is the check allowing for a Representation_item to be used in a Representation by being part of a tree of related Representation_items. The tree is rooted in an entity used in a Representation by fulfilling the first condition.
A Representation_item is used in a Representation if it is referenced directly, or indirectly, by a Representation_item in the set of items of the Representation.
EXPRESS specification:
*)
FUNCTION using_representations (item : Representation_item) : SET[0:?] OF Representation;
LOCAL results : SET OF Representation; result_bag : BAG OF Representation; intermediate_items : SET OF Representation_item; END_LOCAL; -- Find the representations in which the item is used and add to the -- results set. results := []; result_bag := USEDIN(item,'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION.ITEMS'); IF SIZEOF(result_bag) > 0 THEN REPEAT i := 1 TO HIINDEX(result_bag); results := results + result_bag[i]; END_REPEAT; END_IF; -- Find all representation_items or founded_items -- by which item is referenced directly or indirectly. intermediate_items := using_items(item,[]); -- If the set of intermediate items is not empty; IF SIZEOF(intermediate_items) > 0 THEN -- For each element in the set, add the -- representations of that element. REPEAT i := 1 TO HIINDEX(intermediate_items); result_bag := USEDIN(intermediate_items[i], 'FOUNDATION_REPRESENTATION_ARM.REPRESENTATION.ITEMS'); IF SIZEOF(result_bag) > 0 THEN REPEAT j := 1 TO HIINDEX(result_bag); results := results + result_bag[j]; END_REPEAT; END_IF; END_REPEAT; END_IF; -- Return the set of representation in which the input item is -- used directly and indirectly (through intervening -- representation_items or founded items). RETURN (results);
END_FUNCTION;
(*
Argument definitions:
item: the Representation_item for which using instances of Representation are determined. This is input to the function.
*)
END_SCHEMA; -- Foundation_representation_arm
(*
© ISO 2021 — All rights reserved