diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index f1ca6a39a3..d87c722d0a 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -242,10 +242,10 @@ bool BOARD_ADAPTER::IsFootprintShown( FOOTPRINT_ATTR_T aFPAttributes ) const // !TODO: define the actual copper thickness by user from board stackup #define COPPER_THICKNESS Millimeter2iu( 0.035 ) // for 35 um // 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 // 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 { diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp index 8bf7daecb3..902f7d0a0a 100644 --- a/3d-viewer/3d_canvas/create_layer_items.cpp +++ b/3d-viewer/3d_canvas/create_layer_items.cpp @@ -269,7 +269,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) const VIA* via = static_cast( track ); const VIATYPE viatype = via->GetViaType(); 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 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 const int inflate = ( pad->GetAttribute () != PAD_ATTRIB_NPTH ) ? - GetHolePlatingThickness() : 0; + GetHolePlatingThickness() / 2 : 0; m_holeCount++; m_averageHoleDiameter += ( ( pad->GetDrillSize().x + diff --git a/3d-viewer/3d_rendering/legacy/create_scene.cpp b/3d-viewer/3d_rendering/legacy/create_scene.cpp index 90639b9392..642cc75c29 100644 --- a/3d-viewer/3d_rendering/legacy/create_scene.cpp +++ b/3d-viewer/3d_rendering/legacy/create_scene.cpp @@ -721,6 +721,9 @@ void RENDER_3D_LEGACY::generateCylinder( const SFVEC2F& aCenter, float aInnerRad void RENDER_3D_LEGACY::generateViasAndPads() { + const int platingThickness = m_boardAdapter.GetHolePlatingThickness(); + const float platingThickness3d = platingThickness * m_boardAdapter.BiuTo3dUnits(); + if( m_boardAdapter.GetViaCount() > 0 ) { const unsigned int reserve_nr_triangles_estimation = @@ -741,7 +744,6 @@ void RENDER_3D_LEGACY::generateViasAndPads() const VIA* via = static_cast( track ); const float holediameter = via->GetDrillValue() * m_boardAdapter.BiuTo3dUnits(); - const float thickness = m_boardAdapter.GetCopperThickness(); const int nrSegments = m_boardAdapter.GetCircleSegmentCount( via->GetDrillValue() ); const float hole_inner_radius = holediameter / 2.0f; @@ -758,7 +760,8 @@ void RENDER_3D_LEGACY::generateViasAndPads() 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 ); } } @@ -790,13 +793,11 @@ void RENDER_3D_LEGACY::generateViasAndPads() if( !hasHole ) continue; - const int copperThickness = m_boardAdapter.GetHolePlatingThickness(); - pad->TransformHoleWithClearanceToPolygon( tht_outer_holes_poly, - copperThickness, - ARC_LOW_DEF, ERROR_INSIDE ); + platingThickness, + ARC_HIGH_DEF, ERROR_INSIDE ); pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly, 0, - ARC_LOW_DEF, ERROR_INSIDE ); + ARC_HIGH_DEF, ERROR_INSIDE ); } } }