Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-17 Thread jp charras
Le 17/04/2017 à 08:41, Alejandro Garcia Montoro a écrit :
> Hi, guys!
> 
> Sorry for the late reply, Easter Week out of home.
> 
> 
> 2017-04-14 15:09 GMT+02:00 jp charras  >:
> 
> 
> OK.
> I reverted the change in seg.h (looking to me as a old seg.h version 
> committed by mistake)
> in my commit cbb5708c365025df67161a7fa8e29b3925e39741,
> and updated a few comments.
> 
> 
> It was not an old version, I changed it. The reason behind the change was 
> this comment in
> shape_line_chain.h, in Segment function:
> 
> Returns a segment referencing to the segment (index) in the line chain.
> Modifying ends of the returned segment will modify corresponding points in 
> the line chain.
> 
> As well as this (maybe old?) one in SEG class:
> 
> These are references to an object the segment belongs to (e.g. a line chain)
> or references to locally stored points (m_a, m_b).
> 
> I understood that SEG class should reference the points passed, so I just 
> modified the class.
> 
> I should have asked, sorry! Anyway, should we modify those comments to 
> actually reflect what the
> code does?
> 
> Thanks for pointing this out and for the fix, JP.
> 
> Best,
> Alejandro

Well, I was thinking it was from an old version, because before rev
5a51d11b781eb34d8a46599a0c5731f44cdea414 (2014, may 15) SEG class was using 
references to points.

This rev changed to points stored locally.
But unfortunately, the comments were not modified and become incorrect (did not 
reflect what the new
code does).

In my commit cbb5708c365025df67161a7fa8e29b3925e39741 I tried to modify these 
comments, but I
certainly missed a few changes.

So please, feel free to fix incorrect comments to actually reflect what the 
code does.

Thanks.

-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-16 Thread Alejandro Garcia Montoro
Hi, guys!

Sorry for the late reply, Easter Week out of home.


2017-04-14 15:09 GMT+02:00 jp charras :

>
> OK.
> I reverted the change in seg.h (looking to me as a old seg.h version
> committed by mistake)
> in my commit cbb5708c365025df67161a7fa8e29b3925e39741,
> and updated a few comments.
>

It was not an old version, I changed it. The reason behind the change was
this comment in shape_line_chain.h, in Segment function:

Returns a segment referencing to the segment (index) in the line chain.
Modifying ends of the returned segment will modify corresponding points in
the line chain.

As well as this (maybe old?) one in SEG class:

These are references to an object the segment belongs to (e.g. a line chain)
or references to locally stored points (m_a, m_b).

I understood that SEG class should reference the points passed, so I just
modified the class.

I should have asked, sorry! Anyway, should we modify those comments to
actually reflect what the code does?

Thanks for pointing this out and for the fix, JP.

Best,
Alejandro
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-14 Thread jp charras
Le 10/04/2017 à 10:44, Tomasz Wlostowski a écrit :
> On 10.04.2017 09:18, jp charras wrote:
>> Le 10/04/2017 à 08:39, Nick Østergaard a écrit :
>>> Hi JP,
>>>
>>> Yes I can confirm that it seems to work now, but since you mentioned
>>> that it was not fixed properly yet, I thought it was worth
>>> highlighting in this thread. Are unittests missing here for the
>>> geometry library or is this on a higher level?
>>
>> About SEG class, unittests works.
>>
>> It is more the fact when using a SEG class, you can now modify an other 
>> entity without clearly
>> notice in your code the other entity will be modified, by side effect, 
>> because now the SEG class
>> stores a reference to the other entity, not a copy of values.
>>
>> It is this side effect I do not like.
> 
> Hi JP & Alessandro,
> 
> I agree that keeping references to the points in the SEG class is not
> the very best idea. I would roll back to the original SEG class.


OK.
I reverted the change in seg.h (looking to me as a old seg.h version committed 
by mistake)
in my commit cbb5708c365025df67161a7fa8e29b3925e39741,
and updated a few comments.



-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-13 Thread Wayne Stambaugh
Where do we stand on a fix for this?

On 4/10/2017 3:18 AM, jp charras wrote:
> Le 10/04/2017 à 08:39, Nick Østergaard a écrit :
>> Hi JP,
>>
>> Yes I can confirm that it seems to work now, but since you mentioned
>> that it was not fixed properly yet, I thought it was worth
>> highlighting in this thread. Are unittests missing here for the
>> geometry library or is this on a higher level?
> 
> About SEG class, unittests works.
> 
> It is more the fact when using a SEG class, you can now modify an other 
> entity without clearly
> notice in your code the other entity will be modified, by side effect, 
> because now the SEG class
> stores a reference to the other entity, not a copy of values.
> 
> It is this side effect I do not like.
> 
> About bugs reports for zones, zones had 3 different bugs:
> * The outlines was broken when adding a corner (GAL) due to the SEG class 
> change.
> * Cutout outlines were incorrectly saved and read in .kicad_pcb files.
> * Cutout outlines were incorrectly managed in GAL, when created: they were 
> added as main outlines,
> not holes in an existing main outline.
> 
> Still remains serious issues in GAL mode about self intersecting and 
> overlapping polygons after
> creation or edition.
> These issues exist since the beginning.
> (They are not too hard to fix, because methods to fix them are written for 
> the legacy mode, but need
> a better knowledge I have to correctly manage undo/redo on GAL, due to the 
> fact the number of
> existing or new zones can change after cleaning or editing zones)
> 
> Note also usability issues in zones pop up menu (missing option to delete a 
> cutout, and most
> commands disabled when the zone tool is activated).
> 
>>
>> Nick
>>
>> 2017-04-10 8:21 GMT+02:00 jp charras :
>>> Le 09/04/2017 à 22:18, Nick Østergaard a écrit :
 Hi Alejandro,

 It seems like there is a use case you may not have considered. The zone 
 cutout.
>>>
>>> I am thinking I recently fixed this issue.
>>>
>>> However I am not thrilled by commit 
>>> f68ce306bdca0a2f5a1a234497ede6550ca79a0b for geometry/seg.h
>>> Instead of storing coordinates, SEG stores after this commit references to 
>>> VECTOR2I of an other entity.
>>> It means when you (for some reason) modify a coordinate value in a SEG 
>>> instance, you can modify also
>>> the other entity, that is not expected.
>>> (I saw that when I fixed the zone cutout issues).
>>> It was one (but not the only one) reason cutouts did not work.
>>>
>>> However I am really not satisfied by the way polygon zones are created or 
>>> edited in GAL:
>>> they can easily be self intersecting (when created or when a corner is 
>>> moved or deleted) or overlapping.
>>>
>>> In Kicad, polygons *cannot be* self intersecting (not accepted in Gerber 
>>> files).
>>>
>>> In Legacy mode, they are tested and modified (break into 2 or more 
>>> polygons, and/or merged with
>>> similar zones) after each change.
>>> This is mandatory to avoid broken zones.
>>>

 See https://bugs.launchpad.net/kicad/+bug/1679795


 2017-03-24 11:01 GMT+01:00 Maciej Sumiński :
> TL;DR: Everything seems fine, I am going to merge the branch today.
>
> For the record: I got the board that was showing the differences. I
> refilled zones using the master branch, then once again with the polygon
> refactor patch applied. Diff of zone polygons shows no difference.
>
> There were differences between the zones in the original file and the
> just refilled, so there could be a change in the filling algorithm in
> the meantime.
>
> I am going to merge the branch soon. Thank you Alejandro, I know it was
> a rough road, but we are really grateful for your work. Well done!
>
> Regards,
> Orson
>
> On 03/23/2017 09:19 AM, Maciej Sumiński wrote:
>> Finally I had some time to test the branch and I could not find any
>> problems, hence I would like to merge it. Let me know if there are any
>> objections.
>>
>> @Nick:
>> Could you give more details? I placed keepout zones and refilled zones
>> for all demo boards, and every time I get exactly the same zones (diffed
>> two .kicad_pcb files).
>>
>> Regards,
>> Orson
>>
>> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
>>> I have noticed that Alejandro's branch does not have a clearance
>>> distance to a keepout zone, which the old filling algorithm has.
>>>
>>> I am not sure what is really desired, but this could potentially break
>>> old designs, although I like the new way where the zone goes to the
>>> keepout edge.
>>>
>>> 2017-02-17 20:24 GMT+01:00 jp charras :
 Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
