Integrated application resource: Mechanical features ISO 10303-113:2021(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms

4 Counterbore countersink
   4.1 General
   4.2 Fundamental concepts and assumptions
   4.3 Counterbore countersink type definitions
   4.4 Counterbore countersink entity definitions
   4.5 Counterbore countersink subtype constraint definition
5 Machining feature
   5.1 General
   5.2 Fundamental concepts and assumptions
   5.3 Machining feature type definition
   5.4 Machining feature entity definitions
   5.5 Machining feature subtype constraint definition
   5.6 Machining feature rule definitions
6 Mechanical design
   6.1 General
   6.2 Fundamental concepts and assumptions
   6.3 Mechanical design type definitions
   6.4 Mechanical design entity definitions
   6.5 Mechanical design function definitions
   6.6 Mechanical design rule definitions

A Short names of entities
B Information object registration
C Computer interpretable listings
D EXPRESS-G diagrams
E Technical discussion
F Change history
Bibliography
Index

6 Mechanical design schema

6.1 General

The mechanical_design_schema provides resources for the representations of slots or placeholders in a model that will be elaborated in an additional operation. It provides specific support to identify the geometric product specification element the placeholder is intended to support. It provides specific support for managing identification properties of topological items by providing population constraints on the values of an identification element in the context of a product definition.

This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following EXPRESS declaration begins the mechanical_design_schema and identifies the necessary external references.

Each implementation of an AP that uses this schema and that encodes entity names shall use the encoding specified in Annex A. Each reference to this schema in an open system shall use the identifier encoding specified in Annex B. This schema is illustrated in Annex D using the EXPRESS-G notation.

EXPRESS specification:

*)
SCHEMA mechanical_design_schema;

REFERENCE FROM draughting_element_schema    --  ISO 10303-101
  (draughting_callout,
   draughting_callout_element,
   draughting_model_item_association,
   draughting_model_item_definition,
   draughting_model);

REFERENCE FROM geometry_schema    --  ISO 10303-42
  (cartesian_point,
   geometric_representation_item,
   placement,
   point,
   point_on_curve,
   point_on_surface);

REFERENCE FROM geometric_model_schema    --  ISO 10303-42
  (geometric_set,
   geometric_set_select);

REFERENCE FROM measure_schema    --  ISO 10303-41
  (positive_length_measure);

REFERENCE FROM presentation_appearance_schema    --  ISO 10303-46
  (styled_item);

REFERENCE FROM presentation_definition_schema    --  ISO 10303-46
  (annotation_curve_occurrence,
   annotation_fill_area_occurrence,
   annotation_occurrence,
   annotation_point_occurrence,
   annotation_symbol_occurrence,
   annotation_text_occurrence,
   annotation_text);

REFERENCE FROM presentation_resource_schema    --  ISO 10303-46
  (planar_box);

REFERENCE FROM product_definition_schema    --  ISO 10303-41
  (product_definition);

REFERENCE FROM product_property_definition_schema    --  ISO 10303-41
  (characterized_object,
   property_definition,
   product_definition_shape,
   shape_aspect,
   shape_aspect_relationship);

REFERENCE FROM product_property_representation_schema    --  ISO 10303-41
  (item_identified_representation_usage,
   property_definition_representation);

REFERENCE FROM representation_schema    --  ISO 10303-43
  (get_representations_for_items,
   representation,
   representation_item);

REFERENCE FROM shape_aspect_definition_schema    --  ISO 10303-47
  (datum,
   datum_target);

REFERENCE FROM shape_dimension_schema    --  ISO 10303-47
  (angular_location,
   dimensional_size,
   dimensional_location);

REFERENCE FROM shape_tolerance_schema    --  ISO 10303-47
  (angularity_tolerance,
   circular_runout_tolerance,
   coaxiality_tolerance,
   concentricity_tolerance,
   cylindricity_tolerance,
   flatness_tolerance,
   geometric_tolerance,
   line_profile_tolerance,
   parallelism_tolerance,
   perpendicularity_tolerance,
   position_tolerance,
   roundness_tolerance,
   surface_profile_tolerance,
   straightness_tolerance,
   symmetry_tolerance,
   total_runout_tolerance);

