Associative Text in 3D recommended practices

From WikiSTEP

Jump to: navigation, search

Contents

Introduction

This document describes the recommended practices for implementing 3D associative text. This document reflects the latest agreements from the AP214 DIS ballot workshop in New Orleans.

Scope

The information presented in this document covers how a STEP implementation would support:

  • the definition of text and its placement within model space;
  • the definition of curve and symbol annotation for leader lines;
  • limited styling of text, curve and symbol annotation;
  • placement of styled annotation within the same coordinate space containing a three-dimensional geometric model;
  • associativity between separate annotation elements;
  • associativity between annotation and geometric model elements.

Fundamental concepts

Particular concepts of interest within the scope of this recommendation are described within the following paragraphs.

Shape_representation versus Draughting_model

The concept of a shape_representation is widely known by STEP developers and implementers. Many STEP implementations already exist that support subtypes of shape_representation that contain locally defined constraints defining the type of geometry the shape_representation can represent (e.g., advanced_brep_shape_representation, manifold_surface_shape_representation).

AP202 and AP214 introduce another representation concept, known as a draughting_model. First of all, the name of this entity is a misnomer, since it can be used to represent representations that are not draughting-related. Conceptually, a draughting_model is a representation that may contain geometry and styled annotation within the same coordinate space.

Mapping of annotation and shape into the draughting model.gif
Figure 1. Mapping of annotation and shape into the draughting model

This is achieved by ensuring that all items of a draughting_model are mapped_item entity data types, styled_item entity data types, or an axis2_placement. A mapped_item would represent the mapping of a shape_representation that defines the shape of a product that is to be presented.

In the case of styling text - and thus using draughting model in addition to the annotated shape_representation - the text_literal is founded twice. It is then founded in the shape_representation it annotates and via annotation_text_occurrence in the draughting_model. To ensure the consistency of the placement of the text it is necessary that the coordinate-systems of the draughting_model and the shape_representation be identical. Thus, it is required that the transformation between the annotated shape_representation and the draughting_model established via mapped_item and representation_map be the identity-transformation.

The draughting_model may also contain annotation_occurrrence entity data types

NOTE: an annotation_occurrence is a subtype of a styled_item. 

These specify annotation that is placed in the same coordinate space as the shape_representation.

Defining text and placing it in model space

Annotation text geometry combined in hybrid shape representation.gif
Figure 2. Annotation text and geometry combined in a hybrid shape representation

Text is defined by a text_literal. Its .literal attribute defines the text string and its .font attribute references the text font used to present the text string. Since the text_literal is a subtype of geometric_representation_item, it can be listed as an item of a generic shape_representation (i.e., not within one of its already-defined and well-known subtypes). The intent of placing the text_literal in a shape_representation is to

  • allow for the exchange of non-styled text;
  • the ability to relate this non-styled text to an annotation_text_occurrence located within a draughting_model.

To specify the physical space that the text occupies the text_literal_with_extent subtype of text_literal may be used. It includes the .extent attribute that captures the extent by referencing a planar_extent entity data type. This extent is defined by:

  • width - the distance of the left-most point of the left-most character to the right-most point of the rightmost character measured parallel to the text baseline

and

  • height - the distance of the lowest point of the lowest reaching character to the highest point of the

highest reaching character measured perpendicular to the text baseline.

Functionality for additional requirements related to text literals.gif
Figure 3. Functionality for additional requirements related to text_literals

Support for multi-lined text is also within the scope of this document. This can be achieved by using the composite_text entity data type (or its omposite_text_with_extent subtype), which is no more than an entity that defines a set of text_literal entity data types.

Styling annotation

A subtype of annotation_occurrence defines styled annotations. Within the scope of this effort all annotation_occurrence entity data types will be instantiated as complex instances, since annotation_occurrence entity data types are subtypes of both a draughting_annotation_occurrence and a styled_item.

The subtypes of annotation_occurrence that are within the scope of this effort are annotation_text_occurrence, annotation_curve_occurrence, and annotation_symbol_occurrence. Each has an .item attribute that references the item that is to be styled. In the case of the annotation_text_occurrence, the item is a text_literal; in the case of the annotation_curve_occurrence, the item is a trimmed_curve; and in the case of the annotation_symbol_occurrence, the item is a defined_symbol.

Additionally, each annotation_occurrence has a .styles attribute that is used to assign that occurrence’s particular style by referencing the presentation_style_assignment entity data type. The presentation_style_assignment lists the required style for that instance of an annotation_occurrence (i.e., text_style for annotation_text_occurrence, curve_style for annotation_curve_occurrence, and symbol_style for annotation_symbol_occurrence).

Styling annotation text.gif
Figure 4. Styling annotation text

Associativity between separate elements of annotation

The method of explicitly relating separate annotation elements can be achieved using the annotation_occurrence_associativity entity data type. Notice that the related_annotation_occurrence is constrained to leader_curve, projection_curve or annotation_fill_area_occurrence.

Association between leader curve and annotation text.gif
Figure 5. Association between leader curve and annotation text

Associativity between annotation and geometric model elements

A method of associating annotation with elements of a geometric model can be achieved using the shape_aspect_associativity entity data type. The first shape_aspect captures the portions of a geometric model that are to be associated with annotation. The second shape_aspect captures the annotation elements that are to be associated with elements of a geometric model.

Associativity between portion of geometry and annotation.gif
Figure 6. Associativity between a portion of the geometry (edge_curve) and annotation (the draughting_callout)

Logical combination of annotation elements

