//#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);
--- /dev/null
+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}