LevelOfEmptyInmyIntersectionOn2S=0;
if(LevelOfIterWithoutAppend < 10)
{
- Status = TestDeflection();
+ Status = TestDeflection(ChoixIso);
}
else
{
return bOutOfTangentZone;
}
- Status = TestDeflection();
+ Status = TestDeflection(ChoixIso);
if(Status == IntWalk_OK) {
static const Standard_Real d = 7.0;
}
-IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection()
+IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIsoparametric choixIso)
// test if vector is observed by calculating an increase of vector
// or the previous point and its tangent, the new calculated point and its
IntWalk_StatusDeflection Status = IntWalk_OK;
Standard_Real FlecheCourante ,Ratio;
+ // Caro1 and Caro2
+ const Handle(Adaptor3d_HSurface)& Caro1 = myIntersectionOn2S.Function().AuxillarSurface1();
+ const Handle(Adaptor3d_HSurface)& Caro2 = myIntersectionOn2S.Function().AuxillarSurface2();
const IntSurf_PntOn2S& CurrentPoint = myIntersectionOn2S.Point();
//==================================================================================
pasuv[1] = Max(5.*ResoV1,Min(1.5*pasuv[1],pasInit[1]));
pasuv[2] = Max(5.*ResoU2,Min(1.5*pasuv[2],pasInit[2]));
pasuv[3] = Max(5.*ResoV2,Min(1.5*pasuv[3],pasInit[3]));
+ //Compute local resolution: for OCC26717
+ if (Abs(pasuv[choixIso] - pasInit[choixIso]) <= Precision::Confusion())
+ {
+ Standard_Real CurU, CurV;
+ if (choixIso == IntImp_UIsoparametricOnCaro1 ||
+ choixIso == IntImp_VIsoparametricOnCaro1)
+ previousPoint.ParametersOnS1(CurU, CurV);
+ else
+ previousPoint.ParametersOnS2(CurU, CurV);
+ gp_Pnt CurPnt = (choixIso == IntImp_UIsoparametricOnCaro1 ||
+ choixIso == IntImp_VIsoparametricOnCaro1)?
+ Adaptor3d_HSurfaceTool::Value(Caro1, CurU, CurV) :
+ Adaptor3d_HSurfaceTool::Value(Caro2, CurU, CurV);
+ gp_Pnt OffsetPnt;
+ switch(choixIso)
+ {
+ case IntImp_UIsoparametricOnCaro1:
+ OffsetPnt =
+ Adaptor3d_HSurfaceTool::Value(Caro1,
+ CurU + sensCheminement*pasuv[0],
+ CurV);
+ break;
+ case IntImp_VIsoparametricOnCaro1:
+ OffsetPnt =
+ Adaptor3d_HSurfaceTool::Value(Caro1,
+ CurU,
+ CurV + sensCheminement*pasuv[1]);
+ break;
+ case IntImp_UIsoparametricOnCaro2:
+ OffsetPnt =
+ Adaptor3d_HSurfaceTool::Value(Caro2,
+ CurU + sensCheminement*pasuv[2],
+ CurV);
+ break;
+ case IntImp_VIsoparametricOnCaro2:
+ OffsetPnt =
+ Adaptor3d_HSurfaceTool::Value(Caro2,
+ CurU,
+ CurV + sensCheminement*pasuv[3]);
+ break;
+ default:break;
+ }
+ Standard_Real RefDist = CurPnt.Distance(OffsetPnt);
+ Standard_Real LocalResol = 0.;
+ if (RefDist > gp::Resolution())
+ LocalResol = pasuv[choixIso] * tolconf / RefDist;
+ if (pasuv[choixIso] <= LocalResol)
+ pasuv[choixIso] = pasInit[choixIso] = 2*LocalResol;
+ }
+ ////////////////////////////////////////
Status = IntWalk_PointConfondu;
}
--- /dev/null
+puts "============"
+puts "OCC26717"
+puts "============"
+puts ""
+######################################################
+# Error in IntPatch_PrmPrmIntersection: change of local resolution leads to break of walking line
+######################################################
+
+smallview
+
+set expected_MaxTolerance 2.14e-05
+set tol_abs_MaxTolerance 1.e-06
+set tol_rel_MaxTolerance 1.e-06
+
+set FileName1 bug26717_xrf1_eval_fuselage.brep
+restore [locate_data_file ${FileName1}] a
+
+set FileName2 bug26717_xrf1_eval5_wing.brep
+restore [locate_data_file ${FileName2}] b
+
+bfuse r a b
+
+set aList [explode r]
+
+# check 1
+if { [llength ${aList}] == 1} {
+ puts "OK: Good explode of result"
+} else {
+ puts "Error: Bad explode of result"
+}
+
+# check2
+checknbshapes r -solid 1
+
+# check3
+checkshape r
+
+# check4
+regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance r] full MaxTolerance
+checkreal "MaxTolerance" ${MaxTolerance} ${expected_MaxTolerance} ${tol_abs_MaxTolerance} ${tol_rel_MaxTolerance}
+
+clear
+donly r
+fit
+
+xwd ${imagedir}/${test_image}.png