Application interpreted construct: Associative draughting elements ISO 10303-520:2018-11(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 EXPRESS short listing
   4.1 General
   4.2 Fundamental concepts and assumptions
   4.3 Associative draughting elements type definition
   4.4 Associative draughting elements entity definitions
   4.5 Associative draughting elements function definitions

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

4 EXPRESS short listing

4.1 General

This application interpreted construct provides a consistent set of entities for the description of structures to associate the annotation used in draughting with the geometric aspects of the shape where the annotation applies. 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 aic_associative_draughting_elements schema that uses elements from the integrated resources and contains the types, entity specializations, and functions that are specific to this part of ISO 10303.

Short names of entities defined in this schema are described in Annex A. Unambiguous identification of this schema is defined in Annex B.

EXPRESS specification:

*)
SCHEMA aic_associative_draughting_elements;

USE FROM measure_schema    --  ISO 10303-41
  (derived_unit,
   named_unit);

USE FROM product_property_definition_schema    --  ISO 10303-41
  (property_definition,
   shape_aspect,
   shape_aspect_relationship);

USE FROM product_property_representation_schema    --  ISO 10303-41
  (shape_definition_representation);

USE FROM geometry_schema    --  ISO 10303-42
  (axis2_placement);

USE FROM representation_schema    --  ISO 10303-43
  (mapped_item,
   representation,
   representation_item,
   representation_map);

USE FROM qualified_measure_schema    --  ISO 10303-45
  (measure_representation_item);

USE FROM presentation_appearance_schema    --  ISO 10303-46
  (curve_style,
   styled_item,
   invisibility_context);

USE FROM presentation_definition_schema    --  ISO 10303-46
  (annotation_curve_occurrence,
   annotation_fill_area_occurrence,
   annotation_occurrence,
   annotation_occurrence_relationship,
   annotation_symbol_occurrence,
   annotation_text_occurrence,
   text_literal);

USE FROM presentation_organization_schema    --  ISO 10303-46
  (camera_model,
   presentation_view,
   annotation_representation_select);

USE FROM shape_dimension_schema    --  ISO 10303-47
  (dimensional_characteristic_representation,
   shape_dimension_representation);

USE FROM draughting_element_schema    --  ISO 10303-101
  (annotation_plane,
   draughting_callout,
   draughting_model,
   draughting_model_item_select,
   leader_curve,
   projection_curve);

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

REFERENCE FROM representation_schema    --  ISO 10303-43
  (using_representations);
