From 83e9d87cde3c393cc8290f4b59e8b5294f62a887 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Thu, 24 Aug 2023 14:26:27 +0300 Subject: [PATCH] STEP export: fix hole cutting counter message. --- pcbnew/exporters/step/step_pcb_model.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pcbnew/exporters/step/step_pcb_model.cpp b/pcbnew/exporters/step/step_pcb_model.cpp index 11f5a45b66..947256e44b 100644 --- a/pcbnew/exporters/step/step_pcb_model.cpp +++ b/pcbnew/exporters/step/step_pcb_model.cpp @@ -795,9 +795,6 @@ bool STEP_PCB_MODEL::CreatePCB( SHAPE_POLY_SET& aOutline, VECTOR2D aOrigin ) const TColStd_ListOfInteger& indices = bsb.Compare( shapeBbox ); - if( indices.IsEmpty() ) - continue; - TopTools_ListOfShape holelist; for( const Standard_Integer& index : indices ) @@ -812,16 +809,19 @@ bool STEP_PCB_MODEL::CreatePCB( SHAPE_POLY_SET& aOutline, VECTOR2D aOrigin ) ReportMessage( wxString::Format( _( "Cutting %d/%d %s\n" ), cnt, (int) aShapesList.size(), aWhat ) ); - TopTools_ListOfShape mainbrd; - mainbrd.Append( shape ); + if( holelist.IsEmpty() ) + continue; - BRepAlgoAPI_Cut Cut; - Cut.SetArguments( mainbrd ); + TopTools_ListOfShape cutArgs; + cutArgs.Append( shape ); - Cut.SetTools( holelist ); - Cut.Build(); + BRepAlgoAPI_Cut cut; + cut.SetArguments( cutArgs ); - shape = Cut.Shape(); + cut.SetTools( holelist ); + cut.Build(); + + shape = cut.Shape(); } };