Mechanical Modeler

The Contents of the Specification Container - Geometrical Features Sets

What is an Ordered Geometrical Set, a Geometrical Set, a Body?
Technical Article

Abstract

The article entitled "The Structure of a Part Document" [1] shows that the Part document contains four main containers, one of which is the specification container. This container contains the mechanical features. The mechanical features can be divided in three categories:

  • The Part feature: the main feature containing the design of the object to be built, and in particular geometrical features sets.
  • The geometrical features sets: the features containing either other geometrical features sets, or geometrical features.
  • The geometrical features: those which hold a topological result.

This article is the second one of a trilogy. Its aim is to detail the second category:  what are the geometrical features sets, how are they created, how are they retrieved in a Part document. The first article [2] details the Part feature: what is the Part feature, how is it created, how is it retrieved in a Part document ?.  Finally, the last article [3] details the geometrical features: what are they, their type, the existing geometrical features ,and how they are aggregated by the geometrical features sets.  

All of these articles are included in a set of documents presented in the "Mechanical Modeler Overview" article. [4]. 


What are the Geometrical Features Sets?

Two Kinds of Geometrical Features Sets

The geometrical features set are mechanical features including geometrical features [3], and which can include another geometrical features sets. There are two kinds of geometrical features sets:

 The following picture [Fig.1] shows them in the specification tree with their external name (English name) .

Fig.1: The Geometrical Features Set 

StartUps and Interfaces

The geometrical features sets are features created from StartUps [5] deriving from the MechanicalRoot StartUp. 

Fig.2: The MechanicalRoot Architecture

The next diagram, Fig.3, shows the interfaces which can help you to differentiate them. 

Fig.3 Geometrical Features Sets and their Interfaces

Ordered Sets

The Ordered Geometrical Set, and Body are geometrical features sets introducing two concepts:

This section is an overview on these two concepts, you are encouraged to read the referenced article [6] to find out more technical information.

  1. Ordered Concept

    The goal is having a set inside which features are ordered from the basic features (top) to features with huge historical graph (bottom). To reach it, a rule has been defined: "Each feature inside an ordered set can only have as input specifications features which are above it".  It has been interactively implemented by following these behaviors:

    1. When editing a feature, it becomes the current feature,
    2. A new feature is inserted just below the current feature,
    3. The input specifications of a feature can only be features above it in the specification tree using the CATFeatureImportAgent class,
    4. Only features above the current feature are visualized in the 3D viewer.

  2. Absorption Concept

    The goal is having a set inside which only the relevant features are taken into account. Let us consider the following sample:

    Fig.4 Split Operation

    On the [Fig.4], just above, you can see in the 3D viewer, even if Extrude.1 is not hidden (its icon is not grayed), that only one surface is drawn. It is Split.1, the surface coming from the split operation. Extrude.1 has been like "absorbed" by Split.1. So feature such as Extrude.1 are named absorbed features, and those as Split.1 are named absorbent features. 

    So the main particularities of an absorbed feature are:

    The interface which defines the type of a feature, is CATIInputDescription.

In all Mechanical Modeler articles, the wording to designate both the Ordered Geometrical Set and the Body features, is "ordered set" .

The CATIGSMTool interface, implemented both by the OGS and the Body feature [Fig.3], enables you to know the status of a geometrical features set. The GetType method of this interface answers 1 for an ordered set, otherwise 0.

[Top]

The Solid and Surfacic Features Set (Body)

The Body features occupy some volume in space, they can model objects of the real world and display attributes such as weight or center of gravity, once assigned a material specification. 

Fig.5 Body Feature

The term "solid and surfacic features set" is also used because a Body feature can contain surfaces features in addition to solid features. These surfacic features can be: points, wires, and surfaces but not volumes.

Fig.6: A Solid and Surfacic Features Set

Creating Body Feature

The following table [Tab.1] shows that a Body feature can be only aggregated within a Part Feature [2], or an Ordered Geometrical Set.

Tab.1 Where can be aggregated a Body Feature?
Part  GS OGS Body
Body

X

X

The method to create a Body feature is the CreatePRTTool method of the CATIMechanicalRootFactoty interface. There are two signatures for this method.

The CreatePRTTool methods check the validity of iDestination. If it is not the Part feature, or an Ordered Geometrical Set, the returned value is NULL_var. 

Retrieving the Main Body Feature

