← Back to team overview

kicad-developers team mailing list archive

Re: PCBNew: Segments/polygons not rendered correctly (from Bug 1806411])

 

Hi John,

This patch no longer applies cleanly.  Given the discussion, is this
something we still want to pursue?  If so, please rebase this patch when
you get a chance.

Cheers,

Wayne

On 12/19/2018 10:19 AM, John Beard wrote:
> Sorry, I failed to rebase that over the newest changes. This should
> apply better as a patch.
> 
> Cheers,
> 
> John
> On Wed, Dec 19, 2018 at 3:15 PM John Beard <john.j.beard@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> I've added a few simple cases to the qa_common unit tests.
>>
>> I don't know if I will have covered cases which would have exposed any
>> bugs here, but any known corner cases (pass or fail) should be added.
>>
>> Also, they assume the polygons come in a fixed order. I don't know if
>> that's a correct assumption, or if the test should merely check the
>> triangle is somewhere in the list.
>>
>> These tests only cover PolygonTriangulation, not the use of it in
>> SHAPE_POLY_SET::CacheTriangulation(), so the Fracture bugs aren't
>> (yet...) covered. But it would probably be a good idea to also add a
>> test including those cases of SHAPE_POLY_SET and check that:
>>
>> 1) The tests fail before the recent fixes (i.e. the tests are
>> sensitive to the bug), and
>> 2) They do pass now
>>
>> Cheers,
>>
>> John
>> On Wed, Dec 19, 2018 at 1:57 PM jp charras <jp.charras@xxxxxxxxxx> wrote:
>>>
>>> Le 19/12/2018 à 04:48, Seth Hillbrand a écrit :
>>>> Am 2018-12-18 14:19, schrieb jp charras:
>>>>>
>>>>> Sorry Seth,
>>>>>
>>>>> But with your fixes, CacheTriangulation() crashes with degenerated
>>>>> polygons.
>>>>>
>>>>> To see that, modify gerbview_painter.cpp, line 265 to remove
>>>>> absolutePolygon.COutline( 0 ).PointCount() < 3
>>>>> and try to load the test file test_polygons_with_arcs.gbr in Gerbview.
>>>>
>>>> Hi JP-
>>>>
>>>> Thanks for finding that.  The issue was that the Fracture() call
>>>> resulted in an empty polygon set with no outlines and I hadn't re-tested
>>>> its validity.  64f1fb9e7 fixes the bug.
>>>>
>>>> -Seth
>>>
>>>
>>> Looks good to me now.
>>> And CacheTriangulation() is really faster than GLU tesselation.
>>> Thanks.
>>>
>>>
>>> --
>>> Jean-Pierre CHARRAS
>>>
>>> _______________________________________________
>>> 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
>>>
>>> _______________________________________________
>>> 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


Follow ups

References