3D viewer: Fix gap between plating and annulus copper
Hide transition by ending layer copper withing the annulus of the cylinder. Also always use hole wall thickness and set more realistic solder mask thickness
This commit is contained in:
parent
ba3f0d5d07
commit
e0f69ad28b
|
@ -242,10 +242,10 @@ bool BOARD_ADAPTER::IsFootprintShown( FOOTPRINT_ATTR_T aFPAttributes ) const
|
||||||
// !TODO: define the actual copper thickness by user from board stackup
|
// !TODO: define the actual copper thickness by user from board stackup
|
||||||
#define COPPER_THICKNESS Millimeter2iu( 0.035 ) // for 35 um
|
#define COPPER_THICKNESS Millimeter2iu( 0.035 ) // for 35 um
|
||||||
// The solder mask layer (and silkscreen) thickness
|
// The solder mask layer (and silkscreen) thickness
|
||||||
#define TECH_LAYER_THICKNESS Millimeter2iu( 0.04 )
|
#define TECH_LAYER_THICKNESS Millimeter2iu( 0.025 )
|
||||||
// The solder paste thickness is chosen bigger than the solder mask layer
|
// The solder paste thickness is chosen bigger than the solder mask layer
|
||||||
// to be sure is covers the mask when overlapping.
|
// to be sure is covers the mask when overlapping.
|
||||||
#define SOLDERPASTE_LAYER_THICKNESS Millimeter2iu( 0.08 )
|
#define SOLDERPASTE_LAYER_THICKNESS Millimeter2iu( 0.04 )
|
||||||
|
|
||||||
int BOARD_ADAPTER::GetHolePlatingThickness() const noexcept
|
int BOARD_ADAPTER::GetHolePlatingThickness() const noexcept
|
||||||
{
|
{
|
||||||
|
|
|
@ -269,7 +269,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
||||||
const VIA* via = static_cast<const VIA*>( track );
|
const VIA* via = static_cast<const VIA*>( track );
|
||||||
const VIATYPE viatype = via->GetViaType();
|
const VIATYPE viatype = via->GetViaType();
|
||||||
const float holediameter = via->GetDrillValue() * BiuTo3dUnits();
|
const float holediameter = via->GetDrillValue() * BiuTo3dUnits();
|
||||||
const float thickness = GetCopperThickness();
|
|
||||||
|
// holes and layer copper extend half info cylinder wall to hide transition
|
||||||
|
const float thickness = GetHolePlatingThickness() * BiuTo3dUnits() / 2.0f;
|
||||||
const float hole_inner_radius = ( holediameter / 2.0f );
|
const float hole_inner_radius = ( holediameter / 2.0f );
|
||||||
const float ring_radius = via->GetWidth() * BiuTo3dUnits() / 2.0f;
|
const float ring_radius = via->GetWidth() * BiuTo3dUnits() / 2.0f;
|
||||||
|
|
||||||
|
@ -456,7 +458,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
|
||||||
|
|
||||||
// The hole in the body is inflated by copper thickness, if not plated, no copper
|
// The hole in the body is inflated by copper thickness, if not plated, no copper
|
||||||
const int inflate = ( pad->GetAttribute () != PAD_ATTRIB_NPTH ) ?
|
const int inflate = ( pad->GetAttribute () != PAD_ATTRIB_NPTH ) ?
|
||||||
GetHolePlatingThickness() : 0;
|
GetHolePlatingThickness() / 2 : 0;
|
||||||
|
|
||||||
m_holeCount++;
|
m_holeCount++;
|
||||||
m_averageHoleDiameter += ( ( pad->GetDrillSize().x +
|
m_averageHoleDiameter += ( ( pad->GetDrillSize().x +
|
||||||
|
|
|
@ -721,6 +721,9 @@ void RENDER_3D_LEGACY::generateCylinder( const SFVEC2F& aCenter, float aInnerRad
|
||||||
|
|
||||||
void RENDER_3D_LEGACY::generateViasAndPads()
|
void RENDER_3D_LEGACY::generateViasAndPads()
|
||||||
{
|
{
|
||||||
|
const int platingThickness = m_boardAdapter.GetHolePlatingThickness();
|
||||||
|
const float platingThickness3d = platingThickness * m_boardAdapter.BiuTo3dUnits();
|
||||||
|
|
||||||
if( m_boardAdapter.GetViaCount() > 0 )
|
if( m_boardAdapter.GetViaCount() > 0 )
|
||||||
{
|
{
|
||||||
const unsigned int reserve_nr_triangles_estimation =
|
const unsigned int reserve_nr_triangles_estimation =
|
||||||
|
@ -741,7 +744,6 @@ void RENDER_3D_LEGACY::generateViasAndPads()
|
||||||
const VIA* via = static_cast<const VIA*>( track );
|
const VIA* via = static_cast<const VIA*>( track );
|
||||||
|
|
||||||
const float holediameter = via->GetDrillValue() * m_boardAdapter.BiuTo3dUnits();
|
const float holediameter = via->GetDrillValue() * m_boardAdapter.BiuTo3dUnits();
|
||||||
const float thickness = m_boardAdapter.GetCopperThickness();
|
|
||||||
const int nrSegments = m_boardAdapter.GetCircleSegmentCount( via->GetDrillValue() );
|
const int nrSegments = m_boardAdapter.GetCircleSegmentCount( via->GetDrillValue() );
|
||||||
const float hole_inner_radius = holediameter / 2.0f;
|
const float hole_inner_radius = holediameter / 2.0f;
|
||||||
|
|
||||||
|
@ -758,7 +760,8 @@ void RENDER_3D_LEGACY::generateViasAndPads()
|
||||||
|
|
||||||
wxASSERT( zbot < ztop );
|
wxASSERT( zbot < ztop );
|
||||||
|
|
||||||
generateCylinder( via_center, hole_inner_radius, hole_inner_radius + thickness,
|
generateCylinder( via_center, hole_inner_radius,
|
||||||
|
hole_inner_radius + platingThickness3d,
|
||||||
ztop, zbot, nrSegments, layerTriangleVIA );
|
ztop, zbot, nrSegments, layerTriangleVIA );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -790,13 +793,11 @@ void RENDER_3D_LEGACY::generateViasAndPads()
|
||||||
if( !hasHole )
|
if( !hasHole )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const int copperThickness = m_boardAdapter.GetHolePlatingThickness();
|
|
||||||
|
|
||||||
pad->TransformHoleWithClearanceToPolygon( tht_outer_holes_poly,
|
pad->TransformHoleWithClearanceToPolygon( tht_outer_holes_poly,
|
||||||
copperThickness,
|
platingThickness,
|
||||||
ARC_LOW_DEF, ERROR_INSIDE );
|
ARC_HIGH_DEF, ERROR_INSIDE );
|
||||||
pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly, 0,
|
pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly, 0,
|
||||||
ARC_LOW_DEF, ERROR_INSIDE );
|
ARC_HIGH_DEF, ERROR_INSIDE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue