mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0033515: Modeling Algorithm - BRepExtrema_DistShapeShape poduces wrong result
Changed redundant square operation
This commit is contained in:
parent
58390c4eb1
commit
f0c6e6fc8d
@ -627,7 +627,7 @@ void Extrema_GenExtCC::Perform()
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ static Standard_Boolean _Value(const Adaptor3d_Curve& C1,
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
F = C2.Value(v).SquareDistance(C1.Value(u));
|
||||
F = C2.Value(v).Distance(C1.Value(u));
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ static Standard_Boolean _Value(const Adaptor2d_Curve2d& C1,
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
F = C2.Value(v).SquareDistance(C1.Value(u));
|
||||
F = C2.Value(v).Distance(C1.Value(u));
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
14
tests/bugs/modalg_8/bug33515
Normal file
14
tests/bugs/modalg_8/bug33515
Normal file
@ -0,0 +1,14 @@
|
||||
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"
|
||||
}
|
@ -24,7 +24,7 @@ if { [llength $info] != 3 } {
|
||||
# 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]
|
||||
|
@ -5,6 +5,7 @@ puts ""
|
||||
|
||||
# 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
|
||||
|
@ -8,6 +8,7 @@ restore [locate_data_file 5000-12.brep] s1
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user