Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Continuation of Perpendicular Vector Question

graham_lockgraham_lock Member Posts: 141 PRO
edited October 13 in FeatureScript

Hi,

I inadvertently marked the original question as answered and couldn't see how to unmark it - is there a way?

To continue with the help provided by @NeilCooke

I've created a test document which allows switching between tangential and perpendicular tracking.

This has generated another question:

  1. Tangential tracking works fine if the curved edge is generated via a spline but if generated via an arc the profile is drawn outboard of the edge. This can be corrected by changing

line 126:

boxPlane = plane(edgeTangentLine.origin, -Y_DIRECTION, edgeTangentLine.direction);

to

boxPlane = plane(edgeTangentLine.origin, Y_DIRECTION, edgeTangentLine.direction);

but then spline generated curves are incorrectly calculated?

https://cad.onshape.com/documents/a210980f37f6eb8934643f1d/w/c438d98168a82355ea5d0764/e/f4d243419a7ec6ec132347ac

Any further help appreciated.

Thank you.

Best Answer

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,671
    Answer ✓

    It's because arcs are always computed counterclockwise whereas splines go in the direction they were drawn. Simple to fix:

    https://cad.onshape.com/documents/6232edc86fa5b3933c9cc699/w/8a4b0f15bb93348c33e3d313/e/84625f4c121132eecc396ba9

    Senior Director, Technical Services, EMEAI

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,671
    Answer ✓

    It's because arcs are always computed counterclockwise whereas splines go in the direction they were drawn. Simple to fix:

    https://cad.onshape.com/documents/6232edc86fa5b3933c9cc699/w/8a4b0f15bb93348c33e3d313/e/84625f4c121132eecc396ba9

    Senior Director, Technical Services, EMEAI
  • graham_lockgraham_lock Member Posts: 141 PRO

    That's very clean! - Thank you.

Sign In or Register to comment.