← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] SHAPE_ARC tests

 

John,

It looks like your indention is 8 spaces for the test case vectors.
Everything else looks indented correctly.

The old drawing code could be compiled to actually draw the bounding box
which was rather handy when messing with bounding box code.  I guess
that didn't get implemented in the new drawing code.  The tests should
hopefully take care of that.

Cheers,

Wayne

On 1/9/2019 11:14 AM, John Beard wrote:
> Hi,
> 
> Couple of patches for the SHAPE_ARC geometry class.
> 
> Notably, a bug in the bounding box code is exposed: the bbox is
> currently computed to be a box that contains the start, end and
> centre. This does not work if the arc passes a "quadrant point". This
> is not an issue for 90-deg arcs, but it means, for example, the bbox
> for a 180 degree arc is zero-area, as the centre and both endpoints
> are collinear. This could be related to occasional rumours of pads
> disappearing when at high zoom (?)
> 
> The second patch contains a computation for it and removes the
> expected failures. It would be good to get a review to check I've done
> it correctly! Specifically: have I missed an important case in the
> tests?
> 
> Also includes a couple of handy geometry test predicates for vectors and boxes.
> 
> Cheers,
> 
> John
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


References