kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23979
Re: Question about const SHAPE_LINE_CHAIN Outline() const
-
To:
jp charras <jp.charras@xxxxxxxxxx>
-
From:
Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
-
Date:
Wed, 6 Apr 2016 11:59:59 +0200
-
Authentication-results:
spf=pass (sender IP is 188.184.36.48) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
Cc:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<57025AD0.6020608@cern.ch>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
On 04.04.2016 14:15, Maciej Sumiński wrote:
> On 04/04/2016 01:39 PM, jp charras wrote:
>> Sorry if you already sent me a response to this "old" message (first posted on feb 05)
>> but I did not remember this response.
Hi Jean-Pierre,
If you mean this code in your patch:
SHAPE_RECT::Outline()
- rv.Append( m_p0 );
- rv.Append( m_p0.x, m_p0.y + m_w );
- rv.Append( m_p0.x + m_h, m_p0.y + m_w );
- rv.Append( m_p0.x + m_h, m_p0.y );
+ rv.Append( m_p0.x, m_p0.y + m_h );
+ rv.Append( m_p0.x + m_w, m_p0.y + m_h );
+ rv.Append( m_p0.x + m_w, m_p0.y );
It's OK - there was indeed a bug.
Speaking of the pads patch - I didn't have the time to review the whole
pads patch yet. I like very much the rounded rectangle pads, but IMHO
allowing any arbitrary pad shape (including non-convex shapes) is not
the best way to go. I would rather think about enabling graphical
primitives on copper layers and define how they get their nets (e.g.
inherit them from a given pad of the "parent" footprint). This would not
only deal with custom pad shapes but also enable things like parametric
microwave components.
I'll post a proposal & a review of the patch as soon as I can.
Tom
>>
>> It is annoying for the rounded rect pads which use this method.
>> (I currently use a fixed (modified) version in my patch)
>>
>> I can easily fix it, but I do not want to create bugs in pns router.
>>
>> Thanks.
>>
>>> Orson, Tomasz,
>>>
>>> I am thinking there is a bug in geometry/shape_rect.h:
>>> In
>>> const SHAPE_LINE_CHAIN Outline() const
>>>
>>> m_h and m_w look like they are swapped in calculations, and the outline
>>> is incorrect (assuming m_w is the X axis rect size (width), and m_h is
>>> the Y axis rect size (height)).
>>>
>>> Can you have a look at this?
>>>
>>> Thanks
>
> Hi Jean-Pierre,
>
> Just by looking at the code, I am quite positive that you are right in
> this matter, but Tom has to confirm it. He is absent today, so hopefully
> he will respond tomorrow.
>
> Regards,
> Orson
>
Follow ups
References