mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0023733: PCurve for edge on face creation failure Adding test case for this fix
Signed-off-by: skv <skv@opencascade.com>
This commit is contained in:
parent
3436ee9aed
commit
02cf3438e4
@ -228,8 +228,9 @@ Method:
|
|||||||
Us = Sol.Value(NoSol);
|
Us = Sol.Value(NoSol);
|
||||||
Cu = ElCLib::Value(Us,C);
|
Cu = ElCLib::Value(Us,C);
|
||||||
mySqDist[myNbExt] = Cu.SquareDistance(P);
|
mySqDist[myNbExt] = Cu.SquareDistance(P);
|
||||||
myIsMin[myNbExt] = (NoSol == 1);
|
|
||||||
myPoint[myNbExt] = Extrema_POnCurv(Us,Cu);
|
myPoint[myNbExt] = Extrema_POnCurv(Us,Cu);
|
||||||
|
Cu = ElCLib::Value(Us + 0.1, C);
|
||||||
|
myIsMin[myNbExt] = mySqDist[myNbExt] < Cu.SquareDistance(P);
|
||||||
myNbExt++;
|
myNbExt++;
|
||||||
}
|
}
|
||||||
myDone = Standard_True;
|
myDone = Standard_True;
|
||||||
|
@ -365,7 +365,13 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
|||||||
newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
|
newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
|
||||||
|
|
||||||
if (newV > myvsup) {
|
if (newV > myvsup) {
|
||||||
newV = myvsup;
|
newV -= 2. * M_PI;
|
||||||
|
|
||||||
|
if (newV + mytolv < myvinf) {
|
||||||
|
newV = myvsup;
|
||||||
|
} else if (newV < myvinf) {
|
||||||
|
newV = myvinf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
V = newV;
|
V = newV;
|
||||||
@ -384,8 +390,15 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
|||||||
(anACurve->GetType() == GeomAbs_Ellipse)) {
|
(anACurve->GetType() == GeomAbs_Ellipse)) {
|
||||||
newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
|
newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
|
||||||
|
|
||||||
if(newV < myvinf)
|
if(newV < myvinf) {
|
||||||
newV = myvinf;
|
newV += 2. * M_PI;
|
||||||
|
|
||||||
|
if (newV - mytolv > myvsup) {
|
||||||
|
newV = myvinf;
|
||||||
|
} else if (newV > myvsup) {
|
||||||
|
newV = myvsup;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
V = newV;
|
V = newV;
|
||||||
|
|
||||||
@ -424,7 +437,13 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
|||||||
newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
|
newV = ElCLib::InPeriod(V, myvinf, myvinf + 2. * M_PI);
|
||||||
|
|
||||||
if (newV > myvsup) {
|
if (newV > myvsup) {
|
||||||
newV = myvsup;
|
newV -= 2. * M_PI;
|
||||||
|
|
||||||
|
if (newV + mytolv < myvinf) {
|
||||||
|
newV = myvsup;
|
||||||
|
} else if (newV < myvinf) {
|
||||||
|
newV = myvinf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
V = newV;
|
V = newV;
|
||||||
@ -440,8 +459,15 @@ void Extrema_ExtPRevS::Perform(const gp_Pnt& P)
|
|||||||
(anACurve->GetType() == GeomAbs_Ellipse)) {
|
(anACurve->GetType() == GeomAbs_Ellipse)) {
|
||||||
newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
|
newV = ElCLib::InPeriod(V, myvsup - 2. * M_PI, myvsup);
|
||||||
|
|
||||||
if(newV < myvinf)
|
if(newV < myvinf) {
|
||||||
newV = myvinf;
|
newV += 2. * M_PI;
|
||||||
|
|
||||||
|
if (newV - mytolv > myvsup) {
|
||||||
|
newV = myvinf;
|
||||||
|
} else if (newV > myvsup) {
|
||||||
|
newV = myvsup;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
V = newV;
|
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