From 248622f8cb05fd7fc32eaa3012b237aa7bb4a7a4 Mon Sep 17 00:00:00 2001 From: jgv Date: Tue, 10 Apr 2012 17:43:01 +0400 Subject: [PATCH] 0023092: Error in BRepProj_Projection algorithm: some edges of resulting projected wire are duplicated --- src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx | 24 ++++++----------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx index d13569d823..8fe70b64da 100755 --- a/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx @@ -37,9 +37,12 @@ Standard_EXPORT void FTOL_FaceTolerances Standard_Real& myTol1, Standard_Real& myTol2, Standard_Real& Deflection, Standard_Real& MaxUV) { - // ============================================================ - // == t o l e r a n c e s d I n t e r s e c t i o n == - // ============================================================ + Standard_Real aTolF1 = BRep_Tool::Tolerance(myFace1); + Standard_Real aTolF2 = BRep_Tool::Tolerance(myFace2); + // + myTol1 = aTolF1 + aTolF2; + myTol2 = myTol1; + Standard_Real x0,y0,z0,x1,y1,z1,dx,dy,dz; Standard_Boolean Box1OK,Box2OK; @@ -110,19 +113,13 @@ Standard_EXPORT void FTOL_FaceTolerances //jmb le 30 juillet 99. on ne multiplie pas la tolerance par la dimension de la piece // Standard_Real tolbox = tolef*dx; Standard_Real tolbox = tolef; - myTol1 = tolbox; - myTol2 = tolbox; Standard_Real tolmin = Precision::Confusion(); - if (tolmin>myTol1) myTol1 = tolmin; - if (tolmin>myTol2) myTol2 = tolmin; Deflection=0.01; MaxUV=0.01; Deflection*=dx; - Standard_Real MTOL1 = Max(myTol1,1e-8); - Standard_Real MTOL2 = Max(myTol2,1e-8); Standard_Real MDEFLECTION = Deflection; Standard_Real MMAXUV=0.01; @@ -153,15 +150,9 @@ Standard_EXPORT void FTOL_FaceTolerances // printf("\n FaceTolerances3d : TOL1 = %5.5eg TOL2=%5.5eg DEFL=%5.5eg MAXUV=%5.5eg\n",MTOL1,MTOL2,MDEFLECTION,0.01); #endif - if(MTOL1>1e-4*dx) MTOL1=1e-4*dx; - if(MTOL2>1e-4*dx) MTOL2=1e-4*dx; - if(MTOL1<1e-8) MTOL1=1e-8; - if(MTOL2<1e-8) MTOL2=1e-8; if(MMAXUV<1e-3) MMAXUV=1e-3; if(MDEFLECTION<1e-3) MDEFLECTION = 1e-3; - if(MTOL1>0.5) MTOL1=0.5; - if(MTOL2>0.5) MTOL2=0.5; if(MMAXUV>0.01) MMAXUV=0.01; if(MDEFLECTION>0.1) MDEFLECTION = 0.1; @@ -169,11 +160,8 @@ Standard_EXPORT void FTOL_FaceTolerances // printf("TOL1 = %5.5eg TOL2=%5.5eg DEFL=%5.5eg MAXUV=%5.5eg\n",MTOL1,MTOL2,MDEFLECTION,MMAXUV); #endif - myTol1 = MTOL1; - myTol2 = MTOL2; Deflection = MDEFLECTION; MaxUV = MMAXUV; - } // FTOL_FaceTolerances Standard_EXPORT void FTOL_FaceTolerances3d