Mechanical Modeler |
Mechanical Modeler Novelties- ImpactsV5R13 & V5R14 novelties |
|
Technical Article |
AbstractSince V5R13, Mechanical Modeler has introduced novelties which can imply modifications in your existing code, or can have consequences on the way to lead up your new developments. The article has been cut in two parts, the first one presents the novelties [1], and the current one exposes the consequences in term of code for each kind of CAA applications. This article requires Mechanical Modeler knowledge. However to help the reader, along the paragraphs, technical articles explaining Mechanical Modeler concepts are referenced. |
You are an application consulting the contents of a Part document in order to perform analysis or to do data transfers. You should know how to retrieve the geometrical features of a set [2], and their topological result [3].
To retrieve the contents of a set in order to retrieve its result, do not more use the CATIDescendants interface, but use the CATIBodyRequest interface. There are, at least, two reasons:
Read the referenced article [3] for more information about the behavior and usage of the CATIBodyRequest interface.
Nevertheless, if you need all the
aggregated geometrical features of a set, you can always use the GetDirectChildren
method of CATIDescendants with the CATIGeometricalElement3D
interface as filter.
You are an application instantiating Dassault Systemes (DS) or CAA geometrical features. The first question to solve is: where will be inserted the new feature? Answering this question enables you to know the valid geometrical features sets to insert your feature. Then, you could know the impacts in your existing code. This section is divided in two parts:
You are an application instantiating Dassault Systemes (DS) or CAA surfacic features. You can have three strategies to choose the valid geometric features set:
It means that the surfacic feature can be inserted equally into a Body, into an Ordered Geometrical set, or into a Geometrical Set. Using this solution, you are DS compliant.
It means that the surfacic feature can be only inserted into a surfacic features set: either into an Ordered Geometrical set, or into a Geometrical Set, but not into a Body feature.
It means that the surfacic feature will be always inserted into a non ordered surfacic features set. You may choose this solution if do you not want to disturb your clients, or your end users. They will have the same interactive behavior as before V5R13.
Now, for each strategy, the following table [Tab.1] summarizes the checks to do in your existing code.
Strategic choice | CATIGSMProceduralView use | Interface to filter a valid set | Insert the feature into the set | Migration between V5R13 and V5R14 |
You do not care of the geometrical features set | possible | CATIGSMTool | impact | no |
You do not want an insertion into a solid and surfacic features set | no more possible | CATIMmiGeometricalSet | impact | R14 only |
You only want an insertion into a Geometrical Set | no more possible | CATIMmiNonOrderedGeometricalSet | no impact | no |
InsertInProceduralView
method, the second column shows if you can always use it. If you cannot
use it, you should modify your code to do yourself the two steps which are
described in the next point. Nevertheless, if you can always use it, do not
forget to see the second step of the next point.
-> The CATIGSMProceduralView interface is not always possible because this interface allows the integration in any kind of geometrical features set.
The elementary steps to insert a new feature in a geometrical features set are:
The third column names the interface which enables you to filter the
valid geometrical features set. If the current set, retrieval by the GetCurrentTool
method of the CATIPrtPart interface, does not implement the given
interface, the DS strategy is to create a new Geometrical Set. Check in your existing code the
filtering interface.
The forth column shows if you have an impact in this step.
For those which did not use CATIGSMProceduralView, or cannot use it now, the following code shows, in bold, the lines to add in your existing code:
... CATIGSMTool *pIGSMToolOnMyTool = .... ; int TypeOrderedSet = -1 ; piGSMTool->GetType(TypeOrderedSet); if (TypeOrderedSet == 1 ) { aggregates the new surfacic feature in pIGSMToolOnMyTool. }else {// your previous code } Update the feature ... |
The way to aggregate the feature into the set is detailed in the "How Insert a Geometrical Feature into a Geometrical Features Set" section of the referenced article [1].
For every body, after the aggregation, you must call the Insert
method of the CATMmrLinearBodyServices class [4].
... if (TypeOrderedSet == 1) { CATMmrLinearBodyServices::Insert(pointerOnNewFeature); } ... |
The fifth column shows if you have an impact in R14, if you have already done a migration in R13 to take the Ordered Geometrical Set into account.
Whatever the choice, you must check that the feature to insert implement CATIInputDescription. It is mandatory for any surfacic features. For DS surfacic features, the implementation has been done. You have only to check your CAA surfacic features.
You can refer to the Combined Curve use case [5], where the three choices have been implemented.
You are an application instantiating Dassault Systemes (DS) or CAA solid features. There are two cases to consider:
Factories creating DS solid features, automatically integrate the solid feature in the current Body.
Your code to insert the feature into a set is based on the CATIMechanicalTool interface. So the insertion will be now either into a MechanicalTool, or an HybridBody.
To aggregate the solid feature into the set there is no impact. But, after the update of your feature, you
must call the Insert
method of the CATMmrLinearBodyServices
class if the set is a solid and surfacic features set. In bold, the new
lines to add in your existing code:
... Update the feature CATIMechanicalTool *pIMechToolOnMyTool = .... ; CATIGSMTool *pIGSMOnMyTool= NULL ; rc = pIMechToolOnMyTool->QueryInterface(IID_CATIGSMTool,(void)**&pIGSMOnMyTool); if (SUCCEEDED(rc) ) { CATMmrLinearBodyServices::Insert(pointerOnNewFeature); } ... |
You are an application handling geometrical features, in other words your application modifies the contents of a set, modifies inputs of a feature, or delete a feature. The following table [Tab.2] summarizes the prohibited operations, and the new line of code to write depending on the type of the set where the operation is done.
Operation Types | OGS | Body | GS | |
Moving surfacic features coming from a GS | to |
impossible |
impossible |
no impact |
Moving surfacic features coming from an OGS/Body | to | impossible | impossible | impossible |
Reordering features | into |
impossible |
impossible |
no impact |
Modifying feature inputs | into |
After the update of the feature,
|
no impact |
no impact |
Deleting features | into | impossible | impossible |
no impact |
Some explanations:
Insert
method of the CATMmrLinearBodyServices reorder
method.Consequently, in your existing code, you must check the type of the set, and then execute the code depending on its type such as described just above [Tab.2].
If you have an application instantiating Power Copy or User feature [6] you have nothing to do since the software of instantiation automatically manages the insertion into a set whatever its type.
For a User feature, solid or surfacic, you do not have to implement the CATIInputDescription interface. It is automatically managed by the User Feature software.
If you have implemented the CATIEdit interface on your "typed" surfacic User Feature, the only one impact is to manage the current feature in the edition command. You should set as current the edited instance, and restore the old current feature once the edition is ended. Otherwise (for a solid User Feature), you have no impact, because the current feature must be already managed by your command.
The following table [Tab.3] summarizes these purposes:
Operation | CATIInputDescription implementation | Edition |
Power Copy | no implementation | always impossible |
Surfacic User Feature | no implementation | manage the current feature such as described below |
Solid User Feature | no implementation | no impact |
For a surfacic User Feature, you can refer to the CAAMcaUdfEdition use case [7], for a detailed implementation. This use case highlights the added lines in the existing command.
If you have already done the migration in R13, your code is still valid for the R14.
If you have an application creating CAA geometrical feature [8], the following table [Tab.4] summarizes the impacts in your existing code.
CATIInputDescription implementation |
Creation Command |
Edition Command (CATIEdit implementation) | |
Solid feature | NO |
* Manage the valid set - see the Solid
feature Instantiation section
* Add an Insert call after the update of the feature
|
no impact |
Surfacic feature | YES |
* Manage the valid set - see the
Surfacic Feature Instantiation
section.
* If creation into an OGS/Body : - Manage the current feature (1) - Add an Insert call after the update of the feature
|
If feature is into OGS/Body : - Manage the current
feature (2)
|
Some explanations:
Insert
method of the CATMmrLinearBodyServices class You can refer to the Combined Curve use case for the implementation of the CATIInputDescription interface [9], and a sample of existing command of creation and edition, updated to integrate the R13 and R14 novelties[10].
[Top]
V5R13 and V5R14 have introduced novelties which can involved your existing code. The main code impacts are:
[Top]
Version: 1 [Mar 2004] | Document created |
[Top] |
Copyright © 2004, Dassault Systèmes. All rights reserved.