Implement thermal spokes for custom pad shapes.
The thermal spokes are anchored at the pad anchor. They may or may not make sense, depending on the pad shape. It's up to the author to move the anchor around as necessary or to not use thermals.
This commit is contained in:
parent
a19c668891
commit
79cd457ba7
|
@ -673,25 +673,10 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
switch( m_dummyPad->GetZoneConnection() )
|
||||
{
|
||||
default:
|
||||
case PAD_ZONE_CONN_INHERITED:
|
||||
m_ZoneConnectionChoice->SetSelection( 0 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_FULL:
|
||||
m_ZoneConnectionChoice->SetSelection( 1 );
|
||||
m_ZoneConnectionCustom->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_THERMAL:
|
||||
m_ZoneConnectionChoice->SetSelection( 2 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_NONE:
|
||||
m_ZoneConnectionChoice->SetSelection( 3 );
|
||||
m_ZoneConnectionCustom->SetSelection( 0 );
|
||||
break;
|
||||
case PAD_ZONE_CONN_INHERITED: m_ZoneConnectionChoice->SetSelection( 0 ); break;
|
||||
case PAD_ZONE_CONN_FULL: m_ZoneConnectionChoice->SetSelection( 1 ); break;
|
||||
case PAD_ZONE_CONN_THERMAL: m_ZoneConnectionChoice->SetSelection( 2 ); break;
|
||||
case PAD_ZONE_CONN_NONE: m_ZoneConnectionChoice->SetSelection( 3 ); break;
|
||||
}
|
||||
|
||||
if( m_dummyPad->GetCustomShapeInZoneOpt() == CUST_PAD_SHAPE_IN_ZONE_CONVEXHULL )
|
||||
|
@ -727,11 +712,11 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
switch( m_dummyPad->GetShape() )
|
||||
{
|
||||
default:
|
||||
case PAD_SHAPE_CIRCLE: m_PadShape->SetSelection( CHOICE_SHAPE_CIRCLE ); break;
|
||||
case PAD_SHAPE_OVAL: m_PadShape->SetSelection( CHOICE_SHAPE_OVAL ); break;
|
||||
case PAD_SHAPE_RECT: m_PadShape->SetSelection( CHOICE_SHAPE_RECT ); break;
|
||||
case PAD_SHAPE_TRAPEZOID: m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID ); break;
|
||||
case PAD_SHAPE_ROUNDRECT: m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT ); break;
|
||||
case PAD_SHAPE_CIRCLE: m_PadShape->SetSelection( CHOICE_SHAPE_CIRCLE ); break;
|
||||
case PAD_SHAPE_OVAL: m_PadShape->SetSelection( CHOICE_SHAPE_OVAL ); break;
|
||||
case PAD_SHAPE_RECT: m_PadShape->SetSelection( CHOICE_SHAPE_RECT ); break;
|
||||
case PAD_SHAPE_TRAPEZOID: m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID ); break;
|
||||
case PAD_SHAPE_ROUNDRECT: m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT ); break;
|
||||
case PAD_SHAPE_CHAMFERED_RECT: m_PadShape->SetSelection( CHOICE_SHAPE_CHAMFERED_RECT ); break;
|
||||
|
||||
case PAD_SHAPE_CUSTOM:
|
||||
|
@ -988,16 +973,8 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
|||
m_cbBottomRight->Enable( chamfered_rect_enable );
|
||||
m_tcChamferRatio->Enable( chamfered_rect_enable );
|
||||
|
||||
// PAD_SHAPE_CUSTOM type has constraints for zone connection and thermal shape:
|
||||
// only not connected or solid connection is allowed to avoid destroying the shape.
|
||||
// Enable/disable options only available for custom shaped pads
|
||||
m_ZoneConnectionChoice->Enable( !is_custom );
|
||||
m_ZoneConnectionCustom->Enable( is_custom );
|
||||
m_spokeWidth.Enable( !is_custom );
|
||||
m_thermalGap.Enable( !is_custom );
|
||||
|
||||
m_sbSizerZonesSettings->Show( !is_custom );
|
||||
m_sbSizerCustomShapedZonesSettings->Show( is_custom );
|
||||
m_staticTextcps->Enable( is_custom );
|
||||
m_ZoneCustomPadShape->Enable( is_custom );
|
||||
|
||||
transferDataToPad( m_dummyPad );
|
||||
|
||||
|
@ -1524,17 +1501,7 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
|
|||
m_currentPad->SetRoundRectRadiusRatio( m_padMaster->GetRoundRectRadiusRatio() );
|
||||
m_currentPad->SetChamferRectRatio( m_padMaster->GetChamferRectRatio() );
|
||||
m_currentPad->SetChamferPositions( m_padMaster->GetChamferPositions() );
|
||||
|
||||
if( m_currentPad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||
{
|
||||
if( m_padMaster->GetZoneConnection() == PAD_ZONE_CONN_FULL )
|
||||
m_currentPad->SetZoneConnection( PAD_ZONE_CONN_FULL );
|
||||
else
|
||||
m_currentPad->SetZoneConnection( PAD_ZONE_CONN_NONE );
|
||||
}
|
||||
else
|
||||
m_currentPad->SetZoneConnection( m_padMaster->GetZoneConnection() );
|
||||
|
||||
m_currentPad->SetZoneConnection( m_padMaster->GetZoneConnection() );
|
||||
|
||||
// rounded rect pads with radius ratio = 0 are in fact rect pads.
|
||||
// So set the right shape (and perhaps issues with a radius = 0)
|
||||
|
@ -1613,15 +1580,6 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
|||
case 3: aPad->SetZoneConnection( PAD_ZONE_CONN_NONE ); break;
|
||||
}
|
||||
|
||||
// Custom shape has only 2 options:
|
||||
if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
|
||||
{
|
||||
if( m_ZoneConnectionCustom->GetSelection() == 0 )
|
||||
aPad->SetZoneConnection( PAD_ZONE_CONN_NONE );
|
||||
else
|
||||
aPad->SetZoneConnection( PAD_ZONE_CONN_FULL );
|
||||
}
|
||||
|
||||
aPad->SetPosition( wxPoint( m_posX.GetValue(), m_posY.GetValue() ) );
|
||||
aPad->SetPos0( wxPoint( m_posX.GetValue(), m_posY.GetValue() ) );
|
||||
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
/**
|
||||
* @file dialog_pad_properties.h
|
||||
* @brief dialog pad properties editor.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2013 Dick Hollenbeck, dick@softplc.com
|
||||
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -114,7 +109,7 @@ private:
|
|||
void OnInitDialog( wxInitDialogEvent& event ) override;
|
||||
void OnResize( wxSizeEvent& event );
|
||||
void OnCancel( wxCommandEvent& event ) override;
|
||||
virtual void OnUpdateUI( wxUpdateUIEvent& event ) override;
|
||||
void OnUpdateUI( wxUpdateUIEvent& event ) override;
|
||||
|
||||
void OnUpdateUINonCopperWarning( wxUpdateUIEvent& event ) override
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,12 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 17 2019)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#ifndef __DIALOG_PAD_PROPERTIES_BASE_H__
|
||||
#define __DIALOG_PAD_PROPERTIES_BASE_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
|
@ -52,20 +53,20 @@ class WX_GRID;
|
|||
class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_DIALOG_EDIT_PAD = 1000,
|
||||
wxID_PADNUMCTRL
|
||||
};
|
||||
|
||||
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_panelGeneral;
|
||||
wxStaticText* m_PadNumText;
|
||||
wxTextCtrl* m_PadNumCtrl;
|
||||
wxStaticText* m_PadNameText;
|
||||
NET_SELECTOR* m_PadNetSelector;
|
||||
NET_SELECTOR* m_PadNetSelector;
|
||||
wxStaticText* m_staticText44;
|
||||
wxChoice* m_PadType;
|
||||
wxStaticText* m_staticText45;
|
||||
|
@ -167,9 +168,6 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_thermalGapLabel;
|
||||
wxTextCtrl* m_thermalGapCtrl;
|
||||
wxStaticText* m_thermalGapUnits;
|
||||
wxStaticBoxSizer* m_sbSizerCustomShapedZonesSettings;
|
||||
wxStaticText* m_staticTextCsZconnTitle;
|
||||
wxChoice* m_ZoneConnectionCustom;
|
||||
wxStaticText* m_staticTextcps;
|
||||
wxChoice* m_ZoneCustomPadShape;
|
||||
wxPanel* m_panelCustomShapePrimitives;
|
||||
|
@ -192,7 +190,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
@ -215,13 +213,13 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void onChangePadMode( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_PAD_PROPERTIES_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -230,7 +228,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextPosStart;
|
||||
wxStaticText* m_startXLabel;
|
||||
|
@ -271,12 +269,12 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -285,7 +283,7 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextMove;
|
||||
wxStaticText* m_xLabel;
|
||||
|
@ -305,12 +303,12 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM
|
|||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
|
||||
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -319,7 +317,7 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM
|
|||
class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
WX_GRID* m_gridCornersList;
|
||||
wxBitmapButton* m_addButton;
|
||||
|
@ -336,7 +334,7 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
|
|||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void onGridSelect( wxGridRangeSelectEvent& event ) { event.Skip(); }
|
||||
virtual void onCellSelect( wxGridEvent& event ) { event.Skip(); }
|
||||
|
@ -344,12 +342,13 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
|
|||
virtual void OnButtonDelete( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onPaintPolyPanel( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void onPolyPanelResize( wxSizeEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_PAD_PROPERTIES_BASE_H__
|
||||
|
|
|
@ -706,7 +706,6 @@ void ZONE_FILLER::computeRawFilledArea( const ZONE_CONTAINER* aZone,
|
|||
SHAPE_POLY_SET solidAreas = aSmoothedOutline;
|
||||
|
||||
int numSegs = std::max( GetArcToSegmentCount( outline_half_thickness, m_high_def, 360.0 ), 6 );
|
||||
double correction = GetCircletoPolyCorrectionFactor( numSegs );
|
||||
|
||||
solidAreas.Inflate( -outline_half_thickness, numSegs );
|
||||
solidAreas.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
|
@ -949,10 +948,10 @@ void ZONE_FILLER::buildThermalSpokes( SHAPE_POLY_SET& aCornerBuffer,
|
|||
// Thermal bridges are like a segment from a starting point inside the pad
|
||||
// to an ending point outside the pad
|
||||
|
||||
// calculate the ending point of the thermal pad, outside the pad
|
||||
VECTOR2I endpoint;
|
||||
endpoint.x = ( pad->GetSize().x / 2 ) + thermalReliefGap;
|
||||
endpoint.y = ( pad->GetSize().y / 2 ) + thermalReliefGap;
|
||||
// Calculate the ending points of the thermal spokes, outside the pad
|
||||
itemBB.Offset( -pad->ShapePos() );
|
||||
int extra = pen_radius + KiROUND( IU_PER_MM * 0.04 );
|
||||
itemBB.Inflate( extra, extra );
|
||||
|
||||
// This is a CIRCLE pad tweak
|
||||
// for circle pads, the thermal stubs orientation is 45 deg
|
||||
|
@ -960,20 +959,16 @@ void ZONE_FILLER::buildThermalSpokes( SHAPE_POLY_SET& aCornerBuffer,
|
|||
|
||||
if( pad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
endpoint.x = KiROUND( endpoint.x * correction );
|
||||
endpoint.y = endpoint.x;
|
||||
extra = KiROUND( itemBB.GetX() * correction ) - itemBB.GetX();
|
||||
itemBB.Inflate( extra, extra );
|
||||
fAngle = s_thermalRot;
|
||||
}
|
||||
|
||||
// contour line width has to be taken into calculation to avoid "thermal stub bleed"
|
||||
endpoint.x += pen_radius + KiROUND( IU_PER_MM * 0.04 );
|
||||
endpoint.y += pen_radius + KiROUND( IU_PER_MM * 0.04 );
|
||||
|
||||
// compute north, south, west and east points for zone connection.
|
||||
ptTest[0] = VECTOR2I( 0, endpoint.y ); // lower point
|
||||
ptTest[1] = VECTOR2I( 0, -endpoint.y ); // upper point
|
||||
ptTest[2] = VECTOR2I( endpoint.x, 0 ); // right point
|
||||
ptTest[3] = VECTOR2I( -endpoint.x, 0 ); // left point
|
||||
ptTest[0] = VECTOR2I( 0, itemBB.GetBottom() );
|
||||
ptTest[1] = VECTOR2I( 0, itemBB.GetTop() );
|
||||
ptTest[2] = VECTOR2I( itemBB.GetRight(), 0 );
|
||||
ptTest[3] = VECTOR2I( itemBB.GetLeft(), 0 );
|
||||
|
||||
auto addStub = [&] ( int aSide ) {
|
||||
SHAPE_LINE_CHAIN spokes;
|
||||
|
@ -981,29 +976,29 @@ void ZONE_FILLER::buildThermalSpokes( SHAPE_POLY_SET& aCornerBuffer,
|
|||
switch( aSide )
|
||||
{
|
||||
case 0: // lower stub
|
||||
spokes.Append( -spokeThickness, endpoint.y );
|
||||
spokes.Append( +spokeThickness, endpoint.y );
|
||||
spokes.Append( -spokeThickness, itemBB.GetBottom() );
|
||||
spokes.Append( +spokeThickness, itemBB.GetBottom() );
|
||||
spokes.Append( +spokeThickness, 0 );
|
||||
spokes.Append( -spokeThickness, 0 );
|
||||
break;
|
||||
|
||||
case 1: // upper stub
|
||||
spokes.Append( -spokeThickness, -endpoint.y );
|
||||
spokes.Append( +spokeThickness, -endpoint.y );
|
||||
spokes.Append( -spokeThickness, itemBB.GetTop() );
|
||||
spokes.Append( +spokeThickness, itemBB.GetTop() );
|
||||
spokes.Append( +spokeThickness, 0 );
|
||||
spokes.Append( -spokeThickness, 0 );
|
||||
break;
|
||||
|
||||
case 2: // right stub
|
||||
spokes.Append( endpoint.x, -spokeThickness );
|
||||
spokes.Append( endpoint.x, spokeThickness );
|
||||
spokes.Append( itemBB.GetRight(), -spokeThickness );
|
||||
spokes.Append( itemBB.GetRight(), spokeThickness );
|
||||
spokes.Append( 0, spokeThickness );
|
||||
spokes.Append( 0, -spokeThickness );
|
||||
break;
|
||||
|
||||
case 3: // left stub
|
||||
spokes.Append( -endpoint.x, -spokeThickness );
|
||||
spokes.Append( -endpoint.x, spokeThickness );
|
||||
spokes.Append( itemBB.GetLeft(), -spokeThickness );
|
||||
spokes.Append( itemBB.GetLeft(), spokeThickness );
|
||||
spokes.Append( 0, spokeThickness );
|
||||
spokes.Append( 0, -spokeThickness );
|
||||
break;
|
||||
|
@ -1015,8 +1010,8 @@ void ZONE_FILLER::buildThermalSpokes( SHAPE_POLY_SET& aCornerBuffer,
|
|||
for( int ic = 0; ic < spokes.PointCount(); ic++ )
|
||||
{
|
||||
auto cpos = spokes.CPoint( ic );
|
||||
RotatePoint( cpos, fAngle ); // Rotate according to module orientation
|
||||
cpos += pad->ShapePos(); // Shift origin to position
|
||||
RotatePoint( cpos, fAngle );
|
||||
cpos += pad->ShapePos();
|
||||
aCornerBuffer.Append( cpos );
|
||||
}
|
||||
};
|
||||
|
@ -1025,10 +1020,7 @@ void ZONE_FILLER::buildThermalSpokes( SHAPE_POLY_SET& aCornerBuffer,
|
|||
{
|
||||
if( aDanglingOnly )
|
||||
{
|
||||
// rotate point
|
||||
RotatePoint( ptTest[i], fAngle );
|
||||
|
||||
// translate point
|
||||
ptTest[i] += pad->ShapePos();
|
||||
|
||||
if( aRawFilledArea.Contains( ptTest[i] ) )
|
||||
|
|
Loading…
Reference in New Issue