> Hi!
>
> The errors were caused by some asserts that contained functions that 
> needed to be called... My bad.
> Now the asserts are gone and the errors are handled via out_of_range 

Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-10 Thread jp charras
Le 10/04/2017 à 10:44, Tomasz Wlostowski a écrit :
> On 10.04.2017 09:18, jp charras wrote:
>>
>> Still remains serious issues in GAL mode about self intersecting and 
>> overlapping polygons after
>> creation or edition.
>> These issues exist since the beginning.
>> (They are not too hard to fix, because methods to fix them are written for 
>> the legacy mode, but need
>> a better knowledge I have to correctly manage undo/redo on GAL, due to the 
>> fact the number of
>> existing or new zones can change after cleaning or editing zones)
> 
> I don't think adding automatic zone splitting/merging in the GAL canvas
> (as in the legacy) will fix the problem in the long term, if we take
> into account that we need to import designs done with other tools. All
> of the software I've tried supports overlapping and self-intersecting
> zone outlines - therefore, the files saved by these programs may contain
> zones that Kicad will not handle correctly. Here's the solution I'd propose:
> - overlapping zones: the new connectivity algorithm does that ;-)
> - self-intersecting outlines: split to non-self-intersecting polygon
> when plotting. This way the gerber files exported by Kicad will be
> correct for all possible zone outlines.

Hi Tom,

- overlapping zones:
Should not create issues. This is more a usability problem:
Is it better to keep zones as separate entities, or better to merge them?
Each way has its advantages and drawbacks.

I do not have a strong opinion about overlapping zones (although you really can 
create strange things).

- self-intersecting outlines:
 * Usually create fill issue: just draw a butterfly in GAL and fill it: the 
result is not what one
can expect (only the half area of the zone is filled).
So *currently*, the filling algo need to be modified (a easy fix) but I am not 
sure it is the best way.
 * More strange shapes can be seen if a hole polygon intersects other holes or 
the main outline.
Just add a cutout to a zone, a cutout that breaks the parent zone into 2 zones!
(for instance a rectangular cutout that breaks into 2 separate areas its parent 
rectangular zone.)
The result is broken on GAL, ok on Legacy.
* And what is the meaning of a cutout area much bigger than its parent, and 
overlaps an other zone
bellowing the same net?

I still am of the opinion self intersecting outlines should be converted to non 
intersecting
outlines, and holes merged with main outline: it is much more easy to handle, 
both by code and by
the user.
Otherwise you can create really broken boards.

About plot files, I make a mistake:
only filled areas are plotted and they are strictly simple polygons.
And connectivity algo uses only filled areas.

Importing self intersecting polygons from other programs is a very minor 
problem, easy to fix.
We already fix many other incompatibilities.

> 
> 
>>
>> Note also usability issues in zones pop up menu (missing option to delete a 
>> cutout, and most
>> commands disabled when the zone tool is activated).
> We'll have a look, thanks!

Thanks.

> 
> Cheers,
> Tom
> 


-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-10 Thread Cirilo Bernardo
On Mon, Apr 10, 2017 at 8:44 AM, Tomasz Wlostowski
 wrote:
> On 10.04.2017 09:18, jp charras wrote:
>> Le 10/04/2017 à 08:39, Nick Østergaard a écrit :
>>> Hi JP,
>>>
>>> Yes I can confirm that it seems to work now, but since you mentioned
>>> that it was not fixed properly yet, I thought it was worth
>>> highlighting in this thread. Are unittests missing here for the
>>> geometry library or is this on a higher level?
>>
>> About SEG class, unittests works.
>>
>> It is more the fact when using a SEG class, you can now modify an other 
>> entity without clearly
>> notice in your code the other entity will be modified, by side effect, 
>> because now the SEG class
>> stores a reference to the other entity, not a copy of values.
>>
>> It is this side effect I do not like.
>
> Hi JP & Alessandro,
>
> I agree that keeping references to the points in the SEG class is not
> the very best idea. I would roll back to the original SEG class.
>
>>
>>
>> Still remains serious issues in GAL mode about self intersecting and 
>> overlapping polygons after
>> creation or edition.
>> These issues exist since the beginning.
>> (They are not too hard to fix, because methods to fix them are written for 
>> the legacy mode, but need
>> a better knowledge I have to correctly manage undo/redo on GAL, due to the 
>> fact the number of
>> existing or new zones can change after cleaning or editing zones)
>
> I don't think adding automatic zone splitting/merging in the GAL canvas
> (as in the legacy) will fix the problem in the long term, if we take
> into account that we need to import designs done with other tools. All
> of the software I've tried supports overlapping and self-intersecting
> zone outlines - therefore, the files saved by these programs may contain
> zones that Kicad will not handle correctly. Here's the solution I'd propose:
> - overlapping zones: the new connectivity algorithm does that ;-)
> - self-intersecting outlines: split to non-self-intersecting polygon
> when plotting. This way the gerber files exported by Kicad will be
> correct for all possible zone outlines.
>

I agree with (copying then) splitting self-intersecting zones when plotting;
this is the only simple way to retain the user's original design data while
also meeting the Gerber requirements.

Just for curiosity - do the algorithms know the difference between self-
overlap and self-intersect? For example if we have a snake eating its
tail the result should be a solid ring rather than a ring with a small region
missing due to the overlap region being treated as a hole.

- Cirilo

>
>>
>> Note also usability issues in zones pop up menu (missing option to delete a 
>> cutout, and most
>> commands disabled when the zone tool is activated).
> We'll have a look, thanks!
>
> Cheers,
> Tom
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-10 Thread Tomasz Wlostowski
On 10.04.2017 09:18, jp charras wrote:
> Le 10/04/2017 à 08:39, Nick Østergaard a écrit :
>> Hi JP,
>>
>> Yes I can confirm that it seems to work now, but since you mentioned
>> that it was not fixed properly yet, I thought it was worth
>> highlighting in this thread. Are unittests missing here for the
>> geometry library or is this on a higher level?
> 
> About SEG class, unittests works.
> 
> It is more the fact when using a SEG class, you can now modify an other 
> entity without clearly
> notice in your code the other entity will be modified, by side effect, 
> because now the SEG class
> stores a reference to the other entity, not a copy of values.
> 
> It is this side effect I do not like.

Hi JP & Alessandro,

I agree that keeping references to the points in the SEG class is not
the very best idea. I would roll back to the original SEG class.

> 
> 
> Still remains serious issues in GAL mode about self intersecting and 
> overlapping polygons after
> creation or edition.
> These issues exist since the beginning.
> (They are not too hard to fix, because methods to fix them are written for 
> the legacy mode, but need
> a better knowledge I have to correctly manage undo/redo on GAL, due to the 
> fact the number of
> existing or new zones can change after cleaning or editing zones)

I don't think adding automatic zone splitting/merging in the GAL canvas
(as in the legacy) will fix the problem in the long term, if we take
into account that we need to import designs done with other tools. All
of the software I've tried supports overlapping and self-intersecting
zone outlines - therefore, the files saved by these programs may contain
zones that Kicad will not handle correctly. Here's the solution I'd propose:
- overlapping zones: the new connectivity algorithm does that ;-)
- self-intersecting outlines: split to non-self-intersecting polygon
when plotting. This way the gerber files exported by Kicad will be
correct for all possible zone outlines.


> 
> Note also usability issues in zones pop up menu (missing option to delete a 
> cutout, and most
> commands disabled when the zone tool is activated).
We'll have a look, thanks!

Cheers,
Tom

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-10 Thread jp charras
Le 10/04/2017 à 08:39, Nick Østergaard a écrit :
> Hi JP,
> 
> Yes I can confirm that it seems to work now, but since you mentioned
> that it was not fixed properly yet, I thought it was worth
> highlighting in this thread. Are unittests missing here for the
> geometry library or is this on a higher level?

About SEG class, unittests works.

It is more the fact when using a SEG class, you can now modify an other entity 
without clearly
notice in your code the other entity will be modified, by side effect, because 
now the SEG class
stores a reference to the other entity, not a copy of values.

It is this side effect I do not like.

About bugs reports for zones, zones had 3 different bugs:
* The outlines was broken when adding a corner (GAL) due to the SEG class 
change.
* Cutout outlines were incorrectly saved and read in .kicad_pcb files.
* Cutout outlines were incorrectly managed in GAL, when created: they were 
added as main outlines,
not holes in an existing main outline.

Still remains serious issues in GAL mode about self intersecting and 
overlapping polygons after
creation or edition.
These issues exist since the beginning.
(They are not too hard to fix, because methods to fix them are written for the 
legacy mode, but need
a better knowledge I have to correctly manage undo/redo on GAL, due to the fact 
the number of
existing or new zones can change after cleaning or editing zones)

Note also usability issues in zones pop up menu (missing option to delete a 
cutout, and most
commands disabled when the zone tool is activated).

