Equipment & Systems |
Distributive Systems |
Accessing Stretchable Part DataHow to access stretchable part data |
Use Case |
AbstractThis article discusses the CAAPspStretchable use case. |
This use case is intended to show you how to obtain data defining a stretchable object.
[Top]
CAAPspStretchable is a use case of the CAAPlantShipInterfaces.edu framework that illustrates CATPlantShipInterfaces framework capabilities.
[Top]
The goal of CAAPspStretchable is to show you how to use the CATPlantShipInterfaces methods to query and obtain data defining stretchable objects.
[Top]
To launch CAAPspStretchable, you will need to set up the build time environment, then compile CAAPspStretchable along with its prerequisites, set up the run time environment, and then execute the sample. This is fully described in the referenced article [1]. When launching the use case, you must pass the following arguments:
[Top]
CAAPspStretchable code is located in the CAAPspStretchable.m use case module of the CAAPlantShipInterfaces.edu framework:
Windows | InstallRootDirectory\CAAPlantShipInterfaces.edu\ CAAPspStretchable.m |
Unix | InstallRootDirectory/CAAPlantShipInterfaces.edu/ CAAPspStretchable.m |
where InstallRootDirectory
is the root directory of your CAA V5
installation. It is made of two unique source files named
CAAPspStretchableMain.cpp and CAAPspStretchable.cpp.
Additional prerequisite code is located in the CAAPspUtilities.m directory of the same framework.
[Top]
There are four logical steps in CAAPspStretchable:
[Top]
In this use case, we open an input document containing some Equipment and Piping Design objects.
[Top]
The CAAPspStretchable code is derived from the CAAPspBaseEnv base class. The base class contains functionality common to the other CAAPsp samples. Initializing the environment involves the following methods:
CAAPspBaseEnv::CreateCATProductEnv CAAPspBaseEnv::ApplicationInit |
This method performs the following functions:
[Top]
The CATIPspStretchableData interface is used to retrieve a list of points defining a stretchable part and a list of bend radius for each definition point. In this sample, the CATIPspStretchableData interface pointer is obtained from a bendable pipe in the document.
CATListValCATMathPoint ListOfPoints; CATListOfDouble ListOfRadii; if ( SUCCEEDED(piStretchable->ListDefinitionPoints(NULL,ListOfPoints)) ) { NumOfPts = ListOfPoints.Size(); cout << "Number of pipe definition points: " << NumOfPts << endl; for ( int i = 1; i <= NumOfPts; i++ ) { mPt = ListOfPoints[i]; mPt.GetCoord(PtCoord); X = PtCoord[0]; Y = PtCoord[1]; Z = PtCoord[2]; } } if ( SUCCEEDED(piStretchable->ListBendData(ListOfRadii)) ) { NumOfPts = ListOfRadii.Size(); for ( int i = 1; i <= NumOfPts; i++ ) { Radius = ListOfRadii[i]; } } |
[Top]
This use case has demonstrated how to use the Psp interfaces to obtain stretchable part data. Specifically, it has illustrated:
[Top]
[1] | Building and Launching a CAA V5 Use Case |
Version: 1 [April 2004] | Document created |
[Top] |
Copyright © 2004, Dassault Systèmes. All rights reserved.