(*

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

measure_schema ISO 10303-41
product_property_definition_schema ISO 10303-41
product_property_representation_schema ISO 10303-41
geometry_schema ISO 10303-42
representation_schema ISO 10303-43
qualified_measure_schema ISO 10303-45
presentation_appearance_schema ISO 10303-46
presentation_definition_schema ISO 10303-46
presentation_organization_schema ISO 10303-46
shape_dimension_schema ISO 10303-47
draughting_element_schema ISO 10303-101
support_resource_schema ISO 10303-41

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

NOTE 3   There may be subtypes and items of select lists that appear in the integrated resources that are not imported into the AIC. Constructs are eliminated from the subtype tree or select list through the use of the implicit interface rules of ISO 10303-11. References to eliminated constructs are outside the scope of the AIC. In some cases, all items of the select list are eliminated. Because AICs are intended to be implemented in the context of an application protocol, the items of the select list will be defined by the scope of the application protocol

4.2 Fundamental concepts and assumptions

The following entities are intended to be independently instantiated in the application protocol schemas that use this AIC:

4.3 aic_associative_draughting_elements type definition

4.3.1 aade_invisibility_context   EXPRESS-G

The aade_invisibility_context type is an extension of the invisibility_context type. It adds the data type draughting_model 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 aade_invisibility_context = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON invisibility_context WITH
   (draughting_model);
END_TYPE;
(*

4.4 aic_associative_draughting_elements entity definitions

4.4.1 annotation_occurrence_associativity   EXPRESS-G

An annotation_occurrence_associativity is a type of annotation_occurrence_relationship that relates an element of annotation to the leader or projection curve which visually directs information in the drawing to the element or to the fill area whose boundary is derived from the element.

EXPRESS specification:

*)
ENTITY annotation_occurrence_associativity
  SUBTYPE OF (annotation_occurrence_relationship);
WHERE
  WR1: SIZEOF (TYPEOF (SELF.related_annotation_occurrence) * ['PRESENTATION_DEFINITION_SCHEMA.ANNOTATION_FILL_AREA_OCCURRENCE', 'DRAUGHTING_ELEMENT_SCHEMA.PROJECTION_CURVE', 'DRAUGHTING_ELEMENT_SCHEMA.LEADER_CURVE']) = 1;
END_ENTITY;
(*

Formal propositions:

WR1: The related_annotation_occurrence shall be a leader_curve, projection_curve, or annotation_fill_area_occurrence.

4.4.2 dimension_text_associativity   EXPRESS-G

A dimension_text_associativity is a type of mapped_item and text_literal that maps a shape_dimension_representation onto the draughting_callout which presents the measurement.

NOTE    The measurement of the shape_dimension_representation need not be identical to the character string presented by the text literal.

EXPRESS specification:

*)
ENTITY dimension_text_associativity
  SUBTYPE OF (text_literal, mapped_item);
WHERE
  WR1: ('SHAPE_DIMENSION_SCHEMA.SHAPE_DIMENSION_REPRESENTATION' IN TYPEOF (SELF\mapped_item. mapping_source.mapped_representation));
  WR2: ('DRAUGHTING_ELEMENT_SCHEMA.DRAUGHTING_CALLOUT' IN TYPEOF (SELF\mapped_item.mapping_target));
  WR3: SIZEOF (QUERY (ato <* QUERY (si <* USEDIN (SELF, 'PRESENTATION_APPEARANCE_SCHEMA.STYLED_ITEM.ITEM') | ('PRESENTATION_DEFINITION_SCHEMA.ANNOTATION_TEXT_OCCURRENCE' IN TYPEOF(si))) | NOT (SIZEOF( QUERY (dc <* USEDIN (ato, 'DRAUGHTING_ELEMENT_SCHEMA.' + 'DRAUGHTING_CALLOUT.CONTENTS') | ('DRAUGHTING_ELEMENT_SCHEMA.DRAUGHTING_CALLOUT' IN TYPEOF (dc))) * [SELF\mapped_item.mapping_target]) = 1) )) = 0;
END_ENTITY;
(*

Formal propositions:

WR1: The mapped_representation shall be a shape_dimension_representation

WR2: The mapping_target shall be a draughting_callout.

WR3: The dimension_text_associativity shall be used in an annotation_text_occurrence that is in the contents of the target draughting_callout.

4.4.3 shape_aspect_associativity   EXPRESS-G

A shape_aspect_associativity is a type of shape_aspect_relationship that relates an element of the shape_representation to the leader or projection curve which visually directs information in the drawing to the element or to the fill area boundary that is derived from the element.

EXPRESS specification:

*)
ENTITY shape_aspect_associativity
  SUBTYPE OF (shape_aspect_relationship);
WHERE
  WR1: SELF.relating_shape_aspect.product_definitional;
  WR2: NOT (SELF.related_shape_aspect.product_definitional);
END_ENTITY;
(*

Formal propositions:

WR1: The relating_shape_aspect shall define the product.

WR2: The related_shape_aspect shall not define the product.

4.5 aic_associative_draughting_elements function definitions

4.5.1 check_associative_shape_aspects

The check_associative_shape_aspects function checks that the used_representation of a shape_definition_representation contains two items, one of which is an item in a shape_representation that is mapped into a draughting_model. This draughting_model shall either contain the related leader, projection curve, or fill area as an element or be projected into the presentation_view in which the related leader, projection curve, or fill area is an element. The function returns TRUE if the items of the used_representation satisfy this requirement. The function returns FALSE if the items do not satisfy this requirement.

EXPRESS specification:

*)
FUNCTION check_associative_shape_aspects (sdr : shape_definition_representation) : BOOLEAN;
LOCAL
      sr1, sr2 : SET OF representation;
      dm, pv   : SET OF representation;
    END_LOCAL;
    -- Check if the representation contains only two items
    IF (SIZEOF (sdr.used_representation.items) <> 2) THEN
      RETURN (FALSE);
    END_IF;
    -- Find the representations that use each item
    sr1 := using_representations(sdr.used_representation.items[1]);
    sr2 := using_representations(sdr.used_representation.items[2]);
    -- Find the representations in which item 1 representations are mapped
    REPEAT i := 1 TO HIINDEX(sr1);
      dm := representations_mapped_into(sr1[i]);
      REPEAT j := 1 TO HIINDEX(dm);
        IF ('DRAUGHTING_ELEMENT_SCHEMA.DRAUGHTING_MODEL' IN TYPEOF(dm[j]))
        THEN
          IF (dm[j] IN sr2) THEN RETURN (TRUE);
          END_IF;
          -- Find the views that the draughting model is mapped into
          pv := representations_mapped_into(dm[j]);
          REPEAT k := 1 TO HIINDEX(pv);
            IF ('PRESENTATION_ORGANIZATION_SCHEMA.PRESENTATION_VIEW' IN TYPEOF(pv[k]))
            THEN
              IF (pv[k] IN sr2) THEN RETURN (TRUE);
              END_IF;
            END_IF;
          END_REPEAT;
        END_IF;
      END_REPEAT;
    END_REPEAT;
    -- Find the representations in which item 2 representations are mapped
    REPEAT i := 1 TO HIINDEX(sr2);
      dm := representations_mapped_into(sr2[i]);
      REPEAT j := 1 TO HIINDEX(dm);
        IF ('DRAUGHTING_ELEMENT_SCHEMA.DRAUGHTING_MODEL' IN TYPEOF(dm[j]))
        THEN
          IF (dm[j] IN sr1) THEN RETURN (TRUE);
          END_IF;
          -- Find the views that the draughting model is mapped into
          pv := representations_mapped_into(dm[j]);
          REPEAT k := 1 TO HIINDEX(pv);
            IF ('PRESENTATION_ORGANIZATION_SCHEMA.PRESENTATION_VIEW' IN TYPEOF(pv[k]))
            THEN
              IF (pv[k] IN sr1) THEN RETURN (TRUE);
              END_IF;
            END_IF;
          END_REPEAT;
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN(FALSE);
END_FUNCTION;
(*

Argument definitions:

sdr: the input shape_definition_representation to be checked.

4.5.2 representations_mapped_into

The representations_mapped_into function returns the set of representations that are defined by the use of the input representation as a mapped_item.

EXPRESS specification:

*)
FUNCTION representations_mapped_into (rep : representation) : SET[0:?] OF representation;
LOCAL
      results : SET OF representation := [];
      rm      : SET OF representation_map;
      mi      : SET OF mapped_item := [];
    END_LOCAL;
    -- Find set of representation_maps which specify the representation
    rm := bag_to_set(USEDIN(rep, 'REPRESENTATION_SCHEMA.' +
                      'REPRESENTATION_MAP.MAPPED_REPRESENTATION'));
    -- Find the set of mapped_items that use each representation_map
    REPEAT i := 1 TO HIINDEX(rm);
      mi := mi + rm[i].map_usage;
    END_REPEAT;
    -- Find the set of representations that use each mapped_item
    REPEAT j := 1 TO HIINDEX(mi);
      results := results + USEDIN(mi[j],'REPRESENTATION_SCHEMA.' +
                                        'REPRESENTATION.ITEMS');
    END_REPEAT;
    RETURN(results);
END_FUNCTION;
(*

Argument definitions:

rep: the input representation to be checked.



*)
END_SCHEMA;  -- aic_associative_draughting_elements
(*


© ISO 2018 — All rights reserved