Accessing Exploded States
Functions Introduced:
The function
ProExpldstateInit() returns the handle to a specified exploded state representation of a solid. It takes the following input arguments:
• expld_name—Specifies the name of the exploded state. If you specify this value, then the function ignores the next argument expld_id.
• expld_id—Specifies the identifier of the exploded state. This argument is applicable only if the argument expld_name is NULL.
• p_solid—Specifies the solid that contains the exploded state. This argument cannot be NULL.
The function
ProExpldstateActivate() activates a specified exploded state representation of a solid.
The function
ProExpldstateSelect() enables you to select a specific exploded state from the list of defined exploded states.
The function
ProExpldstateActiveGet() retrieves the current active exploded state for the specified solid.
The functions
ProExpldstateNameGet() and
ProExpldstateNameSet() return and set, respectively, the name of the exploded state.
The function
ProExpldstateExplodedcomponentsGet() returns an array of assembly component paths that are included in the exploded state.
The function
ProExpldStateExplodeLinesGet() returns an array of explode lines for the specified exploded state.
The functions
ProExpldstateMovesGet() and
ProExpldstateMovesSet() retrieve and assign, respectively, the array of moves of an exploded state.
In order to define an exploded position of an assembly component (or a set of assembly components), you need to perform a sequence of moves. For example, you can move the assembly component over the X-axis, rotate over a selected edge, and then move over the Y-axis. In this case, the final position of the assembly component (or a set of assembly components) is attained by three moves.
The ProExpldAnimMoveData object describes the moves of an exploded state. The fields in this object are as follows:
• comp_set—Specifies an array of paths of the assembly components, in the form of the ProAsmcomppath objects.
• move—Specifies the move of the exploded state. It is given by the ProExpldAnimMove object. This object contains the following fields:
◦ move_type—Specifies the move type in terms of the enumerated type ProExpldAnimMoveType. The move can be one of the following types:
▪ PRO_EXPLDANIM_MOVE_TRANSLATE
▪ PRO_EXPLDANIM_MOVE_ROTATE
◦ direction—Depending upon the selected move type, this field specifies the translation direction or the rotational axis.
◦ value—Depending upon the selected move type, this field specifies the translational distance or the rotation angle.
The function
ProExpldAnimDataTranslatemoveInit() creates a translational move based on the specified direction of the translation and the specified array of the assembly components to which this move is applied.
The function
ProExpldAnimDataRotatemoveInit() creates a rotational move based on the specified rotational axis, rotation angle, and the specified array of the assembly components to which this move is applied.
The function
ProExpldanimmovedataProarrayFree() clears the array of assigned
ProExpldAnimMoveData objects.
Parent topic