> 
> Nick
> 
> 2017-04-10 8:21 GMT+02:00 jp charras :
>> Le 09/04/2017 à 22:18, Nick Østergaard a écrit :
>>> Hi Alejandro,
>>>
>>> It seems like there is a use case you may not have considered. The zone 
>>> cutout.
>>
>> I am thinking I recently fixed this issue.
>>
>> However I am not thrilled by commit f68ce306bdca0a2f5a1a234497ede6550ca79a0b 
>> for geometry/seg.h
>> Instead of storing coordinates, SEG stores after this commit references to 
>> VECTOR2I of an other entity.
>> It means when you (for some reason) modify a coordinate value in a SEG 
>> instance, you can modify also
>> the other entity, that is not expected.
>> (I saw that when I fixed the zone cutout issues).
>> It was one (but not the only one) reason cutouts did not work.
>>
>> However I am really not satisfied by the way polygon zones are created or 
>> edited in GAL:
>> they can easily be self intersecting (when created or when a corner is moved 
>> or deleted) or overlapping.
>>
>> In Kicad, polygons *cannot be* self intersecting (not accepted in Gerber 
>> files).
>>
>> In Legacy mode, they are tested and modified (break into 2 or more polygons, 
>> and/or merged with
>> similar zones) after each change.
>> This is mandatory to avoid broken zones.
>>
>>>
>>> See https://bugs.launchpad.net/kicad/+bug/1679795
>>>
>>>
>>> 2017-03-24 11:01 GMT+01:00 Maciej Sumiński :
 TL;DR: Everything seems fine, I am going to merge the branch today.

 For the record: I got the board that was showing the differences. I
 refilled zones using the master branch, then once again with the polygon
 refactor patch applied. Diff of zone polygons shows no difference.

 There were differences between the zones in the original file and the
 just refilled, so there could be a change in the filling algorithm in
 the meantime.

 I am going to merge the branch soon. Thank you Alejandro, I know it was
 a rough road, but we are really grateful for your work. Well done!

 Regards,
 Orson

 On 03/23/2017 09:19 AM, Maciej Sumiński wrote:
> Finally I had some time to test the branch and I could not find any
> problems, hence I would like to merge it. Let me know if there are any
> objections.
>
> @Nick:
> Could you give more details? I placed keepout zones and refilled zones
> for all demo boards, and every time I get exactly the same zones (diffed
> two .kicad_pcb files).
>
> Regards,
> Orson
>
> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
>> I have noticed that Alejandro's branch does not have a clearance
>> distance to a keepout zone, which the old filling algorithm has.
>>
>> I am not sure what is really desired, but this could potentially break
>> old designs, although I like the new way where the zone goes to the
>> keepout edge.
>>
>> 2017-02-17 20:24 GMT+01:00 jp charras :
>>> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
 Hi!

 The errors were caused by some asserts that contained functions that 
 needed to be called... My bad.
 Now the asserts are gone and the errors are handled via out_of_range 
 exceptions (they were related
 with possible illegal memory access),

 JP, I finally saw the zone filling error in the release build!

 Nick and JP, if you can pull and test the branc

Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-09 Thread Nick Østergaard
Hi JP,

Yes I can confrim that it seems to work now, but since you mentioned
that it was not fixed properly yet, I thought it was worth
highlighting in this thread. Are unittests missing here for the
geometry library or is this on a higher level?

Nick

2017-04-10 8:21 GMT+02:00 jp charras :
> Le 09/04/2017 à 22:18, Nick Østergaard a écrit :
>> Hi Alejandro,
>>
>> It seems like there is a use case you may not have considered. The zone 
>> cutout.
>
> I am thinking I recently fixed this issue.
>
> However I am not thrilled by commit f68ce306bdca0a2f5a1a234497ede6550ca79a0b 
> for geometry/seg.h
> Instead of storing coordinates, SEG stores after this commit references to 
> VECTOR2I of an other entity.
> It means when you (for some reason) modify a coordinate value in a SEG 
> instance, you can modify also
> the other entity, that is not expected.
> (I saw that when I fixed the zone cutout issues).
> It was one (but not the only one) reason cutouts did not work.
>
> However I am really not satisfied by the way polygon zones are created or 
> edited in GAL:
> they can easily be self intersecting (when created or when a corner is moved 
> or deleted) or overlapping.
>
> In Kicad, polygons *cannot be* self intersecting (not accepted in Gerber 
> files).
>
> In Legacy mode, they are tested and modified (break into 2 or more polygons, 
> and/or merged with
> similar zones) after each change.
> This is mandatory to avoid broken zones.
>
>>
>> See https://bugs.launchpad.net/kicad/+bug/1679795
>>
>>
>> 2017-03-24 11:01 GMT+01:00 Maciej Sumiński :
>>> TL;DR: Everything seems fine, I am going to merge the branch today.
>>>
>>> For the record: I got the board that was showing the differences. I
>>> refilled zones using the master branch, then once again with the polygon
>>> refactor patch applied. Diff of zone polygons shows no difference.
>>>
>>> There were differences between the zones in the original file and the
>>> just refilled, so there could be a change in the filling algorithm in
>>> the meantime.
>>>
>>> I am going to merge the branch soon. Thank you Alejandro, I know it was
>>> a rough road, but we are really grateful for your work. Well done!
>>>
>>> Regards,
>>> Orson
>>>
>>> On 03/23/2017 09:19 AM, Maciej Sumiński wrote:
 Finally I had some time to test the branch and I could not find any
 problems, hence I would like to merge it. Let me know if there are any
 objections.

 @Nick:
 Could you give more details? I placed keepout zones and refilled zones
 for all demo boards, and every time I get exactly the same zones (diffed
 two .kicad_pcb files).

 Regards,
 Orson

 On 02/18/2017 08:13 PM, Nick Østergaard wrote:
> I have noticed that Alejandro's branch does not have a clearance
> distance to a keepout zone, which the old filling algorithm has.
>
> I am not sure what is really desired, but this could potentially break
> old designs, although I like the new way where the zone goes to the
> keepout edge.
>
> 2017-02-17 20:24 GMT+01:00 jp charras :
>> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
>>> Hi!
>>>
>>> The errors were caused by some asserts that contained functions that 
>>> needed to be called... My bad.
>>> Now the asserts are gone and the errors are handled via out_of_range 
>>> exceptions (they were related
>>> with possible illegal memory access),
>>>
>>> JP, I finally saw the zone filling error in the release build!
>>>
>>> Nick and JP, if you can pull and test the branch again and see if the 
>>> errors you saw are fixed, that
>>> would be great. Thank you.
>>>
>>> Best,
>>> Alejandro
>>
>>
>> At first glance, the issues I previously saw are gone.
>> Thanks.
>>
>>
>> --
>> Jean-Pierre CHARRAS
>
>
> --
> Jean-Pierre CHARRAS
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-09 Thread jp charras
Le 09/04/2017 à 22:18, Nick Østergaard a écrit :
> Hi Alejandro,
> 
> It seems like there is a use case you may not have considered. The zone 
> cutout.

I am thinking I recently fixed this issue.

However I am not thrilled by commit f68ce306bdca0a2f5a1a234497ede6550ca79a0b 
for geometry/seg.h
Instead of storing coordinates, SEG stores after this commit references to 
VECTOR2I of an other entity.
It means when you (for some reason) modify a coordinate value in a SEG 
instance, you can modify also
the other entity, that is not expected.
(I saw that when I fixed the zone cutout issues).
It was one (but not the only one) reason cutouts did not work.

However I am really not satisfied by the way polygon zones are created or 
edited in GAL:
they can easily be self intersecting (when created or when a corner is moved or 
deleted) or overlapping.

In Kicad, polygons *cannot be* self intersecting (not accepted in Gerber files).

In Legacy mode, they are tested and modified (break into 2 or more polygons, 
and/or merged with
similar zones) after each change.
This is mandatory to avoid broken zones.

> 
> See https://bugs.launchpad.net/kicad/+bug/1679795
> 
> 
> 2017-03-24 11:01 GMT+01:00 Maciej Sumiński :
>> TL;DR: Everything seems fine, I am going to merge the branch today.
>>
>> For the record: I got the board that was showing the differences. I
>> refilled zones using the master branch, then once again with the polygon
>> refactor patch applied. Diff of zone polygons shows no difference.
>>
>> There were differences between the zones in the original file and the
>> just refilled, so there could be a change in the filling algorithm in
>> the meantime.
>>
>> I am going to merge the branch soon. Thank you Alejandro, I know it was
>> a rough road, but we are really grateful for your work. Well done!
>>
>> Regards,
>> Orson
>>
>> On 03/23/2017 09:19 AM, Maciej Sumiński wrote:
>>> Finally I had some time to test the branch and I could not find any
>>> problems, hence I would like to merge it. Let me know if there are any
>>> objections.
>>>
>>> @Nick:
>>> Could you give more details? I placed keepout zones and refilled zones
>>> for all demo boards, and every time I get exactly the same zones (diffed
>>> two .kicad_pcb files).
>>>
>>> Regards,
>>> Orson
>>>
>>> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
 I have noticed that Alejandro's branch does not have a clearance
 distance to a keepout zone, which the old filling algorithm has.

 I am not sure what is really desired, but this could potentially break
 old designs, although I like the new way where the zone goes to the
 keepout edge.

 2017-02-17 20:24 GMT+01:00 jp charras :
> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
>> Hi!
>>
>> The errors were caused by some asserts that contained functions that 
>> needed to be called... My bad.
>> Now the asserts are gone and the errors are handled via out_of_range 
>> exceptions (they were related
>> with possible illegal memory access),
>>
>> JP, I finally saw the zone filling error in the release build!
>>
>> Nick and JP, if you can pull and test the branch again and see if the 
>> errors you saw are fixed, that
>> would be great. Thank you.
>>
>> Best,
>> Alejandro
>
>
> At first glance, the issues I previously saw are gone.
> Thanks.
>
>
> --
> Jean-Pierre CHARRAS


-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-04-09 Thread Nick Østergaard
Hi Alejandro,

It seems like there is a use case you may not have considered. The zone cutout.

See https://bugs.launchpad.net/kicad/+bug/1679795


2017-03-24 11:01 GMT+01:00 Maciej Sumiński :
> TL;DR: Everything seems fine, I am going to merge the branch today.
>
> For the record: I got the board that was showing the differences. I
> refilled zones using the master branch, then once again with the polygon
> refactor patch applied. Diff of zone polygons shows no difference.
>
> There were differences between the zones in the original file and the
> just refilled, so there could be a change in the filling algorithm in
> the meantime.
>
> I am going to merge the branch soon. Thank you Alejandro, I know it was
> a rough road, but we are really grateful for your work. Well done!
>
> Regards,
> Orson
>
> On 03/23/2017 09:19 AM, Maciej Sumiński wrote:
>> Finally I had some time to test the branch and I could not find any
>> problems, hence I would like to merge it. Let me know if there are any
>> objections.
>>
>> @Nick:
>> Could you give more details? I placed keepout zones and refilled zones
>> for all demo boards, and every time I get exactly the same zones (diffed
>> two .kicad_pcb files).
>>
>> Regards,
>> Orson
>>
>> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
>>> I have noticed that Alejandro's branch does not have a clearance
>>> distance to a keepout zone, which the old filling algorithm has.
>>>
>>> I am not sure what is really desired, but this could potentially break
>>> old designs, although I like the new way where the zone goes to the
>>> keepout edge.
>>>
>>> 2017-02-17 20:24 GMT+01:00 jp charras :
 Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
> Hi!
>
> The errors were caused by some asserts that contained functions that 
> needed to be called... My bad.
> Now the asserts are gone and the errors are handled via out_of_range 
> exceptions (they were related
> with possible illegal memory access),
>
> JP, I finally saw the zone filling error in the release build!
>
> Nick and JP, if you can pull and test the branch again and see if the 
> errors you saw are fixed, that
> would be great. Thank you.
>
> Best,
> Alejandro


 At first glance, the issues I previously saw are gone.
 Thanks.


 --
 Jean-Pierre CHARRAS

 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-03-24 Thread Maciej Sumiński
TL;DR: Everything seems fine, I am going to merge the branch today.

For the record: I got the board that was showing the differences. I
refilled zones using the master branch, then once again with the polygon
refactor patch applied. Diff of zone polygons shows no difference.

There were differences between the zones in the original file and the
just refilled, so there could be a change in the filling algorithm in
the meantime.

I am going to merge the branch soon. Thank you Alejandro, I know it was
a rough road, but we are really grateful for your work. Well done!

Regards,
Orson

On 03/23/2017 09:19 AM, Maciej Sumiński wrote:
> Finally I had some time to test the branch and I could not find any
> problems, hence I would like to merge it. Let me know if there are any
> objections.
> 
> @Nick:
> Could you give more details? I placed keepout zones and refilled zones
> for all demo boards, and every time I get exactly the same zones (diffed
> two .kicad_pcb files).
> 
> Regards,
> Orson
> 
> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
>> I have noticed that Alejandro's branch does not have a clearance
>> distance to a keepout zone, which the old filling algorithm has.
>>
>> I am not sure what is really desired, but this could potentially break
>> old designs, although I like the new way where the zone goes to the
>> keepout edge.
>>
>> 2017-02-17 20:24 GMT+01:00 jp charras :
>>> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
 Hi!

 The errors were caused by some asserts that contained functions that 
 needed to be called... My bad.
 Now the asserts are gone and the errors are handled via out_of_range 
 exceptions (they were related
 with possible illegal memory access),

 JP, I finally saw the zone filling error in the release build!

 Nick and JP, if you can pull and test the branch again and see if the 
 errors you saw are fixed, that
 would be great. Thank you.

 Best,
 Alejandro
>>>
>>>
>>> At first glance, the issues I previously saw are gone.
>>> Thanks.
>>>
>>>
>>> --
>>> Jean-Pierre CHARRAS
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-03-23 Thread Alejandro Garcia Montoro
Oh, cool, then there are no objections from me.

Thank you!

Best,
Alejandro

2017-03-23 9:28 GMT+01:00 Maciej Sumiński :

> I have done this already, no worries.
>
> Regards,
> Orson
>
> On 03/23/2017 09:26 AM, Alejandro Garcia Montoro wrote:
> > Do the patches apply cleanly? It is possible that they need a slight
> rebase
> > since the latest changes on the GAL zone.
> >
> > Let me check it.
> >
> > 2017-03-23 9:19 GMT+01:00 Maciej Sumiński :
> >
> >> Finally I had some time to test the branch and I could not find any
> >> problems, hence I would like to merge it. Let me know if there are any
> >> objections.
> >>
> >> @Nick:
> >> Could you give more details? I placed keepout zones and refilled zones
> >> for all demo boards, and every time I get exactly the same zones (diffed
> >> two .kicad_pcb files).
> >>
> >> Regards,
> >> Orson
> >>
> >> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
> >>> I have noticed that Alejandro's branch does not have a clearance
> >>> distance to a keepout zone, which the old filling algorithm has.
> >>>
> >>> I am not sure what is really desired, but this could potentially break
> >>> old designs, although I like the new way where the zone goes to the
> >>> keepout edge.
> >>>
> >>> 2017-02-17 20:24 GMT+01:00 jp charras :
>  Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
> > Hi!
> >
> > The errors were caused by some asserts that contained functions that
> >> needed to be called... My bad.
> > Now the asserts are gone and the errors are handled via out_of_range
> >> exceptions (they were related
> > with possible illegal memory access),
> >
> > JP, I finally saw the zone filling error in the release build!
> >
> > Nick and JP, if you can pull and test the branch again and see if the
> >> errors you saw are fixed, that
> > would be great. Thank you.
> >
> > Best,
> > Alejandro
> 
> 
>  At first glance, the issues I previously saw are gone.
>  Thanks.
> 
> 
>  --
>  Jean-Pierre CHARRAS
> 
>  ___
>  Mailing list: https://launchpad.net/~kicad-developers
>  Post to : kicad-developers@lists.launchpad.net
>  Unsubscribe : https://launchpad.net/~kicad-developers
>  More help   : https://help.launchpad.net/ListHelp
> >>>
> >>> ___
> >>> Mailing list: https://launchpad.net/~kicad-developers
> >>> Post to : kicad-developers@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~kicad-developers
> >>> More help   : https://help.launchpad.net/ListHelp
> >>>
> >>
> >>
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >>
> >>
> >
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-03-23 Thread Maciej Sumiński
I have done this already, no worries.

Regards,
Orson

On 03/23/2017 09:26 AM, Alejandro Garcia Montoro wrote:
> Do the patches apply cleanly? It is possible that they need a slight rebase
> since the latest changes on the GAL zone.
> 
> Let me check it.
> 
> 2017-03-23 9:19 GMT+01:00 Maciej Sumiński :
> 
>> Finally I had some time to test the branch and I could not find any
>> problems, hence I would like to merge it. Let me know if there are any
>> objections.
>>
>> @Nick:
>> Could you give more details? I placed keepout zones and refilled zones
>> for all demo boards, and every time I get exactly the same zones (diffed
>> two .kicad_pcb files).
>>
>> Regards,
>> Orson
>>
>> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
>>> I have noticed that Alejandro's branch does not have a clearance
>>> distance to a keepout zone, which the old filling algorithm has.
>>>
>>> I am not sure what is really desired, but this could potentially break
>>> old designs, although I like the new way where the zone goes to the
>>> keepout edge.
>>>
>>> 2017-02-17 20:24 GMT+01:00 jp charras :
 Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
