This commit is contained in:
Jeff Young 2022-07-30 11:32:12 +01:00
parent 6f49b57f9b
commit 19b00b5d57
3 changed files with 16 additions and 11 deletions

View File

@ -613,8 +613,9 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU, *aOwner ) ); aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU, *aOwner ) );
else else
aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU, *aOwner ) ); aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU, *aOwner ) );
}
break; break;
}
case SHAPE_T::RECT: case SHAPE_T::RECT:
if( aShape->IsFilled() ) if( aShape->IsFilled() )

View File

@ -183,7 +183,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
m_averageViaHoleDiameter /= (float)m_viaCount; m_averageViaHoleDiameter /= (float)m_viaCount;
// Prepare copper layers index and containers // Prepare copper layers index and containers
std::vector< PCB_LAYER_ID > layer_id; std::vector<PCB_LAYER_ID> layer_id;
layer_id.clear(); layer_id.clear();
layer_id.reserve( m_copperLayersCount ); layer_id.reserve( m_copperLayersCount );
@ -308,8 +308,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{ {
// Add through hole object // Add through hole object
m_throughHoleOds.Add( new FILLED_CIRCLE_2D( via_center, m_throughHoleOds.Add( new FILLED_CIRCLE_2D( via_center,
hole_inner_radius + thickness, hole_inner_radius + thickness,
*track ) ); *track ) );
m_throughHoleViaOds.Add( new FILLED_CIRCLE_2D( via_center, m_throughHoleViaOds.Add( new FILLED_CIRCLE_2D( via_center,
hole_inner_radius + thickness, hole_inner_radius + thickness,
*track ) ); *track ) );
@ -879,7 +879,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// Vertical walls (layer thickness) around shapes is really time consumming // Vertical walls (layer thickness) around shapes is really time consumming
// They are built on request // They are built on request
bool buildVerticalWallsForTechLayers = m_Cfg->m_Render.opengl_copper_thickness bool buildVerticalWallsForTechLayers = m_Cfg->m_Render.opengl_copper_thickness
&& m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL; && m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL;
static const PCB_LAYER_ID teckLayerList[] = { static const PCB_LAYER_ID teckLayerList[] = {
B_Adhes, B_Adhes,
@ -911,8 +911,10 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
continue; continue;
if( aStatusReporter ) if( aStatusReporter )
aStatusReporter->Report( wxString::Format( {
_( "Build Tech layer %d" ), (int)curr_layer_id ) ); aStatusReporter->Report( wxString::Format( _( "Build Tech layer %d" ),
(int) curr_layer_id ) );
}
BVH_CONTAINER_2D *layerContainer = new BVH_CONTAINER_2D; BVH_CONTAINER_2D *layerContainer = new BVH_CONTAINER_2D;
m_layerMap[curr_layer_id] = layerContainer; m_layerMap[curr_layer_id] = layerContainer;

View File

@ -34,13 +34,16 @@
#include <footprint.h> #include <footprint.h>
/*
* This is used to draw pad outlines on silk layers.
*/
void BOARD_ADAPTER::buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& aCornerBuffer, void BOARD_ADAPTER::buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& aCornerBuffer,
int aWidth ) const int aWidth ) const
{ {
if( aPad->GetShape() == PAD_SHAPE::CIRCLE ) // Draw a ring if( aPad->GetShape() == PAD_SHAPE::CIRCLE ) // Draw a ring
{ {
TransformRingToPolygon( aCornerBuffer, aPad->ShapePos(), aPad->GetSize().x / 2, TransformRingToPolygon( aCornerBuffer, aPad->ShapePos(), aPad->GetSize().x / 2, aWidth,
aWidth, ARC_HIGH_DEF, ERROR_INSIDE ); ARC_HIGH_DEF, ERROR_INSIDE );
return; return;
} }
@ -53,8 +56,7 @@ void BOARD_ADAPTER::buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& a
const VECTOR2I& a = path.CPoint( ii ); const VECTOR2I& a = path.CPoint( ii );
const VECTOR2I& b = path.CPoint( ii + 1 ); const VECTOR2I& b = path.CPoint( ii + 1 );
TransformOvalToPolygon( aCornerBuffer, a, b, aWidth, ARC_HIGH_DEF, TransformOvalToPolygon( aCornerBuffer, a, b, aWidth, ARC_HIGH_DEF, ERROR_INSIDE );
ERROR_INSIDE );
} }
} }