Re: [Kicad-developers] [PATCH] V4 Rectangular pads with rounded corners
Kaspar Emanuel kaspar.eman...@gmail.com writes: Was this applied, will it be in stable? I am interested mainly because of my library that works with .kicad_mod files. If this were planned to go in I would suggest to take the patch for SHAPE_CONVEX first. Without it roundrect pads will behave rather oddly when using the OpenGL/Cairo canvas. The SHAPE_CONVEX patch in itself is somewhat low risk IMHO, since it only changes things for users of trapezoidal or oddly rotated pads, and only with OpenGL/Cairo. The roundrect patch then would need some extensions to make use of SHAPE_CONVEX. This patch is higher risk because it touches external data format, exported/plotted data, all canvas types and so on. MGri ___ 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] V4 Rectangular pads with rounded corners
I'm am putting a hold on any new features except for Chris Pavlina's schematic component library conflict patch until we get all of the crash bugs fixed. We have not been making good progress on that front and I want to avoid having developers spending a lot of time testing new code until the critical bugs are fixed. If by some miracle we get the critical bugs fixed soon (read next few weeks), I will consider new features on a case by case basis between now and the stable release. I will say up front that I tend to be conservative when it comes to this so don't expect me to approve many new features between now and the stable release. On 4/17/2015 7:08 PM, Nick Østergaard wrote: I don't think so. Me myself have not even got around to test the patch. Since little to no response has been seen from the main developers, I guess thaty have not yet found the time. I doubt it will be in the release, but that is mainly Wayne that decides that. It probably needs some testing, so you could try to see if you can make it fail. 2015-04-18 0:40 GMT+02:00 Kaspar Emanuel kaspar.eman...@gmail.com: Was this applied, will it be in stable? I am interested mainly because of my library that works with .kicad_mod files. On 2 March 2015 at 01:57, LordBlick lordbl...@gmail.com wrote: In response to a message written on 02.03.2015, 02:41, from Jon Neal: Any chance you can attach this a patch file? Maybe is it ? -- Best Regards, LordBlick ___ 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] V4 Rectangular pads with rounded corners
I don't think so. Me myself have not even got around to test the patch. Since little to no response has been seen from the main developers, I guess thaty have not yet found the time. I doubt it will be in the release, but that is mainly Wayne that decides that. It probably needs some testing, so you could try to see if you can make it fail. 2015-04-18 0:40 GMT+02:00 Kaspar Emanuel kaspar.eman...@gmail.com: Was this applied, will it be in stable? I am interested mainly because of my library that works with .kicad_mod files. On 2 March 2015 at 01:57, LordBlick lordbl...@gmail.com wrote: In response to a message written on 02.03.2015, 02:41, from Jon Neal: Any chance you can attach this a patch file? Maybe is it ? -- Best Regards, LordBlick ___ 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] V4 Rectangular pads with rounded corners
Was this applied, will it be in stable? I am interested mainly because of my library that works with .kicad_mod files. On 2 March 2015 at 01:57, LordBlick lordbl...@gmail.com wrote: In response to a message written on 02.03.2015, 02:41, from Jon Neal: Any chance you can attach this a patch file? Maybe is it ? -- Best Regards, LordBlick ___ 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
[Kicad-developers] [PATCH] V4 Rectangular pads with rounded corners
Hi everybody, below is the fourth version of a patch to add support for rectangular pads with rounded corners to KiCad. The patch was generated against revision 5464. What is new: - export to VRML works, - export to Specctra DSN works, at least Freeroute reads and displays it, - pad to pad DRC is implemented with proper PAD_ROUNDRECT support, at least I think I got it right, - in the process I fixed what I think was a bug in trapezoid2pointDRC(), - I changed the way generating the module report works to how I believe it is supposed to work. What is still to do: - GenCAD export, I do not understand what this is used for and couldn't find a viewer that would show something I could recognize, so PAD_ROUNDRECT is still handled the same way as PAD_TRAPEZOID, - proper support in the PNS router, without a SHAPE_CONVEX nothing can be done about that (I might look into that). This will be the last version of this patch for now, unless somebody points out a bug or some missing piece. IMHO this is now usable, so if you want it in KiCad... ;-) Enjoy, MGri === modified file 'common/common_plotDXF_functions.cpp' --- common/common_plotDXF_functions.cpp 2015-02-26 10:33:15 + +++ common/common_plotDXF_functions.cpp 2015-03-01 22:25:20 + @@ -623,6 +623,12 @@ FinishTo( wxPoint( ox, oy ) ); } +void DXF_PLOTTER::FlashPadRoundRect( const wxPoint pos, const wxPoint corners[12], + int cornerRadius, double orient, + EDA_DRAW_MODE_T trace_mode ) +{ +// Not actually needed, because for DXF copper is plotted entirely as polygons +} /** * DXF trapezoidal pad: only sketch mode is supported === modified file 'common/common_plotGERBER_functions.cpp' --- common/common_plotGERBER_functions.cpp 2015-02-18 19:27:00 + +++ common/common_plotGERBER_functions.cpp 2015-03-01 22:25:20 + @@ -559,6 +559,120 @@ } +void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint pos, const wxPoint corners[12], +int cornerRadius, double orient, +EDA_DRAW_MODE_T trace_mode ) + +{ +wxASSERT( outputFile ); + +// XXX to do: use an aperture macro to declare the pad if possible + +if( ( orient == 0 || orient == 900 || orient == 1800 || orient == 2700 ) + trace_mode == FILLED ) +{ +wxSize size; +DPOINT pos_dev; + +// flash the large rectangle of the center polygon +pos_dev = userToDeviceCoordinates( pos ); +if( orient == 0 || orient == 1800 ) +{ +size = wxSize( corners[4].x - corners[11].x, + corners[4].y - corners[5].y ); +} +else +{ +size = wxSize( corners[1].y - corners[8].y, + corners[3].x - corners[0].x ); +} +selectAperture( size, APERTURE::Rect ); +emitDcode( pos_dev, 3 ); +// flash the top small rectangle of the center polygon +if( orient == 0 || orient == 1800 ) +{ +pos_dev = userToDeviceCoordinates( pos + wxPoint( 0, corners[0].y + cornerRadius / 2 )); +size = wxSize( corners[3].x - corners[0].x, + corners[1].y - corners[0].y ); +} +else +{ +pos_dev = userToDeviceCoordinates( pos + wxPoint( 0, corners[3].x + cornerRadius / 2 )); +size = wxSize( corners[3].y - corners[6].y, + corners[4].x - corners[3].x ); +} +selectAperture( size, APERTURE::Rect ); +emitDcode( pos_dev, 3 ); +// flash the bottom small rectangle of the center polygon +if( orient == 0 || orient == 1800 ) +{ +pos_dev = userToDeviceCoordinates( pos - wxPoint( 0, corners[0].y + cornerRadius / 2 )); +} +else +{ +pos_dev = userToDeviceCoordinates( pos - wxPoint( 0, corners[3].x + cornerRadius / 2 )); +} +selectAperture( size, APERTURE::Rect ); +emitDcode( pos_dev, 3 ); +// Flash the 4 corner circles +size = wxSize( cornerRadius 1, cornerRadius 1 ); +selectAperture( size, APERTURE::Circle ); +if( orient == 0 || orient == 1800 ) +{ +pos_dev = userToDeviceCoordinates( corners[0] + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( corners[3] + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( corners[6] + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( corners[9] + pos ); +emitDcode( pos_dev, 3 ); +} +else +{ +pos_dev = userToDeviceCoordinates( +wxPoint( corners[0].y, -corners[0].x ) + pos ); +emitDcode( pos_dev, 3 ); +pos_dev =
Re: [Kicad-developers] [PATCH] V4 Rectangular pads with rounded corners
In response to a message written on 02.03.2015, 02:41, from Jon Neal: Any chance you can attach this a patch file? Maybe is it ? -- Best Regards, LordBlick --- common/common_plotDXF_functions.cpp +++ common/common_plotDXF_functions.cpp @@ -623,6 +623,12 @@ FinishTo( wxPoint( ox, oy ) ); } +void DXF_PLOTTER::FlashPadRoundRect( const wxPoint pos, const wxPoint corners[12], + int cornerRadius, double orient, + EDA_DRAW_MODE_T trace_mode ) +{ +// Not actually needed, because for DXF copper is plotted entirely as polygons +} /** * DXF trapezoidal pad: only sketch mode is supported --- common/common_plotGERBER_functions.cpp +++ common/common_plotGERBER_functions.cpp @@ -559,6 +559,120 @@ } +void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint pos, const wxPoint corners[12], +int cornerRadius, double orient, +EDA_DRAW_MODE_T trace_mode ) + +{ +wxASSERT( outputFile ); + +// XXX to do: use an aperture macro to declare the pad if possible + +if( ( orient == 0 || orient == 900 || orient == 1800 || orient == 2700 ) + trace_mode == FILLED ) +{ +wxSize size; +DPOINT pos_dev; + +// flash the large rectangle of the center polygon +pos_dev = userToDeviceCoordinates( pos ); +if( orient == 0 || orient == 1800 ) +{ +size = wxSize( corners[4].x - corners[11].x, + corners[4].y - corners[5].y ); +} +else +{ +size = wxSize( corners[1].y - corners[8].y, + corners[3].x - corners[0].x ); +} +selectAperture( size, APERTURE::Rect ); +emitDcode( pos_dev, 3 ); +// flash the top small rectangle of the center polygon +if( orient == 0 || orient == 1800 ) +{ +pos_dev = userToDeviceCoordinates( pos + wxPoint( 0, corners[0].y + cornerRadius / 2 )); +size = wxSize( corners[3].x - corners[0].x, + corners[1].y - corners[0].y ); +} +else +{ +pos_dev = userToDeviceCoordinates( pos + wxPoint( 0, corners[3].x + cornerRadius / 2 )); +size = wxSize( corners[3].y - corners[6].y, + corners[4].x - corners[3].x ); +} +selectAperture( size, APERTURE::Rect ); +emitDcode( pos_dev, 3 ); +// flash the bottom small rectangle of the center polygon +if( orient == 0 || orient == 1800 ) +{ +pos_dev = userToDeviceCoordinates( pos - wxPoint( 0, corners[0].y + cornerRadius / 2 )); +} +else +{ +pos_dev = userToDeviceCoordinates( pos - wxPoint( 0, corners[3].x + cornerRadius / 2 )); +} +selectAperture( size, APERTURE::Rect ); +emitDcode( pos_dev, 3 ); +// Flash the 4 corner circles +size = wxSize( cornerRadius 1, cornerRadius 1 ); +selectAperture( size, APERTURE::Circle ); +if( orient == 0 || orient == 1800 ) +{ +pos_dev = userToDeviceCoordinates( corners[0] + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( corners[3] + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( corners[6] + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( corners[9] + pos ); +emitDcode( pos_dev, 3 ); +} +else +{ +pos_dev = userToDeviceCoordinates( +wxPoint( corners[0].y, -corners[0].x ) + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( +wxPoint( corners[3].y, -corners[3].x ) + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( +wxPoint( corners[6].y, -corners[6].x ) + pos ); +emitDcode( pos_dev, 3 ); +pos_dev = userToDeviceCoordinates( +wxPoint( corners[9].y, -corners[9].x ) + pos ); +emitDcode( pos_dev, 3 ); +} +} +else +{ +std::vector wxPoint cornerList; + +// construct the rotated polygons corner list +for( int i = 2; i 12; i += 3 ) +{ +wxPoint p( corners[i] ); +RotatePoint( p, orient ); +p += pos; +cornerList.push_back( p ); +wxPoint center( corners[(i + 1) % 12] ); +RotatePoint( center, orient ); +for( int rot = 100; rot 900; rot += 100 ) +{ +wxPoint pr( corners[i] ); +RotatePoint( pr, orient ); +RotatePoint( pr, center, rot ); +pr += pos; +cornerList.push_back( pr ); +} +} +// plot it +