> Hi!
>
> The errors were caused by some asserts that contained functions that
>> needed to be called... My bad.
> Now the asserts are gone and the errors are handled via out_of_range
>> exceptions (they were related
> with possible illegal memory access),
>
> JP, I finally saw the zone filling error in the release build!
>
> Nick and JP, if you can pull and test the branch again and see if the
>> errors you saw are fixed, that
> would be great. Thank you.
>
> Best,
> Alejandro


 At first glance, the issues I previously saw are gone.
 Thanks.


 --
 Jean-Pierre CHARRAS

 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> 




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-03-23 Thread Alejandro Garcia Montoro
Do the patches apply cleanly? It is possible that they need a slight rebase
since the latest changes on the GAL zone.

Let me check it.

2017-03-23 9:19 GMT+01:00 Maciej Sumiński :

> Finally I had some time to test the branch and I could not find any
> problems, hence I would like to merge it. Let me know if there are any
> objections.
>
> @Nick:
> Could you give more details? I placed keepout zones and refilled zones
> for all demo boards, and every time I get exactly the same zones (diffed
> two .kicad_pcb files).
>
> Regards,
> Orson
>
> On 02/18/2017 08:13 PM, Nick Østergaard wrote:
> > I have noticed that Alejandro's branch does not have a clearance
> > distance to a keepout zone, which the old filling algorithm has.
> >
> > I am not sure what is really desired, but this could potentially break
> > old designs, although I like the new way where the zone goes to the
> > keepout edge.
> >
> > 2017-02-17 20:24 GMT+01:00 jp charras :
> >> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
> >>> Hi!
> >>>
> >>> The errors were caused by some asserts that contained functions that
> needed to be called... My bad.
> >>> Now the asserts are gone and the errors are handled via out_of_range
> exceptions (they were related
> >>> with possible illegal memory access),
> >>>
> >>> JP, I finally saw the zone filling error in the release build!
> >>>
> >>> Nick and JP, if you can pull and test the branch again and see if the
> errors you saw are fixed, that
> >>> would be great. Thank you.
> >>>
> >>> Best,
> >>> Alejandro
> >>
> >>
> >> At first glance, the issues I previously saw are gone.
> >> Thanks.
> >>
> >>
> >> --
> >> Jean-Pierre CHARRAS
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-03-23 Thread Maciej Sumiński
Finally I had some time to test the branch and I could not find any
problems, hence I would like to merge it. Let me know if there are any
objections.

@Nick:
Could you give more details? I placed keepout zones and refilled zones
for all demo boards, and every time I get exactly the same zones (diffed
two .kicad_pcb files).

Regards,
Orson

On 02/18/2017 08:13 PM, Nick Østergaard wrote:
> I have noticed that Alejandro's branch does not have a clearance
> distance to a keepout zone, which the old filling algorithm has.
> 
> I am not sure what is really desired, but this could potentially break
> old designs, although I like the new way where the zone goes to the
> keepout edge.
> 
> 2017-02-17 20:24 GMT+01:00 jp charras :
>> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
>>> Hi!
>>>
>>> The errors were caused by some asserts that contained functions that needed 
>>> to be called... My bad.
>>> Now the asserts are gone and the errors are handled via out_of_range 
>>> exceptions (they were related
>>> with possible illegal memory access),
>>>
>>> JP, I finally saw the zone filling error in the release build!
>>>
>>> Nick and JP, if you can pull and test the branch again and see if the 
>>> errors you saw are fixed, that
>>> would be great. Thank you.
>>>
>>> Best,
>>> Alejandro
>>
>>
>> At first glance, the issues I previously saw are gone.
>> Thanks.
>>
>>
>> --
>> Jean-Pierre CHARRAS
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-18 Thread Nick Østergaard
I have noticed that Alejandro's branch does not have a clearance
distance to a keepout zone, which the old filling algorithm has.

I am not sure what is really desired, but this could potentially break
old designs, although I like the new way where the zone goes to the
keepout edge.

2017-02-17 20:24 GMT+01:00 jp charras :
> Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
>> Hi!
>>
>> The errors were caused by some asserts that contained functions that needed 
>> to be called... My bad.
>> Now the asserts are gone and the errors are handled via out_of_range 
>> exceptions (they were related
>> with possible illegal memory access),
>>
>> JP, I finally saw the zone filling error in the release build!
>>
>> Nick and JP, if you can pull and test the branch again and see if the errors 
>> you saw are fixed, that
>> would be great. Thank you.
>>
>> Best,
>> Alejandro
>
>
> At first glance, the issues I previously saw are gone.
> Thanks.
>
>
> --
> Jean-Pierre CHARRAS
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-17 Thread jp charras
Le 17/02/2017 à 19:41, Alejandro Garcia Montoro a écrit :
> Hi!
> 
> The errors were caused by some asserts that contained functions that needed 
> to be called... My bad.
> Now the asserts are gone and the errors are handled via out_of_range 
> exceptions (they were related
> with possible illegal memory access),
> 
> JP, I finally saw the zone filling error in the release build!
> 
> Nick and JP, if you can pull and test the branch again and see if the errors 
> you saw are fixed, that
> would be great. Thank you.
> 
> Best,
> Alejandro


At first glance, the issues I previously saw are gone.
Thanks.


-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-17 Thread Alejandro Garcia Montoro
Hi!

The errors were caused by some asserts that contained functions that needed
to be called... My bad. Now the asserts are gone and the errors are handled
via out_of_range exceptions (they were related with possible illegal memory
access),

JP, I finally saw the zone filling error in the release build!

Nick and JP, if you can pull and test the branch again and see if the
errors you saw are fixed, that would be great. Thank you.

Best,
Alejandro

2017-02-17 12:41 GMT+01:00 Alejandro Garcia Montoro <
alejandro.garciamont...@gmail.com>:

> Whoops, you were right, the bug does show up in release builds.
>
> I'll investigate it and fix it asap, thank you!
>
> 2017-02-17 10:24 GMT+01:00 Nick Østergaard :
>
>> This was in a release build on archlinux. I will try to pull your latest
>> changes an try iy in a debug build if it still fails.
>>
>>
>> Den 17/02/2017 10.22 skrev "Alejandro Garcia Montoro" <
>> alejandro.garciamont...@gmail.com>:
>>
>> Hi, Nick, thanks for the feedback!
>>
>> I've tested the opening of a bunch of different boards and I see no
>> segfault. Is this in a Debug or Release build? GAL or Legacy? I was testing
>> a Debug and now compiling a Release, I'll let you know when my slow machine
>> finishes.
>>
>> Btw, I catched another unrelated bug in RemoveNullSegments, that is now
>> fixed, so please pull the branch again if you continue testing.
>>
>> Best,
>> Alejandro
>>
>> 2017-02-16 22:13 GMT+01:00 Nick Østergaard :
>>
>>> I tried to pull your branch and it segfaults when opening a board in
>>> pcbnew.
>>>
>>> (gdb) bt
>>> #0  0x7fee50d90338 in SHAPE_POLY_SET::Vertex(int) () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #1  0x7fee50b33512 in ZONE_CONTAINER::Hatch() [clone .part.237] ()
>>> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #2  0x7fee50bd0e63 in PCB_PARSER::parseZONE_CONTAINER() () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #3  0x7fee50bd1dd9 in PCB_PARSER::parseBOARD_unchecked() () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #4  0x7fee50bd22f2 in PCB_PARSER::parseBOARD() () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #5  0x7fee50bd26d2 in PCB_PARSER::Parse() () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #6  0x7fee50b94a97 in PCB_IO::Load(wxString const&, BOARD*,
>>> PROPERTIES const*) () at /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #7  0x7fee508e3658 in
>>> PCB_EDIT_FRAME::OpenProjectFiles(std::vector>> std::allocator > const&, int) ()
>>> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #8  0x7fee508e50ac in
>>> PCB_EDIT_FRAME::OnFileHistory(wxCommandEvent&) () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #9  0x7fee64abd74e in
>>> wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&,
>>> wxEvent&) const () at /usr/lib/libwx_baseu-3.0.so.0
>>> #10 0x7fee64c40c35 in
>>> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
>>> wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.0.so.0
>>> #11 0x7fee64c40d2b in wxEventHashTable::HandleEvent(wxEvent&,
>>> wxEvtHandler*) () at /usr/lib/libwx_baseu-3.0.so.0
>>> #12 0x7fee64c410db in wxEvtHandler::TryHereOnly(wxEvent&) () at
>>> /usr/lib/libwx_baseu-3.0.so.0
>>> #13 0x7fee50cd2a79 in EDA_BASE_FRAME::ProcessEvent(wxEvent&) () at
>>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>>> #14 0x7fee64c40ee3 in wxEvtHandler::DoTryChain(wxEvent&) () at
>>> /usr/lib/libwx_baseu-3.0.so.0
>>> #15 0x7fee64c411c5 in wxEvtHandler::ProcessEvent(wxEvent&) () at
>>> /usr/lib/libwx_baseu-3.0.so.0
>>> #16 0x7fee655b9fe8 in wxWindowBase::TryAfter(wxEvent&) () at
>>> /usr/lib/libwx_gtk2u_core-3.0.so.0
>>> #17 0x7fee64c40f37 in wxEvtHandler::SafelyProcessEvent(wxEvent&)
>>> () at /usr/lib/libwx_baseu-3.0.so.0
>>> #18 0x7fee6555e82f in wxMenuBase::SendEvent(int, int) () at
>>> /usr/lib/libwx_gtk2u_core-3.0.so.0
>>>
>>> 2017-02-16 18:50 GMT+01:00 Alejandro Garcia Montoro
>>> :
>>> > Hi!
>>> >
>>> > These last days I have detected a bunch of more bugs in my code
>>> regarding
>>> > zone editing, cutout zones, combination of self-intersecting polygons
>>> and
>>> > some drawing issues. All of them are now fixed, and some more tests are
>>> > added, both in my branch [1] and in the attached patches. Still, more
>>> > testing is needed, I don't want to break anything.
>>> >
>>> > JP, I don't see the zoom and refill bugs you catched, can you provide
>>> me
>>> > with a test board in which these bugs occur, or describe a little bit
>>> more a
>>> > way to reproduce them? Thanks!
>>> >
>>> > Btw, I don't know if I'm managing my branch in the correct way. I'm
>>> merging
>>> > the latest master revisions, maybe is it better to keep the branch
>>> clean
>>> > using rebase? I'm following the last comments in section Managing your
>>> own
>>> > branch [2].
>>> >
>>> > Best,
>>> > Alejandro
>>> >
>>> > [1] https://git.launchpad.net/~agarciamontoro/kicad/?h=polygon-r
>>> efactor
>>> > [2] http://kicad-pcb.org/contribute/developer

Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-17 Thread Alejandro Garcia Montoro
Whoops, you were right, the bug does show up in release builds.

