Full circle

Maybe I have just a late night brain fog, but it seems I get an error if I try to make full 0-360 circle. I can do 0-359 or 0-361 but not a simple full circle.

What am I missing? :slight_smile:

2 Likes

Nothing. I missed something when I implemented the nomalizing angles to be between 0-360. For example if you hover over the “error” label you will see the error:

image

What I missed is that 360 gets normalized to 0: That is 360 - 360 = 0… just like 361 -360 = 1 where 361 and 1 are the same angle. Except an angle of 360 is a special case and should not be normalized.

So what is happening is angles of 0 and 360 normalize to 0 and 0… and Error. :frowning:

I’ll work on a fix for next release. In the mean time if you used 359.9999 it would be close to 360 to not make a difference.

4 Likes

If you could make it so any Angles equal would render a full circle instead of an error, that would be ideal. It seems to me like it shouldn’t be any more daunting than making a single exception, but I don’t know the code.

:unicorn:

1 Like

I think the Angles equal check in the arc Arc dialog is there for a reason… I suspect that a 0 to 0 circle will yield a point? Also there are probably other tools that have a similar issue - like the Elliptical Arc. So instead of fixing all the tool dialogs this may affect, it will be easier to just fix the upstream normalize routine. Just need to check 1st in the routine if the angle is equally divisible by 360 :

double remainder = std::fmod(number, 360.0);

if (std::abs(remainder) < 1e-9)     
{
    return 360.0;
}
else
{
   normalize n as usual;
   return n;
}
2 Likes