mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0023092: Error in BRepProj_Projection algorithm: some edges of resulting projected wire are duplicated
This commit is contained in:
parent
7d9b843ce9
commit
248622f8cb
@ -37,9 +37,12 @@ Standard_EXPORT void FTOL_FaceTolerances
|
|||||||
Standard_Real& myTol1, Standard_Real& myTol2,
|
Standard_Real& myTol1, Standard_Real& myTol2,
|
||||||
Standard_Real& Deflection, Standard_Real& MaxUV)
|
Standard_Real& Deflection, Standard_Real& MaxUV)
|
||||||
{
|
{
|
||||||
// ============================================================
|
Standard_Real aTolF1 = BRep_Tool::Tolerance(myFace1);
|
||||||
// == 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 aTolF2 = BRep_Tool::Tolerance(myFace2);
|
||||||
// ============================================================
|
//
|
||||||
|
myTol1 = aTolF1 + aTolF2;
|
||||||
|
myTol2 = myTol1;
|
||||||
|
|
||||||
Standard_Real x0,y0,z0,x1,y1,z1,dx,dy,dz;
|
Standard_Real x0,y0,z0,x1,y1,z1,dx,dy,dz;
|
||||||
Standard_Boolean Box1OK,Box2OK;
|
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
|
//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*dx;
|
||||||
Standard_Real tolbox = tolef;
|
Standard_Real tolbox = tolef;
|
||||||
myTol1 = tolbox;
|
|
||||||
myTol2 = tolbox;
|
|
||||||
|
|
||||||
Standard_Real tolmin = Precision::Confusion();
|
Standard_Real tolmin = Precision::Confusion();
|
||||||
if (tolmin>myTol1) myTol1 = tolmin;
|
|
||||||
if (tolmin>myTol2) myTol2 = tolmin;
|
|
||||||
|
|
||||||
Deflection=0.01;
|
Deflection=0.01;
|
||||||
MaxUV=0.01;
|
MaxUV=0.01;
|
||||||
Deflection*=dx;
|
Deflection*=dx;
|
||||||
|
|
||||||
Standard_Real MTOL1 = Max(myTol1,1e-8);
|
|
||||||
Standard_Real MTOL2 = Max(myTol2,1e-8);
|
|
||||||
Standard_Real MDEFLECTION = Deflection;
|
Standard_Real MDEFLECTION = Deflection;
|
||||||
Standard_Real MMAXUV=0.01;
|
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);
|
// printf("\n FaceTolerances3d : TOL1 = %5.5eg TOL2=%5.5eg DEFL=%5.5eg MAXUV=%5.5eg\n",MTOL1,MTOL2,MDEFLECTION,0.01);
|
||||||
#endif
|
#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(MMAXUV<1e-3) MMAXUV=1e-3;
|
||||||
if(MDEFLECTION<1e-3) MDEFLECTION = 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(MMAXUV>0.01) MMAXUV=0.01;
|
||||||
if(MDEFLECTION>0.1) MDEFLECTION = 0.1;
|
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);
|
// printf("TOL1 = %5.5eg TOL2=%5.5eg DEFL=%5.5eg MAXUV=%5.5eg\n",MTOL1,MTOL2,MDEFLECTION,MMAXUV);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
myTol1 = MTOL1;
|
|
||||||
myTol2 = MTOL2;
|
|
||||||
Deflection = MDEFLECTION;
|
Deflection = MDEFLECTION;
|
||||||
MaxUV = MMAXUV;
|
MaxUV = MMAXUV;
|
||||||
|
|
||||||
} // FTOL_FaceTolerances
|
} // FTOL_FaceTolerances
|
||||||
|
|
||||||
Standard_EXPORT void FTOL_FaceTolerances3d
|
Standard_EXPORT void FTOL_FaceTolerances3d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user