REFERENCE FROM support_resource_schema    --  ISO 10303-41
  (bag_to_set,
   identifier);

REFERENCE FROM topology_schema    --  ISO 10303-42
  (topological_representation_item,
   get_tri_in_representations,
   valid_tri_ids);
(*

NOTE 1   The schemas referenced above are specified in the following parts:

draughting_element_schema ISO 10303-101
geometry_schema ISO 10303-42
geometric_model_schema ISO 10303-42
measure_schema ISO 10303-41
presentation_appearance_schema ISO 10303-46
presentation_definition_schema ISO 10303-46
presentation_resource_schema ISO 10303-46
product_definition_schema ISO 10303-41
product_property_definition_schema ISO 10303-41
product_property_representation_schema ISO 10303-41
representation_schema ISO 10303-43
shape_aspect_definition_schema ISO 10303-47
shape_dimension_schema ISO 10303-47
shape_tolerance_schema ISO 10303-47
support_resource_schema ISO 10303-41
topology_schema ISO 10303-42

NOTE 2   See Annex D for a graphical representation of this schema.

6.2 Fundamental concepts and assumptions

Important concepts for this schema are annotation_placeholder_occurrence, draughting_model_item_association_with_placeholder, pmi_requirement_item_association, and the rule tri_identification_within_product_definition.

The annotation_placeholder_occurrence and draughting_model_item_association_with_placeholder concepts provide support for data exchange that identifies location and orientation information for product and manufacturing information without the detailed exchange of text or symbol glyphs. The receiving system can apply appropriate presentation symbology under the constraints defined by the concepts.

The pmi_requirement_item_association extends the utility of item_identified_representation_usage by specifying a characterized_object as a requirement for the item_identified_representation_usage.

The rule tri_identification_within_product_definition identifies whether uniqueness constraints on topological_representation_item attributes permanent_id and permanent_aggregate_id are satisfied by the product data. Both permanent_id and permanent_aggregate_id are supported based upon acknowledged and accepted output data differences among computer aided design systems, as requested by implementers who participated in the model development.

A technical discussion of entities defined in this schema is provided in Annex E.

6.3 mechanical_design_schema type definitions

6.3.1 annotation_placeholder_occurrence_role   EXPRESS-G

The annotation_placeholder_occurrence_role is either a user defined text or a class of geometric product specification.

EXPRESS specification:

*)
TYPE annotation_placeholder_occurrence_role = ENUMERATION OF
   (annotation_text,
    gps_data);
END_TYPE;
(*

Enumerated item definitions:

annotation_text: user defined text.

gps_data: geometric product specification class that associated with a specific entity type in this document.

6.3.2 md_draughting_callout_element   EXPRESS-G

The md_draughting_callout_element type is an extension of the draughting_callout_element type. It adds the data type annotation_placeholder_occurrence to the list of alternate data types.

NOTE  The list of entity data types will be extended in application resources that use the constructs of this resource.

EXPRESS specification:

*)
TYPE md_draughting_callout_element = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON draughting_callout_element WITH
   (annotation_placeholder_occurrence);
END_TYPE;
(*

6.3.3 md_geometric_set_select   EXPRESS-G

The md_geometric_set_select type is an extension of the geometric_set_select type. It adds the data types annotation_text, placement and planar_box to the list of alternate data types.

EXPRESS specification:

*)
TYPE md_geometric_set_select = SELECT BASED_ON geometric_set_select WITH
   (annotation_text,
    placement,
    planar_box);
