0024016: Test case bugs moddata_2 bug324 works not correct after integration of the...
authoremv <emv@opencascade.com>
Thu, 6 Jun 2013 08:16:38 +0000 (12:16 +0400)
committeremv <emv@opencascade.com>
Thu, 13 Jun 2013 11:06:46 +0000 (15:06 +0400)
Do not perform the check for the height of the cylinder (see issue 0023985) for infinite cylinders.

src/IntPatch/IntPatch_ImpImpIntersection_2.gxx

index ecf851f..3984ca5 100755 (executable)
@@ -101,7 +101,12 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
       case GeomAbs_Cylinder:
        {
          quad2.SetValue(S2->Cylinder());
-          Standard_Real H = S1->LastVParameter() - S1->FirstVParameter();
+          Standard_Real VMin, VMax, H;
+          //
+          VMin = S1->FirstVParameter();
+          VMax = S1->LastVParameter();
+          H = (Precision::IsNegativeInfinite(VMin) || 
+               Precision::IsPositiveInfinite(VMax)) ? 0 : (VMax - VMin);
          if (!IntPCy(quad1,quad2,Tolang,TolTang,Standard_False,empt,slin,H)) {
            return;
          }
@@ -158,7 +163,12 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
       case GeomAbs_Plane:
        {
          quad2.SetValue(S2->Plane());
-          Standard_Real H = S1->LastVParameter() - S1->FirstVParameter();
+          Standard_Real VMin, VMax, H;
+          //
+          VMin = S1->FirstVParameter();
+          VMax = S1->LastVParameter();
+          H = (Precision::IsNegativeInfinite(VMin) || 
+               Precision::IsPositiveInfinite(VMax)) ? 0 : (VMax - VMin);
          if (!IntPCy(quad1,quad2,Tolang,TolTang,Standard_True,empt,slin,H)) {
            return;
          }