The main Body feature is the PartBody. It is automatically created at the Part document creation and cannot be deleted. The interface to retrieve it is CATIPartRequest (MecModInterfaces):
  ...
  CATIPartRequest *pICATIPartRequestOnPart =NULL ;
  HRESULT rc = spSpecObjectOnPart->QueryInterface(IID_CATIPartRequest,
                              (void**)&pICATIPartRequestOnPart );
  if ( SUCCEEDED(rc) )
  {
     CATBaseUnknown_var ThePartBody ;
     CATUnicodeString ViewContext="MfDefault3DView";
     rc = pICATIPartRequestOnPart->GetMainBody(ViewContext,ThePartBody);
  ...

Where spSpecObjectOnPart is a smart pointer on the Part. Refer to the "Retrieving the Part feature"  section of the referenced article [2] to see the way to retrieve this smart pointer.  

About the view context: There is a default view context which is represented by the MfDefault3DView string. For some applications, such as Sheet Metal, another view context can be used to represent the same object in a different way. (MfUnfoldedView for an unfolded view). Except these two values, you can set anything, it will be the default 3D view, but it is not guarantee for future versions.

Retrieving Body Features

Where spSpecObjectOnPart is a smart pointer on the Part. Refer to the "Retrieving the Part feature"  section of the referenced article [2] to see the way to retrieve this smart pointer.  

How to Operate a Body Feature?

The PartBody is the main body, those which holds the design of the part to create. In the case of a complex piece, it can be easier to decompose the design. So, a part of the design can be created in sub-bodies, in Body features, and next the final design will be realized in making operations between the Body features. These operations are boolean operations.

The boolean operations are: Assemble, Add, Remove, Intersect. Here is an example explaining the modifications which occur in a model due to a boolean operation.

Fig.7: Operation Between Body Features

In the above picture, you can see that Body.2, previously aggregated by Part1, has been operated with the PartBody. In the PartBody feature, a new feature, Remove.1 has been created. Body.2 is now aggregated by Remove.1.

CATIPrtBooleanFactory (PartInterfaces) is the interface used to create boolean operations. The CATIMechanicalTool (MecModInterfaces) and its GetBooleanOperation() method enables knowing if the Body feature is a body used by a boolean operation. 

[Top]

The Surfacic Features Set (OGS/GS)

The surfacic features set is mainly made of 0 thickness elements, such as planes, surfaces, wireframe geometry. But it can also contain volumes.

Fig.8: Surfacic Features Sets

 

Creating a Surfacic Features Set

The following table [Tab.2] summarizes where a surfacic features set can be aggregated. The first column is the feature to aggregate, and the first row specifies the aggregating feature.

Tab.2 Where to aggregate an OGS or a GS?
  Part  GS OGS Body
GS

X

X

   
OGS

X

 

X

X

Such as the Body feature, the methods to create an Ordered Geometrical Set, or a Geometrical Set are methods of the CATIMechanicalRootFactory interface. The CreateGeometricalSet method enables you to create a Geometrical Set, and the CreateOrderedGeometricalSet enables you to create an Ordered Geomerical Set. Both having the same behaviors, only the first one has been used to explain their usage. 

The signature of  the CreateGeometricalSet method is the following: 

...
 virtual HRESULT CreateGeometricalSet(const CATUnicodeString& iUserName, 
                                            const CATISpecObject_var& iDestination,
                                            CATISpecObject_var  & oGeomSet,
                                            int iPosition=-1 ) = 0 ;
...

The following array summarizes where is located the newly created set by taken the different parameters of the method into account.

  iDestination = Part iDestination g Part
iPosition = -1 The new set is located at the end of the Part iDestination and the new set have the same father. The new set is just after iDestination
iPosition = 0 The new set is located at the end of the Part The new set is located at the end of iDestination
 0 < iPosition <= size of iDestination The new set is located at iPosition +1 within Part The new set is located at iPosition +1 within iDestination
Otherwise  E_FAIL E_FAIL

The CreateGeometricalSet and CreateOrderedGeometricalSet methods check the validity of iDestination based on the previous table [Tab.2]

Retrieving Surfacic Features Set

There are two ways to retrieve a surfacic features set:

Where spSpecObjectOnPart is a smart pointer on the Part. Refer to the "Retrieving the Part feature"  section of the referenced article [2] to see the way to retrieve this smart pointer.  

Private Surfacic Features Set 

A private surfacic features set is protected from interactive modifications. It means that end users cannot modify the structure of such a set:

Note, that however the private surfacic set is not protected from all CAA code modifications. CATIMechanicalRootFactory will not allow to define a private set as destination to aggregate a set. On the other hand, CATIDescendants interface will allow to append a set in a private set. So to aggregate a set in a set, to benefit from all necessary controls in terms of aggregation and privacy, the use of  CATIMechanicalRootFactory is advised against CATIDescendants.

So generally speaking, if the end user wants to aggregate a feature, not necessarily a set, in a set, if he wants to use CATIDescendants he should first test if the set is private thanks to CATIGSMTool interface and  its IsPrivate method. Note that a Body feature, implementing CATIGSMTool too, can be private.

[Top]


In Short

The specification container is one of the containers of the Part document. It groups together the mechanical features. Part of these are the geometrical features set. There are two types of geometrical features set:

The following table summarizes what they can contain (the first row is the aggregating feature):

  Part  GS OGS Body
GS X  X    
OGS X   X X
Body X   X
Solid features X
Point, Wire (including Sketch), Surface X X X
Volume X X

This above table essentially shows:

  1. A Geometrical Set (GS) can only be included into a non ordered set.
  2. An ordered set (OGS/Body) can only be included into an ordered set.
  3. A volume, although a surfacic feature, cannot be included into a Body feature, such as the other surfacic features: point, wire, and surface.

The main interfaces are:

[Top]


References

[1] The Structure of a Part Document
[2] The Contents of the Specification Container - The Part Feature
[3] The Contents of the Specification Container - Geometrical Features
[4] Mechanical Modeler Overview
[5] Feature Modeler Overview
[6] Order and Absorption Concepts
[7] Specification/Result Mechanism Applied to Mechanical Features
[Top]

History

Version: 1 [Dec 2002] Document created
Version: 2 [Nov 2003] Ordered Geometrical Set Introduction + Open_Body renamed in Geometrical Set 
Version: 3 [May 2004] Document updated for R14 novelties
[Top]

Copyright © 2002, Dassault Systèmes. All rights reserved.