diff --git a/pcbnew/exporters/step/exporter_step.cpp b/pcbnew/exporters/step/exporter_step.cpp index 60aa608044..ff9ffac2bf 100644 --- a/pcbnew/exporters/step/exporter_step.cpp +++ b/pcbnew/exporters/step/exporter_step.cpp @@ -171,6 +171,9 @@ bool EXPORTER_STEP::buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOri SHAPE_POLY_SET holePoly; holeShape->TransformToPolygon( holePoly, maxError, ERROR_INSIDE ); + // This helps with fusing + holePoly.Deflate( m_platingThickness / 2, CORNER_STRATEGY::ROUND_ALL_CORNERS, maxError ); + for( PCB_LAYER_ID pcblayer : pad->GetLayerSet().Seq() ) { if( pad->IsOnLayer( pcblayer ) ) @@ -421,6 +424,9 @@ bool EXPORTER_STEP::buildTrack3DShape( PCB_TRACK* aTrack, VECTOR2D aOrigin ) SHAPE_POLY_SET holePoly; holeShape->TransformToPolygon( holePoly, maxError, ERROR_INSIDE ); + // This helps with fusing + holePoly.Deflate( m_platingThickness / 2, CORNER_STRATEGY::ROUND_ALL_CORNERS, maxError ); + LSET layers( via->GetLayerSet() & m_layersToExport ); PCB_LAYER_ID top_layer, bot_layer; diff --git a/pcbnew/exporters/step/step_pcb_model.cpp b/pcbnew/exporters/step/step_pcb_model.cpp index dae811c558..c0928d020d 100644 --- a/pcbnew/exporters/step/step_pcb_model.cpp +++ b/pcbnew/exporters/step/step_pcb_model.cpp @@ -785,6 +785,7 @@ STEP_PCB_MODEL::~STEP_PCB_MODEL() bool STEP_PCB_MODEL::AddPadShape( const PAD* aPad, const VECTOR2D& aOrigin, bool aVia ) { + const double c_padExtraThickness = 0.005; bool success = true; std::vector padShapes; @@ -806,9 +807,9 @@ bool STEP_PCB_MODEL::AddPadShape( const PAD* aPad, const VECTOR2D& aOrigin, bool { // Pad surface as a separate face for FEM simulations. if( pcb_layer == F_Cu ) - thickness += 0.005; + thickness += c_padExtraThickness; else if( pcb_layer == B_Cu ) - thickness -= 0.005; + thickness -= c_padExtraThickness; } TopoDS_Shape testShape; @@ -860,6 +861,14 @@ bool STEP_PCB_MODEL::AddPadShape( const PAD* aPad, const VECTOR2D& aOrigin, bool double b_pos, b_thickness; getLayerZPlacement( F_Cu, f_pos, f_thickness ); getLayerZPlacement( B_Cu, b_pos, b_thickness ); + + if( !aVia ) + { + // Pad surface is slightly thicker + f_thickness += c_padExtraThickness; + b_thickness -= c_padExtraThickness; + } + double top = std::max( f_pos, f_pos + f_thickness ); double bottom = std::min( b_pos, b_pos + b_thickness );