END_TYPE;
(*

6.4 mechanical_design_schema entity definitions

6.4.1 annotation_placeholder_occurrence   EXPRESS-G

An annotation_placeholder_occurrence is a type of annotation_occurrence and geometric_representation_item that provides enough information about the position and orientation of a PMI annotation so that a target system with PMI authoring capability can re-create the presentation based on the Representation data given in the file.

NOTE 1   This avoids requiring the user of the target system to manually position each PMI element.

NOTE 2   Adding the annotation_placeholder_occurrence in a STEP file does not preclude also providing graphic presentation in the same file.

EXPRESS specification:

*)
ENTITY annotation_placeholder_occurrence
  SUBTYPE OF (annotation_occurrence, geometric_representation_item);
  SELF\styled_item.item : geometric_set;
  role : annotation_placeholder_occurrence_role;
  line_spacing : positive_length_measure;
INVERSE
  the_callout : draughting_callout FOR contents;
  the_draughting_model_item_association_with_placeholders : SET[0:1] OF draughting_model_item_association_with_placeholder FOR annotation_placeholder;
WHERE
  WR1: md_valid_content_in_geometric_set_for_placeholder(item);
  WR2: NOT (role = annotation_placeholder_occurrence_role.gps_data) OR ((SIZEOF(the_draughting_model_item_association_with_placeholders) = 1) AND md_pmi_name_and_type_correlation(SELF));
END_ENTITY;
(*

Attribute definitions:

item: geometric set which defines the geometric data elements for the placeholder occurrence.

role: specifies that the placeholder occurrence is for user defined text or is for geometric product specification purposes.

line_spacing: specifies the value of the vertical bounding box of the text.

the_callout: specifies that the annotation placeholder occurrence is dependent on a draughting callout specifying the annotation occurrence contents.

the_draughting_model_item_association_with_placeholders: specifies the population constraint that says no more than one draughting_model_item_association_with_placeholder shall specify an occurrence.

Formal propositions:

WR1: The item shall only have valid content.

WR2: If the role is geometric product specification then there shall be a correlation between the string value for the role and the type of instance provided in the dataset draughting_model_item_association_with_placeholder.

6.4.2 draughting_model_item_association_with_placeholder   EXPRESS-G

A draughting_model_item_association_with_placeholder is a type of draughting_model_item_association that specifies a placeholder for product and manufacturing information annotation.

EXPRESS specification:

*)
ENTITY draughting_model_item_association_with_placeholder
  SUBTYPE OF (draughting_model_item_association);
  SELF\draughting_model_item_association.used_representation : draughting_model;
  SELF\item_identified_representation_usage.identified_item : draughting_callout;
  annotation_placeholder : annotation_placeholder_occurrence;
END_ENTITY;
(*

Attribute definitions:

used_representation: specifies the draughting_model that represents the draughting_model_item_association_with_placeholder.

identified_item: specifies the draughting_callout that contains the placeholder.

annotation_placeholder: specifies the placeholder.

6.4.3 pmi_requirement_item_association   EXPRESS-G

A pmi_requirement_item_association is a type of item_identified_representation_usage that associates a requirement to product manufacturing information.

EXPRESS specification:

*)
ENTITY pmi_requirement_item_association
  SUBTYPE OF (item_identified_representation_usage);
  requirement : characterized_object;
