// du
du = 0.;
if (aBAS.IsUPeriodic()) {
- Standard_Real newu;
+ Standard_Real u2x;
aUPeriod = aBAS.UPeriod();
//
- GeomInt::AdjustPeriodic(u2, UMin, UMax, aUPeriod, newu, du);
+ // A. drive u2 into the stall [Umin, Umin+aUPeriod] -> u2x
+ GeomInt::AdjustPeriodic(u2, UMin, UMax, aUPeriod, u2x, du, 0.);
+ //
+ // b. try to clarify u2 using the precision (aDelta)
+ if (fabs(u2x-UMin) < aDelta) {
+ u2=UMin;
+ }
+ else if (fabs(u2x-UMin-aUPeriod) < aDelta) {
+ u2=UMin+aUPeriod;
+ }
+ // C. compute du again using clarified value of u2
+ GeomInt::AdjustPeriodic(u2, UMin, UMax, aUPeriod, u2x, du, 0.);
//
if (du==0.) {
if (aBAS.GetType()==GeomAbs_Cylinder) {
--- /dev/null
+puts "================"
+puts "OCC25285"
+puts "================"
+puts ""
+#######################################################################
+# Wrong result of General Fuse operation for an edge and a face.
+#######################################################################
+
+restore [locate_data_file bug25285_qefx.brep] qefx
+
+explode qefx
+copy qefx_1 e
+copy qefx_2 f
+
+bclearobjects
+bcleartools
+baddobjects f e
+
+bfillds
+bbuild result
+
+set square 8.83493
+
+set nb_v_good 4
+set nb_e_good 4
+set nb_w_good 1
+set nb_f_good 1
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 11
+
+set 3dviewer 1