I’m Traying to extract an arc with 12 m length from a circle but python give me the outer arc although I reverse the arc Start and End point…so what’s wrong in my code??
The normal of the circle determines the direction of the curve and your arc segment, as you suspected. However, arc.Reverse() just inverts the direction of the curve, which has already been created at this point. Instead, you need to check isclockwise() to determine the order of the start and end points for the arc. If the vectors would result in a counterclockwise direction, you need to flip their order so you get a clockwise arc - and therefore the correct length.
I tried few options to fix my problem…but no result (I found that the direction of rotation of my imported geometry is the opposite direction of rotation in dynamo which is counterclockwise and an offset angle of 90 degrees between the start point of the imported geometry and a same geometry created in dynamo !! )
I was able to fix the start point at the positif X Axis, but I can’t fix the second point correctly which corresponds to the point at segment length (12m)
I noticed too that Y coordinate of the start point is not equal to0 and that is strange!! (is there an explanation)??
You’re overcomplicating it now. As I mentioned, and as @c.poupin has shown, you just need to maintain a positive direction in the arc or circle direction. Either flip the circle before drawing the arc or flip the start/end points of the arc when drawing (as necessary).
I was typing my reply and I’ve not see @c.poupin post at that moment !!
It’s clear to me now how to change the direction of the circle… although I wanted the arc start point to be in the positive x-axis but it’s in the negative x-axis… I’ll try to fix it
Reversing the direction shouldn’t change the start/end points so that’s more of an issue with the orientation of the circle itself. You can get around this by rotating back to 0 (x-axis) or by creating new start/end points based on an x-axis intersection.