{
Standard_Real aDist1 = ProjPOnC(C1.Value(aT1[iT]), anExtPC2);
Standard_Real aDist2 = ProjPOnC(C2.Value(aT2[iT]), anExtPC1);
- isParallel = (Abs(Min(aDist1, aDist2) - aF) < Precision::Confusion());
+ isParallel = (Abs(Min(aDist1, aDist2) - aF * aF) < Precision::Confusion());
}
}
return Standard_False;
}
- F = C2.Value(v).SquareDistance(C1.Value(u));
+ F = C2.Value(v).Distance(C1.Value(u));
return Standard_True;
}
return Standard_False;
}
- F = C2.Value(v).SquareDistance(C1.Value(u));
+ F = C2.Value(v).Distance(C1.Value(u));
return Standard_True;
}
--- /dev/null
+puts "================================"
+puts " 0033515: Modeling Algorithm - BRepExtrema_DistShapeShape poduces wrong result"
+puts "================================"
+
+restore [locate_data_file bug33515_w1.brep] w1
+restore [locate_data_file bug33515_w2.brep] w2
+
+distmini d w1 w2
+set dist [dval d_val]
+if { $dist < 3.e-10 } {
+ puts "OK: Extrema is valid"
+} else {
+ puts "Error: Extrema distance is too big"
+}
# Check result
checklength ext_1 -l 2.929642751e-14 -eps .01
checklength ext_2 -l 3.480934286e-14 -eps .01
-checklength ext_3 -l 3.177643716e-14 -eps .01
+checklength ext_3 -l 2.929642751054232-14 -eps .01
# Run extrema c3/c2
set info [extrema c3 c2]
# prepare
pload XDE OCAF
+cpulimit 1000
XOpen [locate_data_file bug32539_1.xbf] XB
XGetShape s1 XB 0:1:1:2
XGetShape s2 XB 0:1:1:4
restore [locate_data_file BPLSEITLI.brep] s2
# multi-thread
+cpulimit 1000
dchrono p reset; dchrono p start;
set pres [distmini res s1 s2 -parallel]
dchrono p stop;