mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023822: SIGSEGV 'segmentation violation' during writing IGES
checking for infinity coordinates was added. Adding test case for this fix Shape name correction
This commit is contained in:
parent
a1cd0db66f
commit
6db6171400
@ -170,14 +170,16 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape)
|
|||||||
//#34 22.10.98 rln BUC60081
|
//#34 22.10.98 rln BUC60081
|
||||||
Bnd_Box box;
|
Bnd_Box box;
|
||||||
BRepBndLib::Add (Shape, box);
|
BRepBndLib::Add (Shape, box);
|
||||||
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
|
if (!(box.IsVoid() || box.IsOpenXmax() || box.IsOpenYmax() || box.IsOpenZmax() || box.IsOpenXmin() || box.IsOpenYmin() || box.IsOpenZmin())){
|
||||||
box.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
|
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
|
||||||
gs.MaxMaxCoords (gp_XYZ (aXmax / gs.UnitValue(),
|
box.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
|
||||||
aYmax / gs.UnitValue(),
|
gs.MaxMaxCoords (gp_XYZ (aXmax / gs.UnitValue(),
|
||||||
aZmax / gs.UnitValue()));
|
aYmax / gs.UnitValue(),
|
||||||
gs.MaxMaxCoords (gp_XYZ (aXmin / gs.UnitValue(),
|
aZmax / gs.UnitValue()));
|
||||||
aYmin / gs.UnitValue(),
|
gs.MaxMaxCoords (gp_XYZ (aXmin / gs.UnitValue(),
|
||||||
aZmin / gs.UnitValue()));
|
aYmin / gs.UnitValue(),
|
||||||
|
aZmin / gs.UnitValue()));
|
||||||
|
}
|
||||||
|
|
||||||
themod->SetGlobalSection(gs);
|
themod->SetGlobalSection(gs);
|
||||||
|
|
||||||
|
14
tests/bugs/iges/bug23822
Executable file
14
tests/bugs/iges/bug23822
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "CR23822"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
#########################################################
|
||||||
|
## SIGSEGV 'segmentation violation' during writing IGES
|
||||||
|
#########################################################
|
||||||
|
|
||||||
|
ReadIges D [locate_data_file ball_bearing.igs]
|
||||||
|
|
||||||
|
set aFile ${imagedir}/bug23822_new_file.igs
|
||||||
|
file delete -force ${aFile}
|
||||||
|
|
||||||
|
WriteIges D ${aFile}
|
Loading…
x
Reference in New Issue
Block a user