I'll investigate it and fix it asap, thank you!

2017-02-17 10:24 GMT+01:00 Nick Østergaard :

> This was in a release build on archlinux. I will try to pull your latest
> changes an try iy in a debug build if it still fails.
>
>
> Den 17/02/2017 10.22 skrev "Alejandro Garcia Montoro" <
> alejandro.garciamont...@gmail.com>:
>
> Hi, Nick, thanks for the feedback!
>
> I've tested the opening of a bunch of different boards and I see no
> segfault. Is this in a Debug or Release build? GAL or Legacy? I was testing
> a Debug and now compiling a Release, I'll let you know when my slow machine
> finishes.
>
> Btw, I catched another unrelated bug in RemoveNullSegments, that is now
> fixed, so please pull the branch again if you continue testing.
>
> Best,
> Alejandro
>
> 2017-02-16 22:13 GMT+01:00 Nick Østergaard :
>
>> I tried to pull your branch and it segfaults when opening a board in
>> pcbnew.
>>
>> (gdb) bt
>> #0  0x7fee50d90338 in SHAPE_POLY_SET::Vertex(int) () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #1  0x7fee50b33512 in ZONE_CONTAINER::Hatch() [clone .part.237] ()
>> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #2  0x7fee50bd0e63 in PCB_PARSER::parseZONE_CONTAINER() () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #3  0x7fee50bd1dd9 in PCB_PARSER::parseBOARD_unchecked() () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #4  0x7fee50bd22f2 in PCB_PARSER::parseBOARD() () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #5  0x7fee50bd26d2 in PCB_PARSER::Parse() () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #6  0x7fee50b94a97 in PCB_IO::Load(wxString const&, BOARD*,
>> PROPERTIES const*) () at /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #7  0x7fee508e3658 in
>> PCB_EDIT_FRAME::OpenProjectFiles(std::vector> std::allocator > const&, int) ()
>> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #8  0x7fee508e50ac in
>> PCB_EDIT_FRAME::OnFileHistory(wxCommandEvent&) () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #9  0x7fee64abd74e in
>> wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&,
>> wxEvent&) const () at /usr/lib/libwx_baseu-3.0.so.0
>> #10 0x7fee64c40c35 in
>> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
>> wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.0.so.0
>> #11 0x7fee64c40d2b in wxEventHashTable::HandleEvent(wxEvent&,
>> wxEvtHandler*) () at /usr/lib/libwx_baseu-3.0.so.0
>> #12 0x7fee64c410db in wxEvtHandler::TryHereOnly(wxEvent&) () at
>> /usr/lib/libwx_baseu-3.0.so.0
>> #13 0x7fee50cd2a79 in EDA_BASE_FRAME::ProcessEvent(wxEvent&) () at
>> /tmp/kicad/usr/local/bin/_pcbnew.kiface
>> #14 0x7fee64c40ee3 in wxEvtHandler::DoTryChain(wxEvent&) () at
>> /usr/lib/libwx_baseu-3.0.so.0
>> #15 0x7fee64c411c5 in wxEvtHandler::ProcessEvent(wxEvent&) () at
>> /usr/lib/libwx_baseu-3.0.so.0
>> #16 0x7fee655b9fe8 in wxWindowBase::TryAfter(wxEvent&) () at
>> /usr/lib/libwx_gtk2u_core-3.0.so.0
>> #17 0x7fee64c40f37 in wxEvtHandler::SafelyProcessEvent(wxEvent&)
>> () at /usr/lib/libwx_baseu-3.0.so.0
>> #18 0x7fee6555e82f in wxMenuBase::SendEvent(int, int) () at
>> /usr/lib/libwx_gtk2u_core-3.0.so.0
>>
>> 2017-02-16 18:50 GMT+01:00 Alejandro Garcia Montoro
>> :
>> > Hi!
>> >
>> > These last days I have detected a bunch of more bugs in my code
>> regarding
>> > zone editing, cutout zones, combination of self-intersecting polygons
>> and
>> > some drawing issues. All of them are now fixed, and some more tests are
>> > added, both in my branch [1] and in the attached patches. Still, more
>> > testing is needed, I don't want to break anything.
>> >
>> > JP, I don't see the zoom and refill bugs you catched, can you provide me
>> > with a test board in which these bugs occur, or describe a little bit
>> more a
>> > way to reproduce them? Thanks!
>> >
>> > Btw, I don't know if I'm managing my branch in the correct way. I'm
>> merging
>> > the latest master revisions, maybe is it better to keep the branch clean
>> > using rebase? I'm following the last comments in section Managing your
>> own
>> > branch [2].
>> >
>> > Best,
>> > Alejandro
>> >
>> > [1] https://git.launchpad.net/~agarciamontoro/kicad/?h=polygon-refactor
>> > [2] http://kicad-pcb.org/contribute/developers/#_managing_your_o
>> wn_branch
>> >
>> > 2017-02-01 15:45 GMT+01:00 Maciej Sumiński :
>> >>
>> >> On 02/01/2017 02:36 PM, jp charras wrote:
>> >> [snip]
>> >> > * In GAL canvas, depending on the zoom level and the size of the
>> filled
>> >> > zones areas, filled zones
>> >> > areas are displayed or not.
>> >> > Same for zone outlines.
>> >>
>> >> Without looking at the code, my first shot is incorrect bounding box
>> >> calculation (ViewBBox() method).
>> >>
>> >> Regards,
>> >> Orson
>> >>
>> >>
>> >> ___
>> >> Mailing list: https://launchpad.net/~kicad-developers
>> >> Post to : kicad-developers@lists.lau

Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-17 Thread Nick Østergaard
This was in a release build on archlinux. I will try to pull your latest
changes an try iy in a debug build if it still fails.

Den 17/02/2017 10.22 skrev "Alejandro Garcia Montoro" <
alejandro.garciamont...@gmail.com>:

Hi, Nick, thanks for the feedback!

I've tested the opening of a bunch of different boards and I see no
segfault. Is this in a Debug or Release build? GAL or Legacy? I was testing
a Debug and now compiling a Release, I'll let you know when my slow machine
finishes.

Btw, I catched another unrelated bug in RemoveNullSegments, that is now
fixed, so please pull the branch again if you continue testing.

Best,
Alejandro

2017-02-16 22:13 GMT+01:00 Nick Østergaard :

