mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -170,14 +170,16 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape)
|
||||
//#34 22.10.98 rln BUC60081
|
||||
Bnd_Box box;
|
||||
BRepBndLib::Add (Shape, box);
|
||||
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
|
||||
box.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
|
||||
gs.MaxMaxCoords (gp_XYZ (aXmax / gs.UnitValue(),
|
||||
aYmax / gs.UnitValue(),
|
||||
aZmax / gs.UnitValue()));
|
||||
gs.MaxMaxCoords (gp_XYZ (aXmin / gs.UnitValue(),
|
||||
aYmin / gs.UnitValue(),
|
||||
aZmin / gs.UnitValue()));
|
||||
if (!(box.IsVoid() || box.IsOpenXmax() || box.IsOpenYmax() || box.IsOpenZmax() || box.IsOpenXmin() || box.IsOpenYmin() || box.IsOpenZmin())){
|
||||
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
|
||||
box.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
|
||||
gs.MaxMaxCoords (gp_XYZ (aXmax / gs.UnitValue(),
|
||||
aYmax / gs.UnitValue(),
|
||||
aZmax / gs.UnitValue()));
|
||||
gs.MaxMaxCoords (gp_XYZ (aXmin / gs.UnitValue(),
|
||||
aYmin / gs.UnitValue(),
|
||||
aZmin / gs.UnitValue()));
|
||||
}
|
||||
|
||||
themod->SetGlobalSection(gs);
|
||||
|
||||
|
Reference in New Issue
Block a user