Positioning Manipulator

Positioning Manipulator

Anonymous
Not applicable
732 Views
4 Replies
Message 1 of 5

Positioning Manipulator

Anonymous
Not applicable

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?

 

JointOrigin.JPG


// 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); } }

 

0 Likes
733 Views
4 Replies
Replies (4)
Message 2 of 5

marshaltu
Autodesk
Autodesk

Hello,

 

Unfortunately it was a bug in our side. I logged UP-35806 in our internal system to track it.

 

Thanks,

Marshal



Marshal Tu
Fusion Developer
>
0 Likes
Message 3 of 5

gavin9537
Contributor
Contributor

Hi. Would you mind posting a bit more of your code? I can't answer your question, but I am trying to work out how to activate the rotation input control as I cannot find it in the object tree.

0 Likes
Message 4 of 5

BrianEkins
Mentor
Mentor

The rotation manipulator is part of the AngleValueCommandInput object.  You get the graphic manipulator and also a field in the dialog where the user can enter the angle.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 5 of 5

Anonymous
Not applicable

Hello,

Sorry for the delay in my reply and hopefully Brian's reply has given you what you need. My source changed considerably after the original post, as the issue I encountered turned out to be a bug and so I'm not sure its going to help. I believe the bug has been fixed, but haven't check as our current project is for a client using SolidWorks.

 

As Brian says, look at the AngleValueCommandInput object its pretty easy to use. I was positioning the manipulator based on point selection and then using it to set the length and angle of a sketch line; the command being called from a custom drop down menu embedded in the Fusion toolbar.

 

Hope this helps.