mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0026009: Wrong result of the test blend bfuseblend B7
Correction to avoid infinite loop Minor correction Update of test-case for issue #26009 Fix of compiler's warning
This commit is contained in:
parent
905522eef8
commit
d66bd706ce
@ -16,6 +16,8 @@
|
|||||||
#include <Extrema_ExtPS.hxx>
|
#include <Extrema_ExtPS.hxx>
|
||||||
#include <Extrema_ExtPC.hxx>
|
#include <Extrema_ExtPC.hxx>
|
||||||
|
|
||||||
|
static const Standard_Real CosRef3D = 0.88;
|
||||||
|
|
||||||
static void RecadreIfPeriodic(Standard_Real& NewU,
|
static void RecadreIfPeriodic(Standard_Real& NewU,
|
||||||
Standard_Real& NewV,
|
Standard_Real& NewV,
|
||||||
const Standard_Real OldU,
|
const Standard_Real OldU,
|
||||||
@ -92,6 +94,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
|||||||
Blend_FuncInv& FuncInv,
|
Blend_FuncInv& FuncInv,
|
||||||
const Standard_Real Bound)
|
const Standard_Real Bound)
|
||||||
{
|
{
|
||||||
|
Standard_Real Cosi = 0., Cosi2 = 0.;
|
||||||
|
|
||||||
Standard_Real stepw = pasmax;
|
Standard_Real stepw = pasmax;
|
||||||
Standard_Integer nbp = line->NbPoints();
|
Standard_Integer nbp = line->NbPoints();
|
||||||
@ -105,6 +108,10 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
|||||||
stepw = Max(stepw,100.*tolgui);
|
stepw = Max(stepw,100.*tolgui);
|
||||||
}
|
}
|
||||||
Standard_Real parprec = param;
|
Standard_Real parprec = param;
|
||||||
|
gp_Vec TgOnGuide, PrevTgOnGuide;
|
||||||
|
gp_Pnt PtOnGuide;
|
||||||
|
hguide->D1(parprec, PtOnGuide, TgOnGuide);
|
||||||
|
PrevTgOnGuide = TgOnGuide;
|
||||||
|
|
||||||
if (sens*(parprec - Bound) >= -tolgui) {
|
if (sens*(parprec - Bound) >= -tolgui) {
|
||||||
return;
|
return;
|
||||||
@ -145,6 +152,37 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
|||||||
sectioncalculee = 0;
|
sectioncalculee = 0;
|
||||||
nbcomputedsection++;
|
nbcomputedsection++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
hguide->D1(param, PtOnGuide, TgOnGuide);
|
||||||
|
//Check deflection on guide
|
||||||
|
Cosi = PrevTgOnGuide * TgOnGuide;
|
||||||
|
if (Cosi < gp::Resolution()) //angle>=pi/2 or null magnitude
|
||||||
|
Cosi2 = 0.;
|
||||||
|
else
|
||||||
|
Cosi2 = Cosi * Cosi / PrevTgOnGuide.SquareMagnitude() / TgOnGuide.SquareMagnitude();
|
||||||
|
if (Cosi2 < CosRef3D) //angle 3d too great
|
||||||
|
{
|
||||||
|
State = Blend_StepTooLarge;
|
||||||
|
stepw = stepw/2.;
|
||||||
|
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
|
||||||
|
if (Abs(stepw) < tolgui) {
|
||||||
|
Ext1.SetValue(previousP.PointOnS1(),
|
||||||
|
sol(1),sol(2),
|
||||||
|
previousP.Parameter(),tolesp);
|
||||||
|
Ext2.SetValue(previousP.PointOnS2(),
|
||||||
|
sol(3),sol(4),
|
||||||
|
previousP.Parameter(),tolesp);
|
||||||
|
if (!previousP.IsTangencyPoint()) {
|
||||||
|
Ext1.SetTangent(previousP.TangentOnS1());
|
||||||
|
Ext2.SetTangent(previousP.TangentOnS2());
|
||||||
|
}
|
||||||
|
Arrive = Standard_True;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
PrevTgOnGuide = TgOnGuide;
|
||||||
|
//////////////////////////
|
||||||
|
|
||||||
Standard_Boolean bonpoint = 1;
|
Standard_Boolean bonpoint = 1;
|
||||||
Func.Set(param);
|
Func.Set(param);
|
||||||
rsnld.Perform(Func,parinit,infbound,supbound);
|
rsnld.Perform(Func,parinit,infbound,supbound);
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
puts "TODO OCC26009 All: Error: Cannot find the result of BLEND-operation."
|
|
||||||
|
|
||||||
pcylinder s1 3 15
|
pcylinder s1 3 15
|
||||||
pcylinder s2 3 15
|
pcylinder s2 3 15
|
||||||
trotate s2 0 0 0 1 0 0 90
|
trotate s2 0 0 0 1 0 0 90
|
||||||
|
Loading…
x
Reference in New Issue
Block a user