mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-07 18:30:55 +03:00
0025820: No Intersection Curves between surface of revolution and planes
Thin shapes processing has been improved. Test-cases for issue #25820 Comment has been changed
This commit is contained in:
parent
b028f13535
commit
c0e32b3c3d
@ -120,7 +120,9 @@ static void RecadreMemePeriode(IntSurf_PntOn2S& POn2S,const IntSurf_PntOn2S& Ref
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Standard_Boolean CompareVertexAndPoint(const gp_Pnt& V, const gp_Pnt& P, const Standard_Real& Tol) {
|
static Standard_Boolean CompareVertexAndPoint(const gp_Pnt& V, const gp_Pnt& P, const Standard_Real& Tol) {
|
||||||
return (V.Distance(P) <= Tol);
|
const Standard_Real aSQDist = V.SquareDistance(P);
|
||||||
|
const Standard_Real aSQTol = Tol*Tol;
|
||||||
|
return (aSQDist <= aSQTol);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntPatch_WLine::SetPeriod(const Standard_Real pu1,
|
void IntPatch_WLine::SetPeriod(const Standard_Real pu1,
|
||||||
|
@ -107,8 +107,18 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Abs(Du) < tolerance(1) && Abs(Dv) < tolerance(2))
|
const Standard_Real aMinTolU = 0.1*Abs(Step*previousd2d.X()),
|
||||||
|
aMinTolV = 0.1*Abs(Step*previousd2d.Y());
|
||||||
|
|
||||||
|
if ((Abs(Du) < Min(tolerance(1), aMinTolU)) && (Abs(Dv) < Min(tolerance(2), aMinTolV)))
|
||||||
|
{
|
||||||
|
//Thin shapes (for which Ulast-Ufirst or/and Vlast-Vfirst is quite small)
|
||||||
|
//exists (see bug #25820). In this case, step is quite small too.
|
||||||
|
//Nevertheless, it not always means that we mark time. Therefore, Du and Dv
|
||||||
|
//must consider step (aMinTolU and aMinTolV parameters).
|
||||||
|
|
||||||
return IntWalk_ArretSurPointPrecedent; //confused point 2d
|
return IntWalk_ArretSurPointPrecedent; //confused point 2d
|
||||||
|
}
|
||||||
|
|
||||||
Standard_Real Cosi = StepSign * (Du * previousd2d.X() + Dv * previousd2d.Y());
|
Standard_Real Cosi = StepSign * (Du * previousd2d.X() + Dv * previousd2d.Y());
|
||||||
|
|
||||||
|
43
tests/bugs/modalg_6/bug25820_1
Normal file
43
tests/bugs/modalg_6/bug25820_1
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC25820"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
###################################################################
|
||||||
|
# No Intersection Curves between surface of revolution and planes
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25820-Revolution_5.brep] b1
|
||||||
|
explode b1 f
|
||||||
|
copy b1_4 b1
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25820-Translation_1.brep] b2
|
||||||
|
explode b2 f
|
||||||
|
copy b2_2 b2
|
||||||
|
|
||||||
|
smallview
|
||||||
|
clear
|
||||||
|
display b1
|
||||||
|
display b2
|
||||||
|
fit
|
||||||
|
|
||||||
|
dlog reset
|
||||||
|
dlog on
|
||||||
|
decho off
|
||||||
|
bopcurves b1 b2
|
||||||
|
decho on
|
||||||
|
set bug_info [dlog get]
|
||||||
|
|
||||||
|
set bug_info [string trim [string range $bug_info [expr {[string first "\n" $bug_info] + 1}] [expr {[string last "\n" $bug_info] - 1}]]]
|
||||||
|
set bug_info_tol [string trim [string range $bug_info [expr {[string first "=" $bug_info] + 1}] [expr {[string first "\n" $bug_info] - 1}]]]
|
||||||
|
set bug_info_cur [string trim [string range $bug_info [expr {[string first "\n" $bug_info] + 1}] [expr {[string length $bug_info] - 1}]]]
|
||||||
|
set bug_info_cur [string trim [string range $bug_info_cur 0 [expr {[string first " " $bug_info_cur] - 1}]]]
|
||||||
|
|
||||||
|
if {$bug_info_tol > 1.0e-7} {
|
||||||
|
puts "ERROR: OCC25820 is reproduced. Tolerance is to large ($bug_info_tol)."
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$bug_info_cur != 1} {
|
||||||
|
puts "ERROR: OCC25820 is reproduced. Too many curves were found."
|
||||||
|
}
|
||||||
|
|
||||||
|
set only_screen_axo 1
|
43
tests/bugs/modalg_6/bug25820_2
Normal file
43
tests/bugs/modalg_6/bug25820_2
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC25820"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
###################################################################
|
||||||
|
# No Intersection Curves between surface of revolution and planes
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25820-Revolution_5.brep] b1
|
||||||
|
explode b1 f
|
||||||
|
copy b1_4 b1
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25820-Translation_2.brep] b2
|
||||||
|
explode b2 f
|
||||||
|
copy b2_4 b2
|
||||||
|
|
||||||
|
smallview
|
||||||
|
clear
|
||||||
|
display b1
|
||||||
|
display b2
|
||||||
|
fit
|
||||||
|
|
||||||
|
dlog reset
|
||||||
|
dlog on
|
||||||
|
decho off
|
||||||
|
bopcurves b1 b2
|
||||||
|
decho on
|
||||||
|
set bug_info [dlog get]
|
||||||
|
|
||||||
|
set bug_info [string trim [string range $bug_info [expr {[string first "\n" $bug_info] + 1}] [expr {[string last "\n" $bug_info] - 1}]]]
|
||||||
|
set bug_info_tol [string trim [string range $bug_info [expr {[string first "=" $bug_info] + 1}] [expr {[string first "\n" $bug_info] - 1}]]]
|
||||||
|
set bug_info_cur [string trim [string range $bug_info [expr {[string first "\n" $bug_info] + 1}] [expr {[string length $bug_info] - 1}]]]
|
||||||
|
set bug_info_cur [string trim [string range $bug_info_cur 0 [expr {[string first " " $bug_info_cur] - 1}]]]
|
||||||
|
|
||||||
|
if {$bug_info_tol > 1.0e-7} {
|
||||||
|
puts "ERROR: OCC25820 is reproduced. Tolerance is to large ($bug_info_tol)."
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$bug_info_cur != 1} {
|
||||||
|
puts "ERROR: OCC25820 is reproduced. Too many curves were found."
|
||||||
|
}
|
||||||
|
|
||||||
|
set only_screen_axo 1
|
43
tests/bugs/modalg_6/bug25820_3
Normal file
43
tests/bugs/modalg_6/bug25820_3
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC25820"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
###################################################################
|
||||||
|
# No Intersection Curves between surface of revolution and planes
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25820-Revolution_5.brep] b1
|
||||||
|
explode b1 f
|
||||||
|
copy b1_4 b1
|
||||||
|
|
||||||
|
restore [locate_data_file OCC25820-Translation_3.brep] b2
|
||||||
|
explode b2 f
|
||||||
|
copy b2_3 b2
|
||||||
|
|
||||||
|
smallview
|
||||||
|
clear
|
||||||
|
display b1
|
||||||
|
display b2
|
||||||
|
fit
|
||||||
|
|
||||||
|
dlog reset
|
||||||
|
dlog on
|
||||||
|
decho off
|
||||||
|
bopcurves b1 b2
|
||||||
|
decho on
|
||||||
|
set bug_info [dlog get]
|
||||||
|
|
||||||
|
set bug_info [string trim [string range $bug_info [expr {[string first "\n" $bug_info] + 1}] [expr {[string last "\n" $bug_info] - 1}]]]
|
||||||
|
set bug_info_tol [string trim [string range $bug_info [expr {[string first "=" $bug_info] + 1}] [expr {[string first "\n" $bug_info] - 1}]]]
|
||||||
|
set bug_info_cur [string trim [string range $bug_info [expr {[string first "\n" $bug_info] + 1}] [expr {[string length $bug_info] - 1}]]]
|
||||||
|
set bug_info_cur [string trim [string range $bug_info_cur 0 [expr {[string first " " $bug_info_cur] - 1}]]]
|
||||||
|
|
||||||
|
if {$bug_info_tol > 1.0e-7} {
|
||||||
|
puts "ERROR: OCC25820 is reproduced. Tolerance is to large ($bug_info_tol)."
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$bug_info_cur != 1} {
|
||||||
|
puts "ERROR: OCC25820 is reproduced. Too many curves were found."
|
||||||
|
}
|
||||||
|
|
||||||
|
set only_screen_axo 1
|
Loading…
x
Reference in New Issue
Block a user