mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0023733: PCurve for edge on face creation failure
Adding test case for this fix
This commit is contained in:
parent
16e65a0347
commit
a20400b3a2
@ -228,8 +228,9 @@ Method:
|
||||
Us = Sol.Value(NoSol);
|
||||
Cu = ElCLib::Value(Us,C);
|
||||
mySqDist[myNbExt] = Cu.SquareDistance(P);
|
||||
myIsMin[myNbExt] = (NoSol == 1);
|
||||
myPoint[myNbExt] = Extrema_POnCurv(Us,Cu);
|
||||
Cu = ElCLib::Value(Us + 0.1, C);
|
||||
myIsMin[myNbExt] = mySqDist[myNbExt] < Cu.SquareDistance(P);
|
||||
myNbExt++;
|
||||
}
|
||||
myDone = Standard_True;
|
||||
|
@ -363,7 +363,13 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
||||
newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
|
||||
|
||||
if (newV > myvsup) {
|
||||
newV = myvsup;
|
||||
newV -= 2. * M_PI;
|
||||
|
||||
if (newV + mytolv < myvinf) {
|
||||
newV = myvsup;
|
||||
} else if (newV < myvinf) {
|
||||
newV = myvinf;
|
||||
}
|
||||
}
|
||||
}
|
||||
V = newV;
|
||||
@ -382,8 +388,15 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
||||
(anACurve->GetType() == GeomAbs_Ellipse)) {
|
||||
newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
|
||||
|
||||
if(newV < myvinf)
|
||||
newV = myvinf;
|
||||
if(newV < myvinf) {
|
||||
newV += 2. * M_PI;
|
||||
|
||||
if (newV - mytolv > myvsup) {
|
||||
newV = myvinf;
|
||||
} else if (newV > myvsup) {
|
||||
newV = myvsup;
|
||||
}
|
||||
}
|
||||
}
|
||||
V = newV;
|
||||
|
||||
@ -422,7 +435,13 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
||||
newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
|
||||
|
||||
if (newV > myvsup) {
|
||||
newV = myvsup;
|
||||
newV -= 2. * M_PI;
|
||||
|
||||
if (newV + mytolv < myvinf) {
|
||||
newV = myvsup;
|
||||
} else if (newV < myvinf) {
|
||||
newV = myvinf;
|
||||
}
|
||||
}
|
||||
}
|
||||
V = newV;
|
||||
@ -438,8 +457,15 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
||||
(anACurve->GetType() == GeomAbs_Ellipse)) {
|
||||
newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
|
||||
|
||||
if(newV < myvinf)
|
||||
newV = myvinf;
|
||||
if(newV < myvinf) {
|
||||
newV += 2. * M_PI;
|
||||
|
||||
if (newV - mytolv > myvsup) {
|
||||
newV = myvinf;
|
||||
} else if (newV > myvsup) {
|
||||
newV = myvsup;
|
||||
}
|
||||
}
|
||||
}
|
||||
V = newV;
|
||||
|
||||
|
40
tests/bugs/moddata/bug23733
Executable file
40
tests/bugs/moddata/bug23733
Executable file
@ -0,0 +1,40 @@
|
||||
puts "================"
|
||||
puts "CR23733"
|
||||
puts "================"
|
||||
puts ""
|
||||
###############################################
|
||||
## PCurve for edge on face creation failure
|
||||
###############################################
|
||||
|
||||
pload DCAF TOPTEST
|
||||
|
||||
Open [locate_data_file bug_glue_edges_GEOM.sgd] D
|
||||
|
||||
GetShape D 0:1:9686:1:1:2 s1
|
||||
GetShape D 0:1:9449:1:1:2 s2
|
||||
explode s1 e
|
||||
explode s2 f
|
||||
|
||||
#should create pcurve
|
||||
bhaspc s1_100 s2_2 do
|
||||
#should report OK
|
||||
set info1 [bhaspc s1_100 s2_2]
|
||||
if { [regexp {No} ${info1}] == 1 } {
|
||||
puts "Faulty: No 2D curves detected"
|
||||
}
|
||||
|
||||
#should create pcurve
|
||||
bhaspc s1_40 s2_54 do
|
||||
#should report OK
|
||||
set info2 [bhaspc s1_40 s2_54]
|
||||
if { [regexp {No} ${info2}] == 1 } {
|
||||
puts "Faulty: No 2D curves detected"
|
||||
}
|
||||
|
||||
#should create pcurve
|
||||
bhaspc s1_22 s2_123 do
|
||||
#should report OK
|
||||
set info3 [bhaspc s1_22 s2_123]
|
||||
if { [regexp {No} ${info3}] == 1 } {
|
||||
puts "Faulty: No 2D curves detected"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user