Methods Introduced:
The method wfcWSession::StartKinDrag starts a drag session. This method should be called before any other method for Kinematic drag or snapshots. All subsequent
methods work with the snapshots of the top-level assembly. This method can be called for design assemblies in the Standard
Assembly and Mechanism modes only. It cannot be used in the following cases:
|
• |
If the assembly is in the exploded state |
|
• |
If the Sketcher mode is active |
|
• |
When component placement is active |
|
• |
When the Drag dialog box is active |
The method wfcWSession::StopKinDrag stops the drag session. Use pfcWindow::Refresh to view the change in the graphic window scale according to the updated outline.
The method wfcWSession::SetKinDragEnvironment sets the environment for dragging and reconnect operations. It requires the following input arguments:
|
• |
Type—Specifies the type of drag to be performed. It is given by the enumerated type wfcKinDragType that takes the following values:
|
○
|
wfcKIN_POINT_DRAG— Select a point to drag in a part within the top-level assembly. During the dragging operation, the point you selected follows
the pointer’s movement while maintaining connections. |
|
○
|
wfcKIN_BODY_DRAG—Select a part from the top-level assembly to drag. When you drag a part, its position in the graphics window changes, but
its orientation remains fixed. If the assembly requires a part to be reoriented in conjunction with a change in position,
the part does not move at all, as the assembly cannot reassemble in the new position. |
|
○
|
wfcKIN_ADVANCED_TRANS_X—Specifies the translation in the X direction of the selected coordinate system. This type is applicable only in case of an
advanced drag operation. You can select a coordinate system by selecting the part to be dragged. |
|
○
|
wfcKIN_ADVANCED_TRANS_Y—Specifies the translation in the Y direction of the selected coordinate system. This type is applicable only in case of an
advanced drag operation. |
|
○
|
wfcKIN_ADVANCED_TRANS_Z—Specifies the translation in the Z direction of the selected coordinate system. This type is applicable only in case of an
advanced drag operation. |
|
○
|
wfcKIN_ADVANCED_ROT_X—Specifies the rotation around the X axis of the selected coordinate system. This type is applicable only in case of an advanced
drag operation. You can select a coordinate system by selecting the part to be dragged. |
|
○
|
wfcKIN_ADVANCED_ROT_Y—Specifies the rotation around the Y axis of the selected coordinate system. This type is applicable only in case of an advanced
drag operation. |
|
○
|
wfcKIN_ADVANCED_ROT_Z—Specifies the rotation around the Z axis of the selected coordinate system. This type is applicable only in case of an advanced
drag operation. |
|
|
• |
Name—Specifies the name of the active snapshot whose constraints are used for the drag operation. The snapshot is checked for
statuses such as good, outdated, or incomplete. Pass NULL if not required. The outdated status means some parts from the body have a relative transformation that is different from the current transformation. The
incomplete status means that some parts from the body are missing in the active snapshot.
|
|
• |
path—Specifies the path in terms of the pfcComponentPath object to the active snapshot of a subassembly contained within the top-level assembly. Pass NULL for a top-level assembly snapshot. |
|
• |
Reference—Specifies the selection reference in the form a coordinate system , part, or mechanism body for an advanced drag operation.
This argument is relevant only for advanced drag types. For all other drag types, it is ignored and NULL should be passed. |