mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Corrections according to remarks.
This commit is contained in:
@@ -214,16 +214,16 @@ Standard_Boolean IntWalk_IWalking::TestArretPassage
|
||||
previousPoint.ParametersOnS1(Up,Vp);
|
||||
}
|
||||
|
||||
IntWalk_VectorOfWalkingData wdata [2] = {wd2, wd3};
|
||||
IntWalk_VectorOfWalkingData* wdata [2] = {&wd2, &wd3};
|
||||
for (Standard_Integer ind = 0; ind < 2; ind++)
|
||||
for (size_t i = 1; i < wdata[ind].size(); i++) {
|
||||
if (wdata[ind][i].etat > 0) {
|
||||
for (size_t i = 1; i < wdata[ind]->size(); i++) {
|
||||
if ((*(wdata[ind]))[i].etat > 0) {
|
||||
// debug jag 05.04.94
|
||||
|
||||
// if ((Up-wd2[i].ustart)*(UV(1)-wd2[i].ustart) +
|
||||
// (Vp-wd2[i].vstart)*(UV(2)-wd2[i].vstart) <= 0)
|
||||
Utest = wdata[ind][i].ustart;
|
||||
Vtest = wdata[ind][i].vstart;
|
||||
Utest = (*(wdata[ind]))[i].ustart;
|
||||
Vtest = (*(wdata[ind]))[i].vstart;
|
||||
|
||||
Du = UV(1)-Utest;
|
||||
Dv = UV(2)-Vtest;
|
||||
@@ -237,7 +237,7 @@ Standard_Boolean IntWalk_IWalking::TestArretPassage
|
||||
if ((Abs(Du) < tolu2 && Abs(Dv) < tolv2) ||
|
||||
(Abs(Dup) < tolu2 && Abs(Dvp) < tolv2)) {
|
||||
|
||||
wdata[ind][i].etat = -wdata[ind][i].etat;
|
||||
(*(wdata[ind]))[i].etat = -(*(wdata[ind]))[i].etat;
|
||||
}
|
||||
else {
|
||||
Standard_Real DDu = (UV(1)-Up);
|
||||
@@ -247,7 +247,7 @@ Standard_Boolean IntWalk_IWalking::TestArretPassage
|
||||
if(DD1<=DDD) {
|
||||
Standard_Real DD2 = Dup*Dup+Dvp*Dvp;
|
||||
if(DD2<=DDD && ((Du*Dup) + (Dv*Dvp*tolu/tolv) <= 0.)) {
|
||||
wdata[ind][i].etat = -wdata[ind][i].etat;
|
||||
(*(wdata[ind]))[i].etat = -(*(wdata[ind]))[i].etat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -397,9 +397,10 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
gp_Vec newd3d;
|
||||
gp_Dir2d newd2d;
|
||||
Standard_Boolean IsDiscriminantNull;
|
||||
ComputeDirOfTangentialIntersection(Func, StepSignTangent,
|
||||
IsDiscriminantNull, SignOfBcoeff,
|
||||
newd3d, newd2d);
|
||||
Standard_Boolean DirComputed =
|
||||
ComputeDirOfTangentialIntersection(Func, StepSignTangent,
|
||||
IsDiscriminantNull, SignOfBcoeff,
|
||||
newd3d, newd2d);
|
||||
if (!IsDiscriminantNull) //we have gone from tangent line
|
||||
{
|
||||
//take line from prevprevP to prevP
|
||||
@@ -419,30 +420,33 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
Uvap(2) = ProjCurSol.Y();
|
||||
Func.Values(Uvap, FuncVal, D);
|
||||
/////////
|
||||
ComputeDirOfTangentialIntersection(Func, StepSignTangent,
|
||||
IsDiscriminantNull, SignOfBcoeff,
|
||||
newd3d, newd2d);
|
||||
DirComputed = ComputeDirOfTangentialIntersection(Func, StepSignTangent,
|
||||
IsDiscriminantNull, SignOfBcoeff,
|
||||
newd3d, newd2d);
|
||||
}
|
||||
if (SignOfBcoeff == 0) //point of branching
|
||||
Status = IntWalk_ArretSurPoint;
|
||||
else
|
||||
if (DirComputed)
|
||||
{
|
||||
if (PrevSignOfBcoeff == 0 ||
|
||||
SignOfBcoeff == PrevSignOfBcoeff)
|
||||
{
|
||||
Status = IntWalk_OKtangent;
|
||||
MakeWalkingPoint(2, Uvap(1), Uvap(2), Func, previousPoint);
|
||||
previousd3d = newd3d;
|
||||
previousd2d = newd2d;
|
||||
CurrentLine->AddPoint(previousPoint);
|
||||
}
|
||||
else //change of sign of Bcoeff
|
||||
if (SignOfBcoeff == 0) //point of branching
|
||||
Status = IntWalk_ArretSurPoint;
|
||||
else
|
||||
{
|
||||
MakeWalkingPoint(1, Uvap(1), Uvap(2), Func, Psol);
|
||||
FindExactCuspPoint(Func, Psol,
|
||||
PrevSignOfBcoeff, SignOfBcoeff);
|
||||
Psol.ParametersOnSurface(reversed, Uvap(1), Uvap(2));
|
||||
//Status = IntWalk_ArretSurPoint;
|
||||
if (PrevSignOfBcoeff == 0 ||
|
||||
SignOfBcoeff == PrevSignOfBcoeff)
|
||||
{
|
||||
Status = IntWalk_OKtangent;
|
||||
MakeWalkingPoint(2, Uvap(1), Uvap(2), Func, previousPoint);
|
||||
previousd3d = newd3d;
|
||||
previousd2d = newd2d;
|
||||
CurrentLine->AddPoint(previousPoint);
|
||||
}
|
||||
else //change of sign of Bcoeff
|
||||
{
|
||||
MakeWalkingPoint(1, Uvap(1), Uvap(2), Func, Psol);
|
||||
FindExactCuspPoint(Func, Psol,
|
||||
PrevSignOfBcoeff, SignOfBcoeff);
|
||||
Psol.ParametersOnSurface(reversed, Uvap(1), Uvap(2));
|
||||
//Status = IntWalk_ArretSurPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -776,32 +780,34 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
gp_Vec newd3d;
|
||||
gp_Dir2d newd2d;
|
||||
Standard_Boolean IsDiscriminantNull;
|
||||
ComputeDirOfTangentialIntersection(Func, StepSignTangent,
|
||||
IsDiscriminantNull, SignOfBcoeff,
|
||||
newd3d, newd2d);
|
||||
if (SignOfBcoeff == 0) //point of branching
|
||||
if (ComputeDirOfTangentialIntersection(Func, StepSignTangent,
|
||||
IsDiscriminantNull, SignOfBcoeff,
|
||||
newd3d, newd2d))
|
||||
{
|
||||
//Status = IntWalk_ArretSurPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PrevSignOfBcoeff == 0 ||
|
||||
SignOfBcoeff == PrevSignOfBcoeff)
|
||||
if (SignOfBcoeff == 0) //point of branching
|
||||
{
|
||||
Status = IntWalk_OKtangent;
|
||||
MakeWalkingPoint(2, Uvap(1), Uvap(2), Func, previousPoint);
|
||||
previousd3d = newd3d;
|
||||
previousd2d = newd2d;
|
||||
CurrentLine->AddPoint(previousPoint);
|
||||
}
|
||||
else //change of sign of Bcoeff
|
||||
{
|
||||
MakeWalkingPoint(1, Uvap(1), Uvap(2), Func, Psol);
|
||||
FindExactCuspPoint(Func, Psol,
|
||||
PrevSignOfBcoeff, SignOfBcoeff);
|
||||
Psol.ParametersOnSurface(reversed, Uvap(1), Uvap(2));
|
||||
//Status = IntWalk_ArretSurPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PrevSignOfBcoeff == 0 ||
|
||||
SignOfBcoeff == PrevSignOfBcoeff)
|
||||
{
|
||||
Status = IntWalk_OKtangent;
|
||||
MakeWalkingPoint(2, Uvap(1), Uvap(2), Func, previousPoint);
|
||||
previousd3d = newd3d;
|
||||
previousd2d = newd2d;
|
||||
CurrentLine->AddPoint(previousPoint);
|
||||
}
|
||||
else //change of sign of Bcoeff
|
||||
{
|
||||
MakeWalkingPoint(1, Uvap(1), Uvap(2), Func, Psol);
|
||||
FindExactCuspPoint(Func, Psol,
|
||||
PrevSignOfBcoeff, SignOfBcoeff);
|
||||
Psol.ParametersOnSurface(reversed, Uvap(1), Uvap(2));
|
||||
//Status = IntWalk_ArretSurPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Status == IntWalk_ArretSurPoint) {
|
||||
if (wd3[I].etat >12) { //line should become open
|
||||
|
@@ -303,9 +303,10 @@ void IntWalk_IWalking::OpenLine(const Standard_Integer N,
|
||||
gp_Vec newd3d;
|
||||
gp_Dir2d newd2d;
|
||||
Standard_Boolean IsDiscriminantNull;
|
||||
ComputeDirOfTangentialIntersection(sp, theSign,
|
||||
IsDiscriminantNull, theSignOfBcoeff,
|
||||
newd3d, newd2d);
|
||||
if (!ComputeDirOfTangentialIntersection(sp, theSign,
|
||||
IsDiscriminantNull, theSignOfBcoeff,
|
||||
newd3d, newd2d))
|
||||
StdFail_UndefinedDerivative::Raise();
|
||||
previousd3d = newd3d;
|
||||
previousd2d = newd2d;
|
||||
}
|
||||
|
Reference in New Issue
Block a user