STEP export: don't return non-zero error code on non-fatal errors.
This commit is contained in:
@@ -108,7 +108,7 @@ private:
|
||||
case Message_Trace: return RPT_SEVERITY_DEBUG;
|
||||
case Message_Info: return RPT_SEVERITY_DEBUG;
|
||||
case Message_Warning: return RPT_SEVERITY_WARNING;
|
||||
case Message_Alarm: return RPT_SEVERITY_ERROR;
|
||||
case Message_Alarm: return RPT_SEVERITY_WARNING;
|
||||
case Message_Fail: return RPT_SEVERITY_ERROR;
|
||||
|
||||
// There are no other values, but gcc doesn't appear to be able to work that out.
|
||||
@@ -377,7 +377,7 @@ bool EXPORTER_STEP::buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOri
|
||||
"File not found: %s\n" ),
|
||||
aFootprint->GetReference(),
|
||||
mname ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
RPT_SEVERITY_WARNING );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ bool EXPORTER_STEP::buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOri
|
||||
"OpenCASCADE error: %s\n" ),
|
||||
aFootprint->GetReference(),
|
||||
e.GetMessageString() ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
RPT_SEVERITY_WARNING );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1731,12 +1731,13 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector<TopoDS_Shape>& aShapes, const SHAPE
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reporter->Report( wxString::Format( _( "Wire not done (contour points %d): OCC error %d\n"
|
||||
"z: %g; bounding box: %s" ),
|
||||
static_cast<int>( aContour.PointCount() ),
|
||||
static_cast<int>( mkWire.Error() ),
|
||||
formatBBox( aContour.BBox() ) ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
m_reporter->Report(
|
||||
wxString::Format( _( "Wire not done (contour points %d): OCC error %d\n"
|
||||
"z: %g; bounding box: %s" ),
|
||||
static_cast<int>( aContour.PointCount() ),
|
||||
static_cast<int>( mkWire.Error() ),
|
||||
formatBBox( aContour.BBox() ) ),
|
||||
RPT_SEVERITY_WARNING );
|
||||
}
|
||||
|
||||
if( !wire.IsNull() )
|
||||
@@ -1745,19 +1746,11 @@ bool STEP_PCB_MODEL::MakeShapes( std::vector<TopoDS_Shape>& aShapes, const SHAPE
|
||||
|
||||
if( !check.IsValid() )
|
||||
{
|
||||
if( aAllowRetry )
|
||||
{
|
||||
m_reporter->Report( _( "Wire self-interference check failed. Allow retry" ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reporter->Report( wxString::Format( _( "Wire self-interference check failed\n"
|
||||
"z: %g; bounding box: %s" ),
|
||||
aZposition,
|
||||
formatBBox( aContour.BBox() ) ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
}
|
||||
m_reporter->Report( wxString::Format( _( "Wire self-interference check failed\n"
|
||||
"z: %g; bounding box: %s" ),
|
||||
aZposition,
|
||||
formatBBox( aContour.BBox() ) ),
|
||||
RPT_SEVERITY_WARNING );
|
||||
|
||||
wire.Nullify();
|
||||
}
|
||||
@@ -2064,7 +2057,8 @@ bool STEP_PCB_MODEL::CreatePCB( SHAPE_POLY_SET& aOutline, VECTOR2D aOrigin, bool
|
||||
"%s net '%s' **" ),
|
||||
aWhat,
|
||||
UnescapeString( netname ) ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
RPT_SEVERITY_WARNING );
|
||||
|
||||
shapeBbox.Dump();
|
||||
|
||||
if( cut.HasErrors() )
|
||||
@@ -2074,7 +2068,7 @@ bool STEP_PCB_MODEL::CreatePCB( SHAPE_POLY_SET& aOutline, VECTOR2D aOrigin, bool
|
||||
wxStdOutputStream out( os_stream );
|
||||
|
||||
cut.DumpErrors( out );
|
||||
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||
m_reporter->Report( msg, RPT_SEVERITY_WARNING );
|
||||
}
|
||||
|
||||
if( cut.HasWarnings() )
|
||||
@@ -3190,13 +3184,13 @@ bool STEP_PCB_MODEL::performMeshing( Handle( XCAFDoc_ShapeTool ) & aShapeTool )
|
||||
|
||||
bool STEP_PCB_MODEL::WriteGLTF( const wxString& aFileName )
|
||||
{
|
||||
if( !isBoardOutlineValid() )
|
||||
/*if( !isBoardOutlineValid() )
|
||||
{
|
||||
m_reporter->Report( wxString::Format( _( "No valid PCB assembly; cannot create output file '%s'." ),
|
||||
aFileName ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
m_outFmt = OUTPUT_FORMAT::FMT_OUT_GLTF;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user