Parts Operations
xGetPartsList
Gets parts names.
String xGetPartsList (String sModel, String sParentAssembly, short iLevel)
return
Returns all part names in a String. Each part is separated by ;. To
make it useful, it is needed to be parsed.
sModel
Gets the parts list for this specific model name or CAE model name.
Note: To get all parts in the scene set sModel as an empty String (“”).
sParentAssembly
Reserved for future use. Ignore now and pass an empty String.
iLevel
Reserved for future use. Ignore now and pass 0.
pxGetPartsList
Gets parts names.
List<String> pxGetPartsList (String sModel, String sParentAssembly, short iLevel)
return
Returns all part names in a vector of String.
sModel
Gets the parts list for this specific model name or CAE model name.
Note: To get all parts in the scene set sModel as an empty String (“”).
sParentAssembly
Reserved for future use. Ignore now and pass an empty String.
iLevel
Reserved for future use. Ignore now and pass 0.
pxGetAllPartsList
Gets all part of a model.
List<String> pxGetAllPartsList(String sModel)
return
Returns all parts list of the model.
sModel
Model Name.
pxGetVisiblePartsList
Gets currently visible parts list.
List<String> pxGetVisiblePartsList(String sModel)
return
Returns visible parts list.
sModel
Model Name.
pxGetSelectedPartsList
Gets currently selected parts list.
List<String> pxGetSelectedPartsList(String sModel)
return
Returns selected parts.
sModel
Model Name.
xShowPart
This method will be used to show or hide a part in the scene.
bool xShowPart (String sModel, String sPart, bool bShow)
return
Returns True if successful.
sModel
The model name or CAE model name which contains the part.
Note: To search in full scene, set sModel as an empty String (“”).
sPart
Part name, that to be shown or hidden.
bShow
Flag to set show or hide. True to show.
xIsPartVisible
This method checks a part is in, visible state or hidden state.
bool xIsPartVisible (String sModel, String sPartName)
return
Returns True, if part exists and is visible.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sPartName
Part’s name that to be checked for shown or hidden.
xShowAssembly
This method is used to show or hide all the parts in an assembly.
bool xShowAssembly (String sModel, String sAssembly, bool bShow)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sAssembly
Assembly name, whose children (parts) are to be shown are hidden.
bShow
Flag to show/ hide the assembly. Set True to show.
xIsAssemblyVisible
Checks the visible state of the parts in the assembly.
bool xIsAssemblyVisible (String sModel, String sAssemblyName)
return
Returns True, if any part of the assembly is visible.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sAssemblyName
Assembly name, for which visible state to be checked.
xRename
Changes the name of the part /assembly.
bool xRename (String sModel, String sOldName, String sNewName, short iType)
return
Returns True, if any part of the assembly is visible.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sOldName
Name of the part in the scene that to be renamed.
sNewName
The new name that to be set.
iType
Type of the object. Set 0 for assembly, 1 for a part.
xDeleteObject
Deletes the part/assembly from the scene.
bool xDeleteObject (String sModel, String sObjectName, short iType)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sObjectName
Part name or assembly name that to be deleted from the scene.
iType
Object type indicator. 0 for assembly. 1 for a part.
xDisplayOnePart
Displays a single part and hides all other parts in the model.
bool xDisplayOnePart(String sModel, String sPartName, bool bFitView)
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sPartName
Name of the part to be displayed.
bFitView
Set True to fit the model to the viewer window.
xSelectNodeEx
This method is used to select a part or assembly in the specified model.
bool xSelectNodeEx(const String sModel, const String sNodeName, long iSelectionMode, short iNodeType)
return
Return True on success.
sModel
The model name or CAE model name which contains the part.
Note: To search in full scene, set sModel as an empty String (“”).
sNodeName
Part name or assembly name to be selected.
iSelectionMode
0 for Append with previous selection
1 will remove previously selected nodes and select the new one passed
iNodeType
Pass 0 for assembly, 1 for a part.
xSetColor
Sets user defined part/assembly diffuse color.
bool xSetColor (String sModel, String sObjectName, short iType, short iR, short iG, short iB)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sObjectName
Part name or assembly name to change color.
iType
Object type indicator. 0 for assembly. 1 for a part.
iR, iG, iB
RGB color value. Valid Range 0 to 255.
xSetRandomColor
Sets the random diffuse color for the specified part/assembly.
bool xSetRandomColor (String sModel, String sObjectName, short iType)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sObjectName
Part name or assembly name to be changed.
iType
Object type indicator.0 for assembly. 1 for a part.
xSetAssemblyColor
Sets the diffuse color for parts in the assembly.
bool xSetAssemblyColor (String sModel, String sAssembly, float fRed, float fGreen, float fBlue)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sAssembly
Assembly name, to which diffuse color has to set.
fRed
RGB red color. Range 0 to 255.
fGreen
RGB green color. Range 0 to 255.
fBlue
RGB blue color. Range 0 to 255.
xAddPartAttribute
Adds an attribute to part’s existing attributes list.
bool xAddPartAttribute(String sModel, String sPart, String sAttribute)
return
Returns True if successful.
sModel
Model name.
sPart
Part name.
sAttribue
Part Attribute Value that to be set.
xSetPartAttributeList
Sets attribute info for a part.
bool xSetPartAttributeList(String sModel, String sPart, String sAttributeList)
return
Returns True, if successful.
sModel
Model name.
sPart
Part name.
sAttributeList
Part attribute value to be set.
pxGetPartAttributeList
Gets part’s attribute info.
List<String> pxGetPartAttributeList(String sModel, String sPart)
return
Returns part attribute list.
sModel
Model name.
sPart
Part name.
pxGetPartBounds
Gets the bound box of a part.
List<float> pxGetPartBounds(String sModel, String sPart, bVisible=True, bDerived=True)
return
Returns array of size 6 if successful.
Order: xmin,xmax,ymin,ymax,zmin,zmax When Model and Part names are empty,it returns current model bounding box.
sModel
Model name. Empty string will be applied to current model.
sPart
Part name
Empty string will be applied to model bound box.
bVisible
If
True, finds bounding values only for visible parts.
bDerived
If
True, Finds the bound values in global coordinates.If
False, Local coordinate values will be found.
pxGetSphericalBounds
Gets the bounding sphere.
List<float> pxGetSphericalBounds(String sModel, String sPart, bVisible=True, bDerived=True)
return
Returns array of size 4 for bounding sphere values.
Order:cx,cy,cz,radius.
sModel
Model name
sPart
Part name
bVisible
If
True, finds bounding values only for visible parts.
bDerived
If
True, Finds the bound values in global coordinates.If
False, Local coordinate values will be found.
pxGetBoundSphere
Gets bounding sphere for a model or sub-assembly or part.
List<float> pxGetBoundSphere(String sModel,String sNode,int iType,bVisible=True, bDerived=True)
return
If successful returns array of size 4,else returns an empty array.
Order: cx, cy, cz, radius
sModel
Model name.
sNode
The node name can be a part name or sub-assembly name or empty string
iType
Indicate node name as part name or sub-assembly name.
Use 0 for sub-assembly. 1 for part.
Note 1: If the Node name is an empty string it returns Model’s bounding sphere
Note 2: If Model name is an empty string it returns first found node’s bounding sphere
Note 3: If both Model and Node name are empty strings it returns scene bound sphere.
bVisible
If
True, finds bounding values only for visible parts.
bDerived
If
True, Finds the bound values in global coordinates.If
False, Local coordinate values will be found.
xSetPartDisplayMode
Sets display mode to a part.
short xSetPartDisplayMode (String sModel, String sPart, ushort iDisplayMode)
return
Returns previous display mode.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sPart
Part name, for which display mode has to be set.
iDisplayMode
0 - Shaded
1 - Shaded Mesh
2 - WireFrame
3 - Hidden Line Removal
4 - Point
5 - Transparent
xGetPartDisplayMode
Gets display mode for a given named part.
int xGetPartDisplayMode (String sModel, String sPart)
return
Returns -1, if failed.
Returns non-negative integer, if success.
0 – Shaded
1 – Shaded Mesh
2 – Wireframe
3 – Hidden Line Removal
4 – Points
5 – Transparent
sModel
Model Name.
sPart
Part Name.
xSetAssemblyDisplayMode
Sets display mode to children(parts) of the assembly.
bool xSetAssemblyDisplayMode (String sModel, String sAssembly, ushort iDisplayMode)
return
Returns previous display mode.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sAssembly
Assembly name for which children (parts) display mode has to be set.
iDisplayMode
0 - Shaded
1 - Shaded Mesh
2 - WireFrame
3 - Hidden Line Removal
4 - Point
5 - Transparent
xShowNode
Sets the visibility flag for a part or assembly.
bool xShowNode(bool bShow, String sNodeName, long iID, short iType)
return
Returns True, if successful.
bShow
Set True to show the part/assembly.
sNodeName
Assembly or part name.
iID
For future use. Just pass -1.
iType
Specifies passed name is part or assembly. Set 0 for assembly 1
for Part.
xSetFocus
Sets focus by zoom in/out to a part.
bool xSetFocus (String sModel, String sPart)
return
Returns True, if successful.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sPart
Part name to get focus.
xSetPartColor
Sets the diffuse color of the part.
bool xSetPartColor (String sModel, String sPart, float fRed, float fGreen, float fBlue, int iColorType)
return
Returns True, if success.
sModel
Reserved for future use. Can be ignored now by passing an empty String.
sPart
Part name.
fRed
RGB color, red value. Range 0 to 255.
fGreen
RGB color, green value. Range 0 to 255.
fBlue
RGB color, blue value. Range 0 to 255.
iColorType
0 – Ambient color
1 – Diffuse color
2 – Emissive color
3 – Specular color
Note: Diffuse color type will be considered for any wrong input color type. iColorType is introduced from version 21.3
pxGetPartColor
Gets color components of a part. User can get diffuse color, ambient color, emissive color and specular color of the part.
List<float> pxGetPartColor(const String sModel, const String sPart, int iColorType)
return
Returns required part’s diffuse color rgb values in an array.
Order: Red, Green, Blue
sModel
Model name.
sPart
Part name.
iColorType
0 – Ambient color
1 – Diffuse color
2 – Emissive color
3 – Specular color
Note: Diffuse color is default iColorType and this parameter is introduced from version 21.3.(601).
xGetAssemblyList
Gets the sub-assembly names. Assembly: Group node is parent node parts.
String xGetAssemblyList (String sModel, String sParentAssembly, short iLevel)
return
Returns all assembly names as a String. Each assembly is separated by
;. To make it useful, it is needed to get parsed.
sModel
Model name. Can be ignored now by passing an empty String.
sParentAssembly
Assembly name for which sub-assemblies are needed. Ignore now and pass an empty String.
iLevel
Reserved for future use. Ignore now and pass 0.
xSetTransparent
Sets transparency for a part in the model.
bool xSetTransparent(String sModel, String sPart, float fTransparency)
return
Returns True, if successful.
sModel
Model name.
sPart
Part name.
fTransparency
Transparency range 0.0 to 1.0.
xSetAssemblyTransparent
Sets transparency value for all the parts of a sub-assembly.
bool xSetAssemblyTransparent(String sModel, String sAssembly, float fTransparency)
return
Returns True, if successful.
sModel
Model name.
sAssembly
Sub assembly name.
fTransparency
Transparency value. Valid Range 0.0 to 1.0.
xSetTranslation
Sets translation to an assembly in the given model.
bool xSetTranslation(String sModel, String sAssembly, float fTx, float fTy, float fTz, short iMode)
return
Returns True, if successful.
sModel
For future use.
sAssembly
Name of the assembly, to which translation is set.
fTx, fTy, fTz
Translation entries in respective X, Y and Z-axis.
iMode
For future use.
xSetScale
Sets scale entries of an assembly in the given model.
bool xSetScale(String sModel, String Assembly, float fSx, float fSy, float fSz, short iMode)
return
Returns True, if successful.
sModel
For future use.
sAssembly
Name of the assembly, to which scale is applied.
fSx, fSy, fSz
Scale entries of the respective axis. Values should not be 0.
iMode
For future use.
xSetOrientation
Sets orientation to an assembly in the given model.
bool xSetOrientation(String sModel, String sAssembly, float fRx, float fRy, float fRz, float fRangle, short iMode)
return
Returns True, if successful.
sModel
For future use.
sAssembly
Name of the assembly, to which rotation is set.
fRx, fRy, fRz, fRangle
Rotation entries in quaternion form. The angle is in degrees.
iMode
For future use.
xSetTransformationEx
Sets transformation of an assembly in the given model as translation, rotation and scale form.
bool xSetTransformationEx (String sModel, String sAssembly, float fTx, float fTy, float fTz, float fRx, float fRy, float fRz, float fRangle, float fSx, float fSy, float fSz, short iMode)
return
Returns True, if successful.
sModel
For future use.
sAssembly
Name of the assembly, to which transformation is being set.
fTx, fTy, fTz
Translation values of respective axis.
fRx, fRy, fRz, fRangle
Rotation entries in quaternion form. The angle is in degrees.
fSx, fSy, fSz
Scale factors of the respective axis.
iMode
For future use.
pxGetTransformationMatix
Gets transformation matrix of a part or sub assembly.
List<float> pxGetTransformationMatix(String sModel, String sTreeNode, int iTreeNodeType, bool bDerived)
return
Returns 4x4 matrix values in an array of size 16. Each 4 entries represents a row.
sModel
Model Name.
sTreeNode
Part name or sub-assembly name.
iTreeNodeType
Indicates the type of sTreeNode name.
0 for Sub-Assembly, 1 for Part.
bDerived
If set True, returns full transformations derived from parent scene
graph tree nodes. Else, returns local transformation matrix of the part
or sub-assembly.
pxGetAssemblyList
Gets all sceneNodes in a sub assembly node.
List<String> pxGetAssemblyList(String sModel, String sParentAssembly, short iLevel)
return
Returns list of all SubRoots in the sub tree.
sModel
Model name.
sParentAssembly
Sub Assembly node name, from which child scene nodes are needed.
iLevel
Depth of the tree for which scene node is required. Set -1 to get
all the sceneNode.
xSetPartsDisplayMode
Sets display mode for parts of a model..
void xSetPartsDisplayMode (String sModel, int iDisplayMode, int iAllParts)
return
Returns True, if successful.
sModel
The model name for the displaymode to be applied. If the model name is an empty String then iDisplayMode will be applied to all models.
iDisplayMode
Sets display mode. Set True to apply Transparency and False to
apply Shaded mode.
case 1 - SHADE
case 2 - SHADEDMESH
case 3 - WIREFRAME
case 4 - HIDDEN_LINE_REMOVAL
case 5 - POINT
case 6 - TRANSPARENT
iAllParts
Applies iDisplayMode to All parts or Visible Parts or hidden parts, based on this filed.
0 - Applies to all Parts
1 - Applies to all visible Parts
2 - Applies to all hidden parts
pxGetChildNodeList
Gets all child scene nodes for a sub root/sub assembly.
List<String> pxGetChildNodeList(String sModel, String sParentAssembly, short iLevel)
return
Returns attached scenenodes list of sParentAssembly.
sModel
Model name.
sParentAssembly
Sub root node name.
iLevel
For feature use. Now pass 1. It will return direct child scene nodes
attached to the scene node sParentAssembly
pxGetChildPartsList
Gets part list for a scene node/sub assembly.
List<String> pxGetChildPartsList(String sModel, String sParentAssembly, short iLevel)
return
Returns part’s list attached with the sub assembly/scene node/sub root.
sModel
Model name.
sParentAssembly
Sub root node name.
iLevel
For future use. Now pass 1. It will return direct child parts
attached to the scene node sParentAssembly.
pxGetVisiblePartsIDList
Get visible parts ID list.
List<size_t> pxGetVisiblePartsIDList(String sModel)
Return
Returns IDs of all visible parts.
sModel
Model name.
pxGetAllPartsIDList
Get all parts ID list.
List<size_t> pxGetAllPartsIDList(String sModel)
return
Returns IDs of all parts.
sModel
Model name.
pxGetSelectedPartsIDList
Gets all selected parts Id list.
List<size_t> pxGetSelectedPartsIDList(String sModel)
return
Returns IDs of all seleted parts.
sModel
Model name.
xShowPartID
Sets visibility of a part using its ID.
bool xShowPartID(String sModel, size_t sPartID, bool bShow, bool bUpdateLegend=False)
return
Returns Ture if successful.
sModel
Model name.
sPartID
Parts ID to show/hide.
bShow
Set True to show, False to hide that part.
bUpdateLegend
Set True to update legend based on current visible parts.
xShowPartsID
Sets visibility of parts using its IDs list.
bool xShowPartsID(String sModel, List<int> sPartIDs, bool bShow, bool bUpdateLegend=False)
return
Returns True, if successful.
sModel
Model name.
sPartIDs
Parts IDs List to show/hide.
bShow
Set True to show, False to hide those parts.
bUpdateLegend
Set True to update legend based on current visible parts.
pxGetPartsFromRect
Gets the list of parts which falls on the user defined (normalized) rectangle region.
List <String> pxGetPartsFromRect(String sModel, vector<float> rect)
return
Returns an array of part names which falls in the user defined rectangle in the screen.
Returns empty array if failed.
sModel
Model name.
rect
Array of 4 normalized real values, refering left, right, top and bottom values region.
Array[0] - region left value from screen left
Array[1] - region right value from screen left
Array[2] - region top value from screen top
Array[3] - region bottom value from screen top
Note: Top – Left of the viewer window is the origin.
pxGetClosestPartData
This function, for a given point, returns closet distanced part data. It gives closest distance, closest point coords and closest part name.
List <float> pxGetClosestPartData(String sModel, List <float> point, List <String > partListToSearch, float maxDistance)
return
Returns an array of five real values for a given point, if it succeeds.
retArray[0] : closest distance from point to part
retArray[1:3] : (X, Y, Z) coordinates of closest point on the model
retArray[4] : closest part index (from part_list given)
Returns empty array if failed.
sModel
Model name, which contains the part list.
point
Array of 3 real values, refering X, Y, Z coordinates of the given input point.
partListToSearch
List of part names to be searched for closest point.
maxDistance
Maximum distance, in which function works. Other parts beyond this distance from input point are ignored.
pxGetRayHitPartData
Gets list of parts hit by ray and its hit points.
Input: origin and direction vectors of size 3 each, part_list and model name.
Output: array of part index and hit point list.
List <float> pxGetRayHitPartData(String sModel, List<float> origin, List <float> direction, List <String> partsList)
return
Returns an array of 4*number of hit parts, i.e.
[part1_idx,part1_hit_x,part1_hit_y,part1_hit_z,
part2_idx,part2_hit_x,part2_hit_y,part2_hit_z,
...]
Returns empty array if failed.
sModel
Model name.
origin
Origin of ray.
direction
Direction vector of ray.
partsList
List of parts to be examined for hit.
xTransformParts
Transforms the given list of parts based on its overall bounding center with given transform matrix.
Input : model name, part list, transformation data and a boolean relative flag.
Output:
TrueorFalse.
bool xTransformParts(String sModel, List<String> partNames, List<float> transformation, bool bRelative)
return
Returns True if succeeds,
Returns False otherwise.
sModel
Model name.
partNames
List of part names to be transformed.
transformation
Tranlation and orientation values in an array of size 9 at least.
(array[0], array[1], array[2]) - tranlation
(array[3], array[4], array[5]) - oriented x axis
(array[6], array[7], array[8]) - oriented y axis
(array[9], array[10], array[11])- oriented z axis
Note: Z axis vector will be computed if array size = 9.
bRelative
True - appends this rotation to existing rotation.
False - clears existing rotation and sets this rotation (absolute).
xSetPartsRotation
Sets given rotation data to the given list of parts about its overall bounding center.
Input : model name, part list, rotation data
Output:
TrueorFalse
bool xSetPartsRotation(String sModel, List<String> partNames, List<float> rotation, bool bRelative)
return
Returns True if succeeds,
Returns False otherwise.
sModel
Model name.
partNames
list of part names to be oriented.
rotation
An array of values which specifies the rotation. User can give rotation data either in angle-axis form or oriented axes form.
If array size = 4, then application extracts rotation as follows.
array[0] - Angle in degrees
(array[1] , array[2], array[3]) - axis of rotation
If array size = 6
(array[0], array[1], array[2]) - oriented X axis
(array[3], array[4], array[5]) - oriented Y axis
Z-axis will be computed by application
If array size = 9
(array[0], array[1], array[2]) - oriented X axis.
(array[3], array[4], array[5]) - oriented Y axis.
(array[6], array[7], array[8]) - oriented Z axis.
bRelative
True - appends this rotation to existing rotation.
False - clears existing rotation and sets this rotation (absolute).
xSetPartsTranslation
Sets given translation data to the given list of parts.
Input : model name, part list, translation data
Output:
TrueorFalse
bool xSetPartsTranslation(String sModel, List<String> partNames, List<float> translation, bool bRelative)
return
Returns True if succeeds.
Returns False otherwise.
sModel
Model name.
partNames
List of part names to be translated.
translation
An array of exactly 3 values which specifies the translation.
(array[0], array[1], array[2]) - translation vector
bRelative
True - appends this translation from current position.
False – clears existing translation if any, and sets this absolute
translation.
pxGetPartTransformation
Gets translation and rotation data for a given part.
Input : model name, part name and a boolean relative flag.
Output: tranformation data.
List<float> pxGetPartTransformation(String sModel, String partName, bool bRelative)
return
Returns tranlation and rotation data by an array of 12 values if succeeds.
Returns empty array if failed.
(array[0],array[1],array[2]) – translation vector
(array[3],array[4],array[5]) – oriented X-axis
(array[6],array[7],array[8]) – oriented Y-axis
(array[9],array[10],array[11]) – oriented Z-axis
sModel
Model name.
partNames
List of part names to be translated.
translation
An array of exactly 3 values which specifies the translation.
(array[0], array[1], array[2]) - translation vector
bRelative
True : gives local transformation with respect to immediate parent
node.
False: gives overall transformation applied on the part.
xSetTransformation
Sets a transformation matrix (consists of translation, rotation and scaling) to part or a group node.
bool xSetTransformation(String sModel, String sAssembly, float r1c1, float r1c2, float r1c3, float r1c4, float r2c1, float r2c2, float r2c3, float r2c4, float r3c1, float r3c2, float r3c3, float r3c4, float r4c1, float r4c2, float r4c3, float r4c4, short iMode)
return
Returns True, if succeeds.
Returns False otherwise.
sModel
Model name.
sAssembly
Part or Assembly Name.
r1c1, r1c2, r1c3, r1c4, r2c1, r2c2, r2c3, r2c4, r3c1, r3c2, r3c3, r3c4, r4c1, r4c2, r4c3, r4c4
4x4 matrix for transformation.
iMode
For future use.
pxGetHighlightedParts
Gets the list of highlighted parts, not selected parts.
vector<String> pxGetHighlightedParts(String sModel)
return
Returns an array part names which are highlighted.
Returns an empty array if none is highlighted or function fails.
sModel
Model name.
pxGetPartGaps
Gets gaps or shortest distance between two parts across all CAE instances with the changes in the deformations.
vector<float> pxGetPartGaps(String sModel1, String sPart1, String sModel2, String sPart2, vector<String> instanceList)
return
Returns an array of shortest distance values from each cae instance.
Returns an empty array if anything goes wrong.
sModel1
CAE model name of part 1.
sPart1
Name of the Part 1.
sModel2
CAE model name of part 2.
sPart2
Name of the Part 2.
instanceList
List of CAE Instances.
xSetLineThickness
Sets line thickness for geometry lineset.
bool xSetLineThickness(int iThick)
return
Returns True if successful. False when failed.
iThick
Size of line tickness within the range 1-5.
xSetPointSize
Sets point size for pointset geometry .
bool xSetPointSize(int iSize)
return
Returns True if successful. False when failed.
iSize
Size of point within the range 1-5.
xGetTransparent
Gets material transparency value for the given part and model.
float xGetTransparent(String sModel, String sPart)
return
Returns transparency value (alpha) in the interval [0,1]
sModel
Model Name
sPart
Part Name
pxGetPointGeometryParts
Gets ‘Point’ type geometry parts of a model
List<String> pxGetPointGeometryParts(String sModel)
return
Returns part list of ‘Point’ type.
sModel
Model name. If it’s empty,it applies to all models.
pxGetLineGeometryParts
Gets ‘Line’ type geometry parts of a model
List<String> pxGetLineGeometryParts(String sModel)
return
Returns part list of ‘Line’ type.
sModel
Model name. If it’s empty,it applies to all models.
pxGetAllTrisetGeometryParts
Gets all ‘polygon’ type geometry parts of a model
List<String> pxGetAllTrisetGeometryParts(String sModel)
return
Returns part list of polygon type.
sModel
Model name. If it’s empty, it applies to all models.
pxGetClosedTrisetGeometryParts
Gets all closed ‘polygon’ type geometry parts (which has closed surface and completely look like a solid). for a model
List<String> pxGetClosedTrisetGeometryParts(String sModel)
return
Returns closed surface part list of polygon type.
sModel
Model name. If it’s empty, it applies to all models.
pxGetOpenTrisetGeometryParts
Gets all open ‘polygon’ type geometry parts (which has open surface and has plane surface). for a model
List<String> pxGetOpenTrisetGeometryParts(String sModel)
return
Returns non closed surface part list of polygon type.
sModel Model name. If it’s empty, it applies to all models.
pxShowHidePointGeometryParts
Sets visiblity for ‘Point’ type parts.
List<String> pxShowHidePointGeometryParts(String sModel, bool bShow)
Return Returns list of applied parts
sModel
Model name. If it’s empty, it applies to all models.
bShow
Set True to show and false to hide parts.
pxShowHideLineGeometryParts
Sets visiblity for ‘Line’ type parts.
List<String> pxShowHideLineGeometryParts(String sModel, bool bShow)
Return Returns list of applied parts
sModel
Model name. If it’s empty, it applies to all models.
bShow
Set True to show and false to hide parts.
pxShowHideAllTrisetGeometryParts
Sets visiblity for all ‘polygon’ type parts.
List<String> pxShowHideAllTrisetGeometryParts(String sModel, bool bShow)
return
Returns list of applied parts
sModel
Model name. If it’s empty, it applies to all models.
bShow
Set True to show and false to hide parts.
pxShowHideClosedTrisetGeometryParts
Sets visiblity for closed surface polygon parts
List<String> pxShowHideClosedTrisetGeometryParts(String sModel, bool bShow)
return
Returns list of applied parts
sModel
Model name. If it’s empty, it applies to all models.
bShow
Set True to show and false to hide parts.
pxShowHideOpenTrisetGeometryParts
Sets visiblity for open surface polygon parts
List<String> pxShowHideOpenTrisetGeometryParts(String sModel, bool bShow)
return
Returns list of applied parts
sModel
Model name. If it’s empty, it applies to all models.
bShow
Set True to show and false to hide parts.
xSetExplodePositionForParts
Controls exploded positions for a given partslist.
Note : This funtion will work only when model is exploded.
bool xSetExplodePositionForParts(String sModel, List<String> sPartsList, int iPos)
return
Returns True if sucessful.
sModel
Model name.
sPartsList
Parts list for the expolded postion to be set.
iPos
Sets exploded percentage control position. Range 0 to 100.
xSetExplodePositionForPartsEx
Controls expoloded position to spectfic partslist with specific values.
Note : This funtion will work only when model is exploded.
bool xSetExplodePositionForPartsEx(String sModel, List<String> sPartsList, List<int> iPosList)
return
Returns True if sucessful.
sModel
Model name.
sPartsList
Parts list for the expolded postion to be set.
iPosList
Sets exploded percentage control positions for specified parts in sPartsList. Range 0 to 100.
Note: size of the sPartsList must be size iPosList.
iPosList[i] is exploded position for the part specifed in sPartsList[i]
xGetGeometryType
Get geometry type whether it is point data or line data and triangles.
int xGetGeometryType(String sModel, String sPart)
return
Returns an integer between 0 and 4 for the given model and part combination.
1 - Point Type
2 - Line Type
3 - Triangles
Returns -1 when fails.
sModel
Model Name
sPart
Part Name.
xDeleteParts
Deletes a list of parts for the given model.
bool xDeleteParts(String sModel,List<String> partList)
return
Returns True if parts are deleted successfully
Returns False otherwise.
sModel
CAE Model Name
partList
Part List
xGetPartName
Gets the part name for the given part ID.
String xGetPartName(size_t iPartID)
return
Returns part name if succeeds. Returns empty string otherwise.
iPartID
Part ID
pxGetPartNames
Gets part names for the given part ID list.
List<String> pxGetPartNames(List<size_t> partIDList)
return
Returns part name list if succeeds.
Returns empty list otherwise.
partIDList
List of Part IDs
xGetPartID
Gets part ID for the given part name.
size_t xGetPartID(String sModel, String sPartName) ` return
Returns part ID (non-zero )if succeeds.
Returns zero otherwise.
sModel
Model Name
sPartName
Part Name
pxGetPartIDs
Gets part ID list for the given part name list.
List<size_t> pxGetPartIDs(String sModel, List<String> sPartNameList)
return
Returns part ID list if succeeds.
Returns empty list otherwise.
sModel
Model Name
sPartNameList
List of Part Names
xIsPartFeatureEdgeON
Checks if the part is displayed with Feature Edges or not and returns a flag.
bool xIsPartFeatureEdgeON(String sModel, String sPart)
return
Returns True if the part is displayed with Feature Edges.
Returns False otherwise.
sModel
Model Name.
sPart
Part Name.
xShowPartFeatureEdge
Set feature edge flag to the given part of the model.
bool xShowPartFeatureEdge(String sModel, String sPart, bool bShowEdge)
return
Returns True if it succeeds.
Returns False otherwise.
sModel
Model Name.
sPart
Part Name.
bShowEdge
True - displays feature edge.
False - hides feature edge.
xGetParent
Gets parent Object name of a scenegraph object name.(Part or Assembly)
String xGetParent(String sModel, String sObjName,int iType)
return
Returns Parent object’s Name.
sModel
Model Name.
sObjName
Object (Part/Assembly) name.
iType
Object Type.
0-Assembly
1-Part
xGetParentID
Gets parent Object ID of a scenegraph object.(Part or Assembly)
size_t xGetParentID(String sModel, String sObjName, int iType)
return
Returns Parent object’s ID.
sModel
Model Name.
sObjName
Object (Part/Assembly) name.
iType
Object Type.
0-Assembly
1-Part
xGetParentEx
Gets parent Object name of a scenegraph object ID.(Part or Assembly)
String xGetParentEx(size_t iObjectID, int iType)
return
Returns Parent object’s Name.
iObjectID
ID of the Object (Part/Assembly).
iType
Object Type.
0-Assembly
1-Part
xGetParentIDEx
Gets parent Object ID of a scenegraph object ID.(Part or Assembly)
size_t xGetParentIDEx(size_t iObjectID, int iType)
return
Returns Parent object’s ID.
iObjectID
ID of the Object (Part/Assembly).
iType
Object Type.
0-Assembly
1-Part