]> OCCT Git - occt.git/commitdiff
0033369: Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after... CR0-ts-fixes_750
authoranv <anv@opencascade.com>
Fri, 28 Apr 2023 03:26:11 +0000 (04:26 +0100)
committeranv <anv@opencascade.com>
Tue, 23 May 2023 20:59:44 +0000 (21:59 +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 6bc92499cd7d64ca2dae82aedb7ba34f69c2daf8..c70a59f51c0d15f9b7ebc8caca2d92b24385656f 100644 (file)
@@ -182,11 +182,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
+