mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0029108: Crash writing STEP file
* Wrapped a try / catch block on creating objects in TopoDSToStep_MakeStepFace::Init()
This commit is contained in:
parent
2b7fd8c81c
commit
7a88ce5b98
@ -180,6 +180,8 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
// -----------------
|
// -----------------
|
||||||
// Translate Surface
|
// Translate Surface
|
||||||
// -----------------
|
// -----------------
|
||||||
@ -465,6 +467,13 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
|
|||||||
myError = TopoDSToStep_NoWireMapped;
|
myError = TopoDSToStep_NoWireMapped;
|
||||||
done = Standard_False;
|
done = Standard_False;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure const& theFailure)
|
||||||
|
{
|
||||||
|
FP->AddFail(errShape, theFailure.GetMessageString());
|
||||||
|
myError = TopoDSToStep_FaceOther;
|
||||||
|
done = Standard_False;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
15
tests/bugs/step/bug29108
Normal file
15
tests/bugs/step/bug29108
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
puts "=========="
|
||||||
|
puts "0029108: Data Exchange - Crash writing STEP file"
|
||||||
|
puts "=========="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug29108.brep] part
|
||||||
|
stepwrite a part $imagedir/bug229108_temp.stp
|
||||||
|
dall
|
||||||
|
stepread ${imagedir}/bug229108_temp.stp a *
|
||||||
|
|
||||||
|
tpcompound result
|
||||||
|
checkprops result -s 11833
|
||||||
|
checkshape result
|
||||||
|
checknbshapes result -vertex 251 -edge 380 -wire 155 -face 141 -shell 3 -solid 2 -compsolid 0 -compound 4 -shape 936
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user