> I tried to pull your branch and it segfaults when opening a board in
> pcbnew.
>
> (gdb) bt
> #0  0x7fee50d90338 in SHAPE_POLY_SET::Vertex(int) () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #1  0x7fee50b33512 in ZONE_CONTAINER::Hatch() [clone .part.237] ()
> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #2  0x7fee50bd0e63 in PCB_PARSER::parseZONE_CONTAINER() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #3  0x7fee50bd1dd9 in PCB_PARSER::parseBOARD_unchecked() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #4  0x7fee50bd22f2 in PCB_PARSER::parseBOARD() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #5  0x7fee50bd26d2 in PCB_PARSER::Parse() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #6  0x7fee50b94a97 in PCB_IO::Load(wxString const&, BOARD*,
> PROPERTIES const*) () at /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #7  0x7fee508e3658 in
> PCB_EDIT_FRAME::OpenProjectFiles(std::vector std::allocator > const&, int) ()
> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #8  0x7fee508e50ac in
> PCB_EDIT_FRAME::OnFileHistory(wxCommandEvent&) () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #9  0x7fee64abd74e in
> wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&,
> wxEvent&) const () at /usr/lib/libwx_baseu-3.0.so.0
> #10 0x7fee64c40c35 in
> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
> wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.0.so.0
> #11 0x7fee64c40d2b in wxEventHashTable::HandleEvent(wxEvent&,
> wxEvtHandler*) () at /usr/lib/libwx_baseu-3.0.so.0
> #12 0x7fee64c410db in wxEvtHandler::TryHereOnly(wxEvent&) () at
> /usr/lib/libwx_baseu-3.0.so.0
> #13 0x7fee50cd2a79 in EDA_BASE_FRAME::ProcessEvent(wxEvent&) () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #14 0x7fee64c40ee3 in wxEvtHandler::DoTryChain(wxEvent&) () at
> /usr/lib/libwx_baseu-3.0.so.0
> #15 0x7fee64c411c5 in wxEvtHandler::ProcessEvent(wxEvent&) () at
> /usr/lib/libwx_baseu-3.0.so.0
> #16 0x7fee655b9fe8 in wxWindowBase::TryAfter(wxEvent&) () at
> /usr/lib/libwx_gtk2u_core-3.0.so.0
> #17 0x7fee64c40f37 in wxEvtHandler::SafelyProcessEvent(wxEvent&)
> () at /usr/lib/libwx_baseu-3.0.so.0
> #18 0x7fee6555e82f in wxMenuBase::SendEvent(int, int) () at
> /usr/lib/libwx_gtk2u_core-3.0.so.0
>
> 2017-02-16 18:50 GMT+01:00 Alejandro Garcia Montoro
> :
> > Hi!
> >
> > These last days I have detected a bunch of more bugs in my code regarding
> > zone editing, cutout zones, combination of self-intersecting polygons and
> > some drawing issues. All of them are now fixed, and some more tests are
> > added, both in my branch [1] and in the attached patches. Still, more
> > testing is needed, I don't want to break anything.
> >
> > JP, I don't see the zoom and refill bugs you catched, can you provide me
> > with a test board in which these bugs occur, or describe a little bit
> more a
> > way to reproduce them? Thanks!
> >
> > Btw, I don't know if I'm managing my branch in the correct way. I'm
> merging
> > the latest master revisions, maybe is it better to keep the branch clean
> > using rebase? I'm following the last comments in section Managing your
> own
> > branch [2].
> >
> > Best,
> > Alejandro
> >
> > [1] https://git.launchpad.net/~agarciamontoro/kicad/?h=polygon-refactor
> > [2] http://kicad-pcb.org/contribute/developers/#_managing_your_
> own_branch
> >
> > 2017-02-01 15:45 GMT+01:00 Maciej Sumiński :
> >>
> >> On 02/01/2017 02:36 PM, jp charras wrote:
> >> [snip]
> >> > * In GAL canvas, depending on the zoom level and the size of the
> filled
> >> > zones areas, filled zones
> >> > areas are displayed or not.
> >> > Same for zone outlines.
> >>
> >> Without looking at the code, my first shot is incorrect bounding box
> >> calculation (ViewBBox() method).
> >>
> >> Regards,
> >> Orson
> >>
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >>
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.n

Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-17 Thread Alejandro Garcia Montoro
Hi, Nick, thanks for the feedback!

I've tested the opening of a bunch of different boards and I see no
segfault. Is this in a Debug or Release build? GAL or Legacy? I was testing
a Debug and now compiling a Release, I'll let you know when my slow machine
finishes.

Btw, I catched another unrelated bug in RemoveNullSegments, that is now
fixed, so please pull the branch again if you continue testing.

Best,
Alejandro

2017-02-16 22:13 GMT+01:00 Nick Østergaard :

> I tried to pull your branch and it segfaults when opening a board in
> pcbnew.
>
> (gdb) bt
> #0  0x7fee50d90338 in SHAPE_POLY_SET::Vertex(int) () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #1  0x7fee50b33512 in ZONE_CONTAINER::Hatch() [clone .part.237] ()
> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #2  0x7fee50bd0e63 in PCB_PARSER::parseZONE_CONTAINER() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #3  0x7fee50bd1dd9 in PCB_PARSER::parseBOARD_unchecked() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #4  0x7fee50bd22f2 in PCB_PARSER::parseBOARD() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #5  0x7fee50bd26d2 in PCB_PARSER::Parse() () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #6  0x7fee50b94a97 in PCB_IO::Load(wxString const&, BOARD*,
> PROPERTIES const*) () at /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #7  0x7fee508e3658 in
> PCB_EDIT_FRAME::OpenProjectFiles(std::vector std::allocator > const&, int) ()
> at /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #8  0x7fee508e50ac in
> PCB_EDIT_FRAME::OnFileHistory(wxCommandEvent&) () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #9  0x7fee64abd74e in
> wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&,
> wxEvent&) const () at /usr/lib/libwx_baseu-3.0.so.0
> #10 0x7fee64c40c35 in
> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
> wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.0.so.0
> #11 0x7fee64c40d2b in wxEventHashTable::HandleEvent(wxEvent&,
> wxEvtHandler*) () at /usr/lib/libwx_baseu-3.0.so.0
> #12 0x7fee64c410db in wxEvtHandler::TryHereOnly(wxEvent&) () at
> /usr/lib/libwx_baseu-3.0.so.0
> #13 0x7fee50cd2a79 in EDA_BASE_FRAME::ProcessEvent(wxEvent&) () at
> /tmp/kicad/usr/local/bin/_pcbnew.kiface
> #14 0x7fee64c40ee3 in wxEvtHandler::DoTryChain(wxEvent&) () at
> /usr/lib/libwx_baseu-3.0.so.0
> #15 0x7fee64c411c5 in wxEvtHandler::ProcessEvent(wxEvent&) () at
> /usr/lib/libwx_baseu-3.0.so.0
> #16 0x7fee655b9fe8 in wxWindowBase::TryAfter(wxEvent&) () at
> /usr/lib/libwx_gtk2u_core-3.0.so.0
> #17 0x7fee64c40f37 in wxEvtHandler::SafelyProcessEvent(wxEvent&)
> () at /usr/lib/libwx_baseu-3.0.so.0
> #18 0x7fee6555e82f in wxMenuBase::SendEvent(int, int) () at
> /usr/lib/libwx_gtk2u_core-3.0.so.0
>
> 2017-02-16 18:50 GMT+01:00 Alejandro Garcia Montoro
> :
> > Hi!
> >
> > These last days I have detected a bunch of more bugs in my code regarding
> > zone editing, cutout zones, combination of self-intersecting polygons and
> > some drawing issues. All of them are now fixed, and some more tests are
> > added, both in my branch [1] and in the attached patches. Still, more
> > testing is needed, I don't want to break anything.
> >
> > JP, I don't see the zoom and refill bugs you catched, can you provide me
> > with a test board in which these bugs occur, or describe a little bit
> more a
> > way to reproduce them? Thanks!
> >
> > Btw, I don't know if I'm managing my branch in the correct way. I'm
> merging
> > the latest master revisions, maybe is it better to keep the branch clean
> > using rebase? I'm following the last comments in section Managing your
> own
> > branch [2].
> >
> > Best,
> > Alejandro
> >
> > [1] https://git.launchpad.net/~agarciamontoro/kicad/?h=polygon-refactor
> > [2] http://kicad-pcb.org/contribute/developers/#_
> managing_your_own_branch
> >
> > 2017-02-01 15:45 GMT+01:00 Maciej Sumiński :
> >>
> >> On 02/01/2017 02:36 PM, jp charras wrote:
> >> [snip]
> >> > * In GAL canvas, depending on the zoom level and the size of the
> filled
> >> > zones areas, filled zones
> >> > areas are displayed or not.
> >> > Same for zone outlines.
> >>
> >> Without looking at the code, my first shot is incorrect bounding box
> >> calculation (ViewBBox() method).
> >>
> >> Regards,
> >> Orson
> >>
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >>
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
___
Mailing list: https://launchpad.net/~kicad-developer

Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-16 Thread Nick Østergaard
I tried to pull your branch and it segfaults when opening a board in pcbnew.

