From: akaftasev Date: Thu, 18 Apr 2024 16:38:11 +0000 (+0100) Subject: 0033689: Canonical Recognition - Circle construction problem X-Git-Tag: V7_9_0_beta1~191 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5cf1003a66e4ec5f30c2e221b58ba7f90872e7ac;p=occt.git 0033689: Canonical Recognition - Circle construction problem Fixed problem with creating null-length gp_Dir --- diff --git a/src/gce/gce_MakeCirc.cxx b/src/gce/gce_MakeCirc.cxx index 18ecf6b2b1..0e7ffcda00 100644 --- a/src/gce/gce_MakeCirc.cxx +++ b/src/gce/gce_MakeCirc.cxx @@ -141,6 +141,13 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , dist2 = P2.Distance(pInt); dist3 = P3.Distance(pInt); pInt.Coord(x3,y3,z3); + if (dist1 < aResolution) + { + gp_Dir Dirx(1., 0., 0.); + gp_Dir Dirz(0., 0., 1.); + TheCirc = gp_Circ(gp_Ax2(pInt, Dirx, Dirz), 0.); + return; + } Dir1 = gp_Dir(x1-x3,y1-y3,z1-z3); //modified by NIZNHY-PKV Thu Mar 3 11:31:11 2005f //Dir2 = gp_Dir(x2-x3,y2-y3,z2-z3);