← Back to team overview

kicad-developers team mailing list archive

Re: Segmentation fault when using Clipper and SHAPE_POLY_SET in 3D viewer. Need help.

 

On 06.07.2015 19:02, Wayne Stambaugh wrote:
> On 7/6/2015 9:56 AM, Tomasz Wlostowski wrote:
>> On 06.07.2015 15:51, jp charras wrote:
>>> Le 06/07/2015 15:19, Maciej Sumiński a écrit :
>>>> On 07/06/2015 02:30 PM, Tomasz Wlostowski wrote:
>>>>> Fixes to SHAPE_POLY_SET slitting/fracturing algo: - Tom's too 
>>>>> dumb to use C++ iterators (so he uses pointers now ;) - Some
>>>>> speed optimization
>>>>
>>>> I have tested the patch with all demos and one case that crashed
>>>> KiCad before and all worked fine. The changes have been committed
>>>> in 5889, thanks Tom.
>>>>
>>>> Cheers, Orson
>>>>
>>>
>>> It works fine for me too.
>>> Hat off, Tomasz.
>>
>> Thanks.
>>
>> Let's remove boost::polygon dependency now.
>>
>> Tom
> 
> Please!  At lease with Clipper, we know that we can resolve any issues
> ourselves rather than depending on the Boost developers who haven't been
> very helpful when issues are found in Boost.
Hi,

We can proceed in two ways:
- Modify all calls of bpl to use SHAPE_POLY_SET. Provide functions for
importing/exporting between SHAPE_POLY_SET and CPOLYGONS_LIST/CPolyLine.
- Rethink all these classes and design a single class that will
represent a polygon set.

I'm in favor of the latter, even though it's quite a lot of work. On the
other hand, it might save us work in the future (e.g. polygon-related
DRC checks or handling polygons/keepouts in P&S).

BTW. I noticed quite a lot of overlap in the functionality of CPolyLine
and CPOLYGONS_LIST. Is it just legacy or was it a deliberate design
decision to have two polygon classes?

Cheers,
Tom


Follow ups

References