Message 1 of 5
Positioning Manipulator

Not applicable
08-07-2017
11:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to align an angle manipulator to a sketch construction line after selecting a joint origin for the manipulators origin, but just cannot seem to get a vector that works....... nothing I try will align to the sketch line.
Can anyone point me in the right direction?
// Activate and deactivate the input controls and their manipulators for the position joint if (firingInput->id() == "elementSelection") { selCmd = inputs->itemById("elementSelection"); if (selCmd->selection(0)) { locationOrigin = selCmd->selection(0)->entity(); elementManipulatorOrigin = locationOrigin->geometry()->origin(); Ptr<Vector3D> yDirection = locationOrigin->geometry()->secondaryAxisVector(); Ptr<Vector3D> zDirection = locationOrigin->geometry()->thirdAxisVector(); elementAngle->isEnabled(true); //elementAngle->setManipulator(elementManipulatorOrigin, yDirection, zDirection); elementAngle->setManipulator(elementManipulatorOrigin, Vector3D::create(0, 1, 0), Vector3D::create(0, 0, 1)); //elementName->isEnabled(true); //elementLength->isEnabled(true); //elementLength->setManipulator(elementManipulatorOrigin, Vector3D::create(0, 2, 0)); } else { elementName->value(""); elementName->isEnabled(false); elementLength->value(0); elementLength->isEnabled(false); elementAngle->value(0); elementAngle->isEnabled(false); } }