Information depicted via annotation elements is typically grouped in callouts. In the scope of this effort two types of callouts are used: draughting_callout and leader_directed_callout. A draughting_callout is a collection of annotation element. A leader_directed_callout is a subtype of a draughting_callout that includes a leader line to direct the eye of the reader to a place of interest. In the context of associative text a leader_directed_callout shall be instantiated when a leader line, that visually depicts the association of text with some elements of the geometric model, is present. There are scenarios in which it is not desired to exchange such leader curves. In these cases a draughting_callout shall be instantiated.

Logical combination of annotation elements.gif
Figure 7. Logical combination of annotation elements

Visual depiction of associativity with leader curve

The associativity between an annotation text and elements of the shape representation can be visually depicted via a leader_curve. A leader_curve is a complex instance with annotation_curve_occurrence, annotation_occurrence, draughting_annotation_occurrence, leader_curve, representation_item, geometric_representation_item and styled_item. The styled_item.item points to the underlying geometry of the leader_curve. At the target end a leader line is terminated by a leader_terminator symbol. Leader_terminator has again a complex instantiation corresponding to the instantiation of leader_curve. The name attribute inherited from styled_item points to a defined_symbol. In the scope of this effort defined_symbol represents an implicit definition of a symbol. Defined_symbol points to a pre_defined_terminator_symbol that gives a description of the symbol and a symbol_target that represents location and orientation of the symbol instance. Pre_defined_terminator_symbol can be instantiated with the names ’blanked arrow’,’blanked box’,’blanked dot’, ’dimension origin’, ’filled arrow’, ’filled box’, ’filled dot’, ’integral symbol’,’open arrow’,’slash’ or ’unfilled arrow’.

Representation of leader curve.gif
Figure 8. Representation of leader curve

Combinations of building blocks defined for this capability

The capability described herein supports:

  1. text in 3D model
  2. styled text in 3D model
  3. text associated to elements of the 3D model
  4. visual depiction of the association of text to elements of the model.

The approach is designed to be modular, i.e. depending on the scope of the intended data exchange the capability can be supported by a combination of the corresponding functional building blocks.

To facilitate the interpretation of associative text part21 files the following sections give some guidelines on traversing the files.

Non-styled vs. styled text

Text_literals not referenced by an annotation_text_occurrence are non-styled text elements. These text_literals occur as items of the annotated shape_representation. Styled text is as well part of the items list of the annotated shape_representation but additionally has an instance of annotation_text_occurrence pointing to it. The instances of annotation_text_occurrence are founded in the draughting_model.

Usage of callouts

If associativity between annotation text elements and portions of shape shall be represented, the associativity is implemented via shape_aspect_associativity that associates the respective portion of shape with a draughting_callout. Thus if associativity is desired, a callout has to be used. If the associativity does involve a leader curve, then leader_directed_callout shall be instantiated. In scenarios in which the exchange of the leader lines is not desired the supertype draughting_callout shall be instantiated. If the styled text is used to annotate a shape without associativity, it is not necessary to instantiate draughting_callout.

Part 21 file example

The following is an example of a resulting Part 21 file that supports 3D associated annotation text. The picture that it represents is the following:

Example.gif
Figure 9. Example

Instance diagrams depicting the use of the concepts described in 3.1, 3.2, 3.4, and 3.5 with the instances defined in the Part 21 file are shown in diagrams 10 and 11 below.

Instance diagram 1.gif
Figure 10. Instance diagram 1
Instance diagram 2.gif
Figure 11. Instance diagram 2

Known issues

Restrictiveness of shape_aspect_associativity

In our opinion, shape_aspect_associativity is too constrained within AP202 and AP214. It only allows for associations of leader curves, projection curves, or fill area boundaries to geometric model elements. It should allow for other types of annotation associations as well. What if someone wanted to associate an annotation_text_occurrence that is NOT directed to a shape element via a leader curve or a projection curve? There are systems that automatically compute the leader curves given the association between annotation and elements. The instantiation of the leader curves in these CAD kernels are not transparent to the API used for the STEP processors. Thus for these systems the exchange of associated text without leader curves is an important case.

AP 214 global rules

The approach requires the removal of the global rule draughting_model_annotation_layers FOR (draughting_model). This rule states that each annotation_occurrence shall have a presentation_layer assigned. Since there are systems that support associative text as 3D notes but do not have layers, this rule is seen as too restrictive in the scope of this effort.

Associated_draughting_callout application object in AP214 ARM

The capability described herein strongly corresponds to the associated_draughting_callout application object described in the AP214 application reference model as a requirement. Unfortunately the mapping specified in 214 does not fully cover the requirements associated with this effort. A ballot comment to AP214 DIS to adapt the approach described herein has been submitted and is being incoporated into the document.

AP 203 global rules

The schema combining asssociative_text and AP 203 requires the removal of following rules:

  • RULE application_context_requires_ap_definition FOR (application_context, application_protocol_definition);
  • RULE subtype_mandatory_representation FOR (representation);
  • RULE subtype_mandatory_shape_representation FOR (shape_representation);

Availability of implementation schemas

AP214

The AP214 DIS schema supports the implementation of the capabilities as described. The schema can be retrieved via anonymous ftp from:

ftp://ftp.prostep.de/pub/AP214/Schemas/DIS/automotive_design.exp

AP203 with modular extensions

The short form for the associative dimensions extension, its corresponding long form, and the long form schema combining AP 203 and the associative dimension can be accessed via the WWW from:

http://www.cax-if.org
Personal tools