reverse a curve's direction?
billy2
Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,206 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
-
We don't have a way to do that currently. What is your use-case?Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
fit spline, I was hoping I wouldn't have to deal with this, but it won't fix itself.
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?
0 -
-



