]> OCCT Git - occt-copy.git/commitdiff
Fix of regression in Extrema, improvement in 3D offset. CR0-ww-depot
authorjgv <jgv@opencascade.com>
Wed, 14 Oct 2020 08:54:11 +0000 (11:54 +0300)
committerjgv <jgv@opencascade.com>
Wed, 14 Oct 2020 08:54:11 +0000 (11:54 +0300)
src/BRepOffset/BRepOffset_Tool.cxx
src/Extrema/Extrema_GenExtCC.gxx

index 85519790a8b454567260f91a73fbbc1645cf288f..3768ac2fa4dd5231fcf9b88af047fc849fd16d93 100644 (file)
@@ -3127,12 +3127,23 @@ Standard_Boolean BRepOffset_Tool::EnLargeFace
   }
   else
   {
-    Standard_Real FaceDU = UF2 - UF1;
-    Standard_Real FaceDV = VF2 - VF1;
-    UU1 = UF1 - 10*FaceDU;
-    UU2 = UF2 + 10*FaceDU;
-    VV1 = VF1 - 10*FaceDV;
-    VV2 = VF2 + 10*FaceDV;
+    if (theExtensionMode == 2)
+    {
+      Standard_Real FaceDU = UF2 - UF1;
+      Standard_Real FaceDV = VF2 - VF1;
+      UU1 = UF1 - 10*FaceDU;
+      UU2 = UF2 + 10*FaceDU;
+      VV1 = VF1 - 10*FaceDV;
+      VV2 = VF2 + 10*FaceDV;
+    }
+    else
+    {
+      Standard_Real aSize = theLenBeforeUfirst;
+      UU1 = UF1 - aSize;
+      UU2 = UF2 + aSize;
+      VV1 = VF1 - aSize;
+      VV2 = VF2 + aSize;
+    }
     coeff = 1.;
   }
   
index 2c7767eca26b01379d69e42e0c0dd73724e12601..969a5b85aeac7003f2b0225515eb379482c8eac0 100644 (file)
@@ -658,11 +658,6 @@ void Extrema_GenExtCC::Points(const Standard_Integer N,
                               POnC& P1,
                               POnC& P2) const
 {
-  if (IsParallel())
-  {
-    throw StdFail_InfiniteSolutions();
-  }
-
   if (N < 1 || N > NbExt())
   {
     throw Standard_OutOfRange();