Bug IPAL21615 Problem in VTK viewer when number of isos = 0

This commit is contained in:
dmv 2010-03-15 15:54:26 +00:00
parent 40782e018b
commit 7780c41f49

View File

@ -224,6 +224,7 @@ CreateIso(const TopoDS_Face& theFace,
Standard_Real confusion = Min(DeltaU, DeltaV) * HATHCER_CONFUSION_3D ; Standard_Real confusion = Min(DeltaU, DeltaV) * HATHCER_CONFUSION_3D ;
aHatcher.Confusion3d (confusion) ; aHatcher.Confusion3d (confusion) ;
if ( theNbIso[0] ) {
Standard_Real StepU = DeltaU / (Standard_Real)theNbIso[0]; Standard_Real StepU = DeltaU / (Standard_Real)theNbIso[0];
if(StepU > confusion){ if(StepU > confusion){
Standard_Real UPrm = anUMin + StepU / 2.; Standard_Real UPrm = anUMin + StepU / 2.;
@ -236,7 +237,9 @@ CreateIso(const TopoDS_Face& theFace,
UPrm += StepU ; UPrm += StepU ;
} }
} }
}
if ( theNbIso[1] ) {
Standard_Real StepV = DeltaV / (Standard_Real) theNbIso[1] ; Standard_Real StepV = DeltaV / (Standard_Real) theNbIso[1] ;
if(StepV > confusion){ if(StepV > confusion){
Standard_Real VPrm = aVMin + StepV / 2.; Standard_Real VPrm = aVMin + StepV / 2.;
@ -249,6 +252,7 @@ CreateIso(const TopoDS_Face& theFace,
VPrm += StepV ; VPrm += StepV ;
} }
} }
}
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// Computation. // Computation.