pcbnew: added oblong thermal relief for oblong pads (from a contribution) . added contributor to kicad list
This commit is contained in:
parent
7beb0f2226
commit
fff34db7f3
|
@ -99,6 +99,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
|
|||
info.AddDeveloper( SetMsg( wxT( "Jerry Jacobs <jerkejacobs@gmail.com>" ) ) );
|
||||
info.AddDeveloper( SetMsg( wxT( "Dick Hollenbeck <dick@softplc.com>" ) ) );
|
||||
info.AddDeveloper( SetMsg( wxT( "KBool Library <http://boolean.klaasholwerda.nl/bool.html>" ) ) );
|
||||
info.AddDeveloper( SetMsg( wxT( "Vesa Solonen <vesa.solonen@hut.fi>" ) ) );
|
||||
|
||||
/* Add document writers */
|
||||
info.AddDocWriter( wxT( "Jean-Pierre Charras <jean-pierre.charras@inpg.fr>" ) );
|
||||
|
|
|
@ -400,7 +400,8 @@ void SCH_COMPONENT::SwapData( SCH_COMPONENT* copyitem )
|
|||
|
||||
m_Fields.swap( copyitem->m_Fields ); // std::vector's swap()
|
||||
|
||||
// Reparent items after copying data (after swap() m_Pareny member does not points the right parent):
|
||||
// Reparent items after copying data
|
||||
// (after swap(), m_Parent member does not points the right parent):
|
||||
for( int ii = 0; ii < copyitem->GetFieldCount(); ++ii )
|
||||
{
|
||||
copyitem->GetField(ii)->m_Parent = copyitem;
|
||||
|
|
|
@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
|
|||
# include "config.h"
|
||||
(wxT(KICAD_SVN_VERSION))
|
||||
# else
|
||||
(wxT("(20081008-unstable)")) /* main program version */
|
||||
(wxT("(20081019-unstable)")) /* main program version */
|
||||
# endif
|
||||
#endif
|
||||
;
|
||||
|
@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion
|
|||
# include "config.h"
|
||||
(wxT(KICAD_ABOUT_VERSION))
|
||||
# else
|
||||
(wxT("(20081008-unstable)")) /* svn date & rev (normally overridden) */
|
||||
(wxT("(20081019-unstable)")) /* svn date & rev (normally overridden) */
|
||||
# endif
|
||||
#endif
|
||||
;
|
||||
|
|
Binary file not shown.
2968
internat/fr/kicad.po
2968
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
|
@ -408,6 +408,145 @@ void AddThermalReliefPadPolygon( Bool_Engine* aBooleng,
|
|||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
{
|
||||
// Oval pad support along the lines of round and rectangular pads
|
||||
|
||||
std::vector <wxPoint> corners_buffer; // Polygon buffer as vector
|
||||
|
||||
int dx = (aPad.m_Size.x / 2) + aThermalGap; // Cutout radius x
|
||||
int dy = (aPad.m_Size.y / 2) + aThermalGap; // Cutout radius y
|
||||
|
||||
wxPoint shape_offset;
|
||||
|
||||
if( dx > dy ) // Some coordinate fiddling, depending on the shape offset direction
|
||||
{
|
||||
shape_offset = wxPoint( (dx - dy), 0 );
|
||||
|
||||
// Crosspoint of thermal spoke sides, the first point of polygon buffer
|
||||
corners_buffer.push_back( wxPoint( copper_tickness.x / 2, copper_tickness.y / 2 ) );
|
||||
|
||||
// Arc start point calculation, the intersecting point of cutout arc and thermal spoke edge
|
||||
if( copper_tickness.x > dx - dy ) // If copper thickness is more than shape offset, we need to calculate arc intercept point.
|
||||
{
|
||||
corner.x = copper_tickness.x / 2;
|
||||
corner.y =
|
||||
(int) sqrt( (double) ( dy * dy ) -
|
||||
( ( corner.x - (dx - dy) ) * ( corner.x - (dx - dy) ) ) );
|
||||
corner.x -= (dx - dy);
|
||||
}
|
||||
else
|
||||
{
|
||||
corner.x = copper_tickness.x / 2;
|
||||
corner.y = dy;
|
||||
corners_buffer.push_back( corner );
|
||||
corner.x = ( (dx - dy) - copper_tickness.x ) / 2;
|
||||
}
|
||||
|
||||
// Arc stop point calculation, the intersecting point of cutout arc and thermal spoke edge
|
||||
corner_end.y = copper_tickness.y / 2;
|
||||
corner_end.x = (int) sqrt( (double) ( ( dx * dx ) - ( corner_end.y * corner_end.y ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
shape_offset = wxPoint( 0, (dx - dy) );
|
||||
corners_buffer.push_back( wxPoint( copper_tickness.x / 2, -copper_tickness.y / 2 ) );
|
||||
|
||||
if( copper_tickness.y > dy - dx )
|
||||
{
|
||||
corner.y = copper_tickness.y / 2;
|
||||
corner.x =
|
||||
(int) sqrt( (double) ( dx *
|
||||
dx ) -
|
||||
( ( corner.y - (dy - dx) ) * ( corner.y - (dy - dx) ) ) );
|
||||
corner.y = ( -copper_tickness.y / 2 ) + (dy - dx);
|
||||
}
|
||||
else
|
||||
{
|
||||
corner.y = -copper_tickness.y / 2;
|
||||
corner.x = dx;
|
||||
corners_buffer.push_back( corner );
|
||||
corner.y = ( (dy - dx) - copper_tickness.y ) / 2;
|
||||
}
|
||||
corner_end.x = copper_tickness.x / 2;
|
||||
corner_end.y = -(int) sqrt( (double) ( ( dy * dy ) - ( corner_end.x * corner_end.x ) ) );
|
||||
}
|
||||
|
||||
|
||||
// calculate intermediate points till limit is reached
|
||||
if( dx > dy )
|
||||
{
|
||||
while( (corner.y > corner_end.y) && (corner.x < corner_end.x) )
|
||||
{
|
||||
corners_buffer.push_back( corner + shape_offset );
|
||||
RotatePoint( &corner, delta );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while( (corner.y > corner_end.y) && (corner.x > corner_end.x) )
|
||||
{
|
||||
corners_buffer.push_back( corner + shape_offset );
|
||||
RotatePoint( &corner, delta );
|
||||
}
|
||||
}
|
||||
|
||||
//corners_buffer.push_back(corner + shape_offset); // TODO: about one mil geometry error forms somewhere.
|
||||
corners_buffer.push_back( corner_end ); // Enabling the line above shows intersection point.
|
||||
|
||||
|
||||
/* Create 2 holes, rotated by pad rotation.
|
||||
*/
|
||||
angle = aPad.m_Orient;
|
||||
for( int irect = 0; irect < 2; irect++ )
|
||||
{
|
||||
if( aBooleng->StartPolygonAdd( GROUP_B ) )
|
||||
{
|
||||
for( int ic = 0; ic < corners_buffer.size(); ic++ )
|
||||
{
|
||||
wxPoint cpos = corners_buffer[ic];
|
||||
RotatePoint( &cpos, angle );
|
||||
cpos += PadShapePos;
|
||||
aBooleng->AddPoint( cpos.x, cpos.y );
|
||||
}
|
||||
|
||||
aBooleng->EndPolygonAdd();
|
||||
angle += 1800; // this is calculate hole 3
|
||||
if( angle >= 3600 )
|
||||
angle -= 3600;
|
||||
}
|
||||
}
|
||||
|
||||
// Create holes, that are the mirrored from the previous holes
|
||||
for( int i = 0; i < corners_buffer.size(); i++ )
|
||||
{
|
||||
wxPoint swap = corners_buffer[i];
|
||||
swap = wxPoint( -swap.x, swap.y );
|
||||
corners_buffer[i] = swap;
|
||||
}
|
||||
|
||||
// Now add corner 4 and 2 (2 is the corner 4 rotated by 180 deg
|
||||
angle = aPad.m_Orient;
|
||||
for( int irect = 0; irect < 2; irect++ )
|
||||
{
|
||||
if( aBooleng->StartPolygonAdd( GROUP_B ) )
|
||||
{
|
||||
for( int ic = 0; ic < corners_buffer.size(); ic++ )
|
||||
{
|
||||
wxPoint cpos = corners_buffer[ic];
|
||||
RotatePoint( &cpos, angle );
|
||||
cpos += PadShapePos;
|
||||
aBooleng->AddPoint( cpos.x, cpos.y );
|
||||
}
|
||||
|
||||
aBooleng->EndPolygonAdd();
|
||||
angle += 1800;
|
||||
if( angle >= 3600 )
|
||||
angle -= 3600;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT: // draw 4 Holes
|
||||
{
|
||||
/* we create 4 copper holes and put them in position 1, 2, 3 and 4
|
||||
|
|
Loading…
Reference in New Issue