STEP export: add location info to edge add failures.

(cherry picked from commit 800ff9ffb1)
This commit is contained in:
Alex Shvartzkop 2024-03-19 23:10:37 +03:00
parent 3a5a911012
commit 350687f355
1 changed files with 11 additions and 3 deletions

View File

@ -705,7 +705,9 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector<TopoDS_Shape>& aShapes, const SHAPE
if( !mkEdge.IsDone() || mkEdge.Edge().IsNull() ) if( !mkEdge.IsDone() || mkEdge.Edge().IsNull() )
{ {
ReportMessage( wxT( "failed to make edge, skipping\n" ) ); ReportMessage( wxString::Format( wxT( "failed to make segment edge at (%d "
"%d) -> (%d %d), skipping\n" ),
aPt0.x, aPt0.y, aPt1.x, aPt1.y ) );
} }
else else
{ {
@ -713,7 +715,9 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector<TopoDS_Shape>& aShapes, const SHAPE
if( aMkWire.Error() != BRepLib_WireDone ) if( aMkWire.Error() != BRepLib_WireDone )
{ {
ReportMessage( wxT( "failed to add edge to wire\n" ) ); ReportMessage( wxString::Format( wxT( "failed to add segment edge "
"at (%d %d) -> (%d %d)\n" ),
aPt0.x, aPt0.y, aPt1.x, aPt1.y ) );
return false; return false;
} }
} }
@ -749,7 +753,11 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector<TopoDS_Shape>& aShapes, const SHAPE
if( !aMkWire.IsDone() ) if( !aMkWire.IsDone() )
{ {
ReportMessage( wxT( "failed to add curve\n" ) ); ReportMessage( wxString::Format(
wxT( "failed to add arc curve from (%d %d), arc p0 "
"(%d %d), mid (%d %d), p1 (%d %d)\n" ),
aPt0.x, aPt0.y, aArc.GetP0().x, aArc.GetP0().y, aArc.GetArcMid().x,
aArc.GetArcMid().y, aArc.GetP1().x, aArc.GetP1().y ) );
return false; return false;
} }