From: anv Date: Fri, 28 Apr 2023 03:26:11 +0000 (+0100) Subject: 0033369: Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR0-ts-fixes_750;p=occt.git 0033369: Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after transformation Added check to avoid setting parametric boundaries to infinity. --- diff --git a/src/BRepTools/BRepTools_TrsfModification.cxx b/src/BRepTools/BRepTools_TrsfModification.cxx index 6bc92499cd..c70a59f51c 100644 --- a/src/BRepTools/BRepTools_TrsfModification.cxx +++ b/src/BRepTools/BRepTools_TrsfModification.cxx @@ -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 index 0000000000..ab98074f81 --- /dev/null +++ b/tests/bugs/modalg_7/bug33369 @@ -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 +