END_ENTITY;
(*

Attribute definitions:

requirement: specifies the characterized_object that is the requirement for the pmi_requirement_item_association.

6.5 mechanical_design_schema function definitions

6.5.1 get_tri_for_pd

get_tri_for_pd provides the tri that are reached from the product_definition via ( product_definition, property_definition, ) path and the tri that are reached from the product_definition via the shape_aspect path.

EXPRESS specification:

*)
FUNCTION get_tri_for_pd (def_instance : product_definition) : SET[0:?] OF topological_representation_item;
LOCAL
      pd1_set  : SET OF property_definition := bag_to_set(USEDIN(def_instance, 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
      pd2_set  : SET OF property_definition := [];
      pdr_set : SET OF property_definition_representation := [];
      pds_set  : SET OF product_definition_shape := [];
       r_set   : SET OF representation := [];
        sa_set : SET OF shape_aspect := [];
       tri_set : SET OF topological_representation_item := [];
    END_LOCAL;

    IF (SIZEOF(pd1_set) < 1) THEN
      RETURN (?);
    END_IF;

    REPEAT i := LOINDEX(pd1_set) TO HIINDEX(pd1_set);
      pdr_set := pdr_set + bag_to_set(USEDIN(pd1_set[i], 'PRODUCT_PROPERTY_REPRESENTATION_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'));
      IF 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd1_set[i]) THEN
        pds_set := pds_set + pd1_set[i];
      END_IF;
    END_REPEAT;

    REPEAT i := LOINDEX(pds_set) TO HIINDEX(pds_set);
      sa_set := sa_set + bag_to_set(USEDIN(pds_set[i], 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.SHAPE_ASPECT.OF_SHAPE'));
    END_REPEAT;

    REPEAT i := LOINDEX(sa_set) TO HIINDEX(sa_set);
      pd2_set := pd2_set + bag_to_set(USEDIN(sa_set[i], 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION.DEFINITION'));
    END_REPEAT;

   IF (SIZEOF(pd2_set) > 0) THEN
     BEGIN
      REPEAT i := LOINDEX(pd2_set) TO HIINDEX(pd2_set);
        pdr_set := pdr_set + bag_to_set(USEDIN(pd2_set[i], 'PRODUCT_PROPERTY_REPRESENTATION_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'));
      END_REPEAT;
     END;
   END_IF;
    
    IF (SIZEOF(pdr_set) < 1) THEN
      RETURN (?);
    END_IF;

    REPEAT i := LOINDEX(pdr_set) TO HIINDEX(pdr_set);
      r_set := r_set + pdr_set[i]\property_definition_representation.used_representation;
    END_REPEAT;
    IF (SIZEOF(r_set) < 1) THEN
      RETURN (?);
    END_IF;

    REPEAT i := LOINDEX(r_set) TO HIINDEX(r_set);
      REPEAT j := LOINDEX(r_set[i]\representation.items) to HIINDEX(r_set[i]\representation.items);
       IF('TOPOLOGY_SCHEMA.TOPOLOGICAL_REPRESENTATION_ITEM' IN TYPEOF (r_set[i]\representation.items[j])) THEN
         tri_set := tri_set + r_set[i]\representation.items[j];
       END_IF;
      END_REPEAT;
    END_REPEAT;
    
  RETURN (tri_set);
END_FUNCTION;
(*

Argument definitions:

def_instance: specifies the product_definition that is the input to the function.

6.5.2 md_pmi_name_and_type_correlation

The function provides a true output if the type of the PMI element associated with the placeholder is associated on a case by case basis with the correct type in the instance dataset.

EXPRESS specification:

*)
FUNCTION md_pmi_name_and_type_correlation (input : annotation_placeholder_occurrence) : BOOLEAN;
LOCAL
      pmi_role : STRING := input\annotation_placeholder_occurrence.item\representation_item.name;
      dmiawps : SET OF draughting_model_item_association_with_placeholder := 
                input\annotation_placeholder_occurrence.the_draughting_model_item_association_with_placeholders;
      v : SET OF STRING := [];
    END_LOCAL;
      
     IF (SIZEOF(dmiawps) = 1) THEN
       v:= TYPEOF(dmiawps[1]\draughting_model_item_association.definition);
     ELSE
       RETURN(FALSE);
     END_IF;

    IF NOT(pmi_role IN
          ['angular dimension',
           'angularity',
           'circular runout',
           'circularity',
           'coaxiality',
           'concentricity',
           'curve dimension',
           'cylindricity',
           'datum',
           'datum target',
           'diameter dimension',
           'flatness',
           'general dimension',
           'general note',
           'general tolerance',
           'label',
           'linear dimension',
           'note',
           'ordinate dimension',
           'parallelism',
           'perpendicularity',
           'position',
           'profile of line',
           'profile of surface',
           'radial dimension',
           'roundness',
           'runout',
           'straightness',
           'surface roughness',
           'symmetry',
           'total runout']) THEN
    RETURN(?);
    END_IF;

    CASE pmi_role OF
      'angular dimension'      : IF 'SHAPE_DIMENSION_SCHEMA.ANGULAR_LOCATION' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'angularity'      : IF 'SHAPE_TOLERANCE_SCHEMA.ANGULARITY_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'circular runout'      : IF 'SHAPE_TOLERANCE_SCHEMA.CIRCULAR_RUNOUT_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'circularity'      : IF 'SHAPE_TOLERANCE_SCHEMA.ROUNDNESS_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'coaxiality'      : IF 'SHAPE_TOLERANCE_SCHEMA.COAXIALITY_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'concentricity'      : IF 'SHAPE_TOLERANCE_SCHEMA.CONCENTRICITY_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'curve dimension'      : IF 'SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_SIZE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'cylindricity'      : IF 'SHAPE_TOLERANCE_SCHEMA.CYLINDRICITY_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'datum'      : IF 'SHAPE_ASPECT_DEFINITION_SCHEMA.DATUM' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'datum target'      : IF 'SHAPE_ASPECT_DEFINITION_SCHEMA.DATUM_TARGET' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'diameter dimension'      : IF 'SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_SIZE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'flatness'      : IF 'SHAPE_TOLERANCE_SCHEMA.FLATNESS_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'general dimension'      : IF (SIZEOF(['SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_SIZE',
                                             'SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_LOCATION'] * v) = 1) THEN
                          RETURN(TRUE);
                        END_IF;
      'general note'      : IF 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'general tolerance'  : IF 'SHAPE_TOLERANCE_SCHEMA.GEOMETRIC_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'label'      : IF 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'linear dimension'      : IF 'SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_SIZE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'note'      		: IF 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'ordinate dimension'      : IF 'SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_SIZE' IN v THEN
                          RETURN(TRUE);
                        END_IF;   
      'parallelism'      : IF 'SHAPE_TOLERANCE_SCHEMA.PARALLELISM_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'perpendicularity'      : IF 'SHAPE_TOLERANCE_SCHEMA.PERPENDICULARITY_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'position'      : IF 'SHAPE_TOLERANCE_SCHEMA.POSITION_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'profile of line'      : IF 'SHAPE_TOLERANCE_SCHEMA.LINE_PROFILE_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'profile of surface'      : IF 'SHAPE_TOLERANCE_SCHEMA.SURFACE_PROFILE_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'radial dimension'      : IF 'SHAPE_DIMENSION_SCHEMA.DIMENSIONAL_SIZE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'roundness'      : IF 'SHAPE_TOLERANCE_SCHEMA.ROUNDNESS_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
                        
      'runout'      : IF 'SHAPE_TOLERANCE_SCHEMA.TOTAL_RUNOUT_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'straightness'      : IF 'SHAPE_TOLERANCE_SCHEMA.STRAIGHTNESS_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'surface roughness'      : IF 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'symmetry'      : IF 'SHAPE_TOLERANCE_SCHEMA.SYMMETRY_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
      'total runout'      : IF 'SHAPE_TOLERANCE_SCHEMA.TOTAL_RUNOUT_TOLERANCE' IN v THEN
                          RETURN(TRUE);
                        END_IF;
    OTHERWISE : RETURN(FALSE);
  END_CASE;
END_FUNCTION;
(*

Argument definitions:

input: annotation_placeholder_occurrence.

6.5.3 md_valid_content_in_geometric_set_for_placeholder

The function returns true if the contents are the following: One placement, zero or one planar_box, zero or one annotation_text. The function returns true if each point instance provided is the correct subtype.

EXPRESS specification:

*)
FUNCTION md_valid_content_in_geometric_set_for_placeholder (input : geometric_set) : BOOLEAN;
LOCAL
pass : BOOLEAN := TRUE;
boxes : BAG OF planar_box := [];
texts : BAG OF annotation_text := [];
placements : BAG OF placement := [];
points : BAG OF point := [];
END_LOCAL;

--Iterate over the input, ensuring the points that are in the set are the subtypes we want.
REPEAT i := LOINDEX(input\geometric_set.elements) TO HIINDEX(input\geometric_set.elements);
  IF ('GEOMETRY_SCHEMA.POINT' IN TYPEOF (input\geometric_set.elements[i])) AND NOT
          (SIZEOF(['GEOMETRY_SCHEMA.CARTESIAN_POINT',
                   'GEOMETRY_SCHEMA.POINT_ON_CURVE',
                   'GEOMETRY_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(input\geometric_set.elements[i])) = 1) THEN
 pass := FALSE;
 ELSE
  points := points + input\geometric_set.elements[i];
END_IF;
 IF 'PRESENTATION_RESOURCE_SCHEMA.PLANAR_BOX' IN TYPEOF(input\geometric_set.elements[i]) THEN
      boxes := boxes + input\geometric_set.elements[i];
  END_IF;
 IF 'PRESENTATION_DEFINITION_SCHEMA.ANNOTATION_TEXT' IN TYPEOF(input\geometric_set.elements[i]) THEN
      texts := texts + input\geometric_set.elements[i];
  END_IF;
 IF 'GEOMETRY_SCHEMA.PLACEMENT' IN TYPEOF(input\geometric_set.elements[i]) THEN
      placements := placements + input\geometric_set.elements[i];
  END_IF;
END_REPEAT;
IF SIZEOF(boxes) > 1 THEN
 Pass := FALSE;
 END_IF;
IF SIZEOF(texts) > 1 THEN
 Pass := FALSE;
 END_IF;
IF SIZEOF(placements) <> 1 THEN
 Pass := FALSE;
 END_IF;

RETURN(pass);
END_FUNCTION;
(*

Argument definitions:

input: geometric_set.

6.6 mechanical_design_schema rule definitions

6.6.1 tri_identification_within_product_definition

The rule iterates over all product_definition instances. For each product_definition, if there is any id in the tri associated with that product_definition, all tris are checked for valid ids.

NOTE 1   pd_items are all the tri related to a product_definition.

NOTE 2   associated_representations provide the set of representation instances that directly or indirectly reference each member of pd_items.

EXPRESS specification:

*)
RULE tri_identification_within_product_definition FOR
(product_definition,topological_representation_item,representation);

LOCAL
   associated_representations : SET [1:?] OF representation := [];
   items          : SET [1:?] OF topological_representation_item := [];
   pd_items       : SET [1:?] OF topological_representation_item := [];
   pass : BOOLEAN := TRUE;
  END_LOCAL;

REPEAT i := LOINDEX(product_definition) TO HIINDEX(product_definition) WHILE pass;
  pd_items := get_tri_for_pd(product_definition[i]);
  associated_representations := get_representations_for_items(pd_items);
  items := get_tri_in_representations(associated_representations) + pd_items;

  IF (SIZEOF(items) > 0) THEN
        IF (SIZEOF(QUERY(ai <* items | 
         NOT(EXISTS(ai\topological_representation_item.permanent_id) OR
          EXISTS(ai\topological_representation_item.permanent_aggregate_id)) 
              )) > 0 )
        THEN
         pass := valid_tri_ids(items);
        END_IF;
  END_IF;  
END_REPEAT;
WHERE
  WR1: pass;
END_RULE;
(*

Argument definitions:

product_definition : the set of all instances of product_definition.

topological_representation_item : the set of all instances of topological_representation_item.

representation : the set of all instances of representation.

Formal propositions:

WR1: WR1 is TRUE if each tri in items has an id or aggregated_id and if each (id, aggregate_id) value is used only once in items.



*)
END_SCHEMA;  -- mechanical_design_schema
(*


© ISO 2021 — All rights reserved