(gdb) bt
#0  0x7fee50d90338 in SHAPE_POLY_SET::Vertex(int) () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#1  0x7fee50b33512 in ZONE_CONTAINER::Hatch() [clone .part.237] ()
at /tmp/kicad/usr/local/bin/_pcbnew.kiface
#2  0x7fee50bd0e63 in PCB_PARSER::parseZONE_CONTAINER() () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#3  0x7fee50bd1dd9 in PCB_PARSER::parseBOARD_unchecked() () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#4  0x7fee50bd22f2 in PCB_PARSER::parseBOARD() () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#5  0x7fee50bd26d2 in PCB_PARSER::Parse() () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#6  0x7fee50b94a97 in PCB_IO::Load(wxString const&, BOARD*,
PROPERTIES const*) () at /tmp/kicad/usr/local/bin/_pcbnew.kiface
#7  0x7fee508e3658 in
PCB_EDIT_FRAME::OpenProjectFiles(std::vector > const&, int) ()
at /tmp/kicad/usr/local/bin/_pcbnew.kiface
#8  0x7fee508e50ac in
PCB_EDIT_FRAME::OnFileHistory(wxCommandEvent&) () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#9  0x7fee64abd74e in
wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&,
wxEvent&) const () at /usr/lib/libwx_baseu-3.0.so.0
#10 0x7fee64c40c35 in
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.0.so.0
#11 0x7fee64c40d2b in wxEventHashTable::HandleEvent(wxEvent&,
wxEvtHandler*) () at /usr/lib/libwx_baseu-3.0.so.0
#12 0x7fee64c410db in wxEvtHandler::TryHereOnly(wxEvent&) () at
/usr/lib/libwx_baseu-3.0.so.0
#13 0x7fee50cd2a79 in EDA_BASE_FRAME::ProcessEvent(wxEvent&) () at
/tmp/kicad/usr/local/bin/_pcbnew.kiface
#14 0x7fee64c40ee3 in wxEvtHandler::DoTryChain(wxEvent&) () at
/usr/lib/libwx_baseu-3.0.so.0
#15 0x7fee64c411c5 in wxEvtHandler::ProcessEvent(wxEvent&) () at
/usr/lib/libwx_baseu-3.0.so.0
#16 0x7fee655b9fe8 in wxWindowBase::TryAfter(wxEvent&) () at
/usr/lib/libwx_gtk2u_core-3.0.so.0
#17 0x7fee64c40f37 in wxEvtHandler::SafelyProcessEvent(wxEvent&)
() at /usr/lib/libwx_baseu-3.0.so.0
#18 0x7fee6555e82f in wxMenuBase::SendEvent(int, int) () at
/usr/lib/libwx_gtk2u_core-3.0.so.0

2017-02-16 18:50 GMT+01:00 Alejandro Garcia Montoro
:
> Hi!
>
> These last days I have detected a bunch of more bugs in my code regarding
> zone editing, cutout zones, combination of self-intersecting polygons and
> some drawing issues. All of them are now fixed, and some more tests are
> added, both in my branch [1] and in the attached patches. Still, more
> testing is needed, I don't want to break anything.
>
> JP, I don't see the zoom and refill bugs you catched, can you provide me
> with a test board in which these bugs occur, or describe a little bit more a
> way to reproduce them? Thanks!
>
> Btw, I don't know if I'm managing my branch in the correct way. I'm merging
> the latest master revisions, maybe is it better to keep the branch clean
> using rebase? I'm following the last comments in section Managing your own
> branch [2].
>
> Best,
> Alejandro
>
> [1] https://git.launchpad.net/~agarciamontoro/kicad/?h=polygon-refactor
> [2] http://kicad-pcb.org/contribute/developers/#_managing_your_own_branch
>
> 2017-02-01 15:45 GMT+01:00 Maciej Sumiński :
>>
>> On 02/01/2017 02:36 PM, jp charras wrote:
>> [snip]
>> > * In GAL canvas, depending on the zoom level and the size of the filled
>> > zones areas, filled zones
>> > areas are displayed or not.
>> > Same for zone outlines.
>>
>> Without looking at the code, my first shot is incorrect bounding box
>> calculation (ViewBBox() method).
>>
>> Regards,
>> Orson
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-01 Thread Maciej Sumiński
On 02/01/2017 02:36 PM, jp charras wrote:
[snip]
> * In GAL canvas, depending on the zoom level and the size of the filled zones 
> areas, filled zones
> areas are displayed or not.
> Same for zone outlines.

Without looking at the code, my first shot is incorrect bounding box
calculation (ViewBBox() method).

Regards,
Orson



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-02-01 Thread jp charras
Le 30/01/2017 à 22:30, Alejandro Garcia Montoro a écrit :
> 
> I've pushed a polygon-refactor branch on my own repo, see [1].
>  
> 
> Developers, please review and test this patch as thoroughly as possible
> and give feedback to Alejandro.  Once we are comfortable that it is good
> to go, we can merge it into master.
> 
> I probably wont get time to review it this week since I'm leaving for
> FOSDEM Thursday.  I will try to get to it as soon as possible after I
> get back.

Hi Alejandro,

I made a quick test of the polygon-refactor branch.

I encountered a few issues (both on W7 and Linux)

* a minor issue in /a/geometry/CMakeLists.txt:
The add_dependencies is missing: something like add_dependencies( qa_geometry 
pcbnew ) is needed.

* In GAL canvas, depending on the zoom level and the size of the filled zones 
areas, filled zones
areas are displayed or not.
Same for zone outlines.

* When refilling a zone, the filled area is broken, and covers tracks and pads.
Strangely, some obstacles like texts on copper layers and lines on edge-cut 
layers are not covered.

* there are also some issues in legacy mode, when trying to edit a zone outline.

Also please, update you working branch to the latest master version: I fixed an 
annoying issue.

Thanks.

-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-01-30 Thread Alejandro Garcia Montoro
2017-01-30 15:25 GMT+01:00 Wayne Stambaugh :

> Thank you Alejandro.  The refactoring looks good and the unit tests are
> a nice touch.  Since this patch is rather large, it might be worthwhile
> pushing this to a new branch in you own development repo on launchpad so
> other devs can clone it or merge it into there own development repos.
>

I've pushed a polygon-refactor branch on my own repo, see [1].


> Developers, please review and test this patch as thoroughly as possible
> and give feedback to Alejandro.  Once we are comfortable that it is good
> to go, we can merge it into master.
>
> I probably wont get time to review it this week since I'm leaving for
> FOSDEM Thursday.  I will try to get to it as soon as possible after I
> get back.
>

Nice, thank you!

[1] https://git.launchpad.net/~agarciamontoro/kicad/
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

2017-01-30 Thread Wayne Stambaugh
Thank you Alejandro.  The refactoring looks good and the unit tests are
a nice touch.  Since this patch is rather large, it might be worthwhile
pushing this to a new branch in you own development repo on launchpad so
other devs can clone it or merge it into there own development repos.

Developers, please review and test this patch as thoroughly as possible
and give feedback to Alejandro.  Once we are comfortable that it is good
to go, we can merge it into master.

I probably wont get time to review it this week since I'm leaving for
FOSDEM Thursday.  I will try to get to it as soon as possible after I
get back.

Cheers,

Wayne

On 1/30/2017 8:33 AM, Alejandro Garcia Montoro wrote:
> Whoops, sorry, wrong patches.
> 
> These are the ones.
> 
> 2017-01-30 13:57 GMT+01:00 Alejandro Garcia Montoro
>  >:
> 
> Hi!
> 
> I finally managed to refactor all code from
> polygon/PolyLine.{h,cpp}, yay!
> 
> The first patch (which is quite long) contains all the refactoring
> and its propagated changes, whereas the second adds some tests to
> qa/ in order to check that the new code is consistent with the old one.
> 
> The major changes are on shape_poly_set.{h,cpp}, where the
> refactored methods are added. There are also major changes on
> class_zone.{h,cpp}, as the zone representation has changed from
> CPolyLine to SHAPE_POLY_SET. A bunch of loops in several files,
> which iterate through the vertices or segments of the polygons are
> simplified using the family of ITERATOR classes, based on the
> previous work of Tomasz.
> 
> This patch could potentially break *a lot* of things, so it would be
> great if you could play around and check that everything remains the
> same. I've only tested the changes on Linux; tests on Windows are on
> the way, but I have no access to an OSX machine, so I definitely
> need some help there.
> 
> Any comments are more than welcome.
> 
> Thanks to the CERN guys for all the help :)
> 
> Best,
> Alejandro
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp