Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
reverse a curve's direction?
billy2
Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
Is there a simple way to reverse the direction of a curve?
evEdgeTangentLine(context, { "edge" : curve, "parameter" : i }).origin;
such that i=0 moves to the opposite end of the curve.
evEdgeTangentLine(context, { "edge" : curve, "parameter" : i }).origin;
such that i=0 moves to the opposite end of the curve.
0
Comments
Below are dis-jointed arcs, it'd be nice to change the direction for arc on left.
I think I'll have to pass through my curve selection list and check the direction for each curve.
Here's another example, the direction isn't correct.
Highlighted spline's direction is different from 2nd spline. 2nd spline is mirrored from 1st so the geometry was created correctly.
I think I have to sort the list and get the curve directions to all line up.
Do you know a special algorithm like 'dirty man in the middle' that will fix this in one line of code?