From: jgv Date: Thu, 21 Apr 2022 07:02:51 +0000 (+0300) Subject: 0032864: Modeling Algorithms - Normal projection of a wire on a cylinder produces... X-Git-Tag: V7_7_0_beta~119 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=51db8cab7b64c84b38b63983167e9b3bd720c7cb;p=occt.git 0032864: Modeling Algorithms - Normal projection of a wire on a cylinder produces wrong result Minor correction in method BRepAlgo_NormalProjection::Build: correct mixed up first and last parameters of the projected curve. --- diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index bd31fde08b..65bc1922e0 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -334,7 +334,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams() if(Only2d && Only3d) { BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()), - Ufin, Udeb); + Udeb, Ufin); prj = MKed.Edge(); BB.UpdateEdge(TopoDS::Edge(prj), PCur2d, diff --git a/tests/bugs/modalg_8/bug32864 b/tests/bugs/modalg_8/bug32864 new file mode 100644 index 0000000000..fd3afdb019 --- /dev/null +++ b/tests/bugs/modalg_8/bug32864 @@ -0,0 +1,21 @@ +puts "=========================================================================" +puts "OCC32864: Normal projection of a wire on a cylinder produces wrong result" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug32864.brep] a +explode a + +nproject result a_2 a_1 + +checkshape result + +checknbshapes result -t -edge 8 -vertex 16 + +set tolres [checkmaxtol result] + +if { ${tolres} > 0.0001} { + puts "Error: bad tolerance of result" +} + +checkprops result -l 37.1616