]> OCCT Git - occt.git/commitdiff
0033369: Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after...
authoranv <anv@opencascade.com>
Fri, 28 Apr 2023 03:26:11 +0000 (04:26 +0100)
committervglukhik <vglukhik@opencascade.com>
Wed, 17 May 2023 20:45:13 +0000 (21:45 +0100)
Added check to avoid setting parametric boundaries to infinity.

src/BRepTools/BRepTools_TrsfModification.cxx
tests/bugs/modalg_7/bug33369 [new file with mode: 0644]

index 238afe6970cd29f55b396c7a14ea563a6c3245a0..c8252f6caf3da4dde3b02e738e7dd5cc08a5ec5e 100644 (file)
@@ -394,11 +394,11 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d
     if(l - lc > Precision::PConfusion()) l = lc;
     if(Abs(l - f) < Precision::PConfusion())
     {
-      if(Abs(f - fc) < Precision::PConfusion())
+      if(Abs(f - fc) < Precision::PConfusion() && !Precision::IsInfinite(lc))
       {
         l = lc;
       }
-      else
+      else if (!Precision::IsInfinite(fc))
       {
         f = fc;
       }
diff --git a/tests/bugs/modalg_7/bug33369 b/tests/bugs/modalg_7/bug33369
new file mode 100644 (file)
index 0000000..ab98074
--- /dev/null
@@ -0,0 +1,11 @@
+puts "======================================================="
+puts "0033369: OCCT:Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after transformation"
+puts "======================================================="
+puts ""
+
+restore [locate_data_file bug33369.brep] f
+
+ttranslate f 1 1 1 -copy
+
+checkshape f
+