1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

This version allows to build a chamfer surface.

This commit is contained in:
jgv
2015-06-02 15:23:21 +03:00
parent d0db6e8b33
commit b09b2f2594
2 changed files with 54 additions and 19 deletions

View File

@@ -200,7 +200,8 @@ Standard_Boolean Blend_Walking::PerformFirstSection(Blend_Function& Func,
ParDep = sol;
Pos1 = domain1->Classify(gp_Pnt2d(sol(1), sol(2)), Min(tolerance(1), tolerance(2)), 0);
Pos2 = domain2->Classify(gp_Pnt2d(sol(3), sol(4)), Min(tolerance(3), tolerance(4)), 0);
if (Pos1 != TopAbs_IN || Pos2 != TopAbs_IN)
//if (Pos1 != TopAbs_IN || Pos2 != TopAbs_IN)
if (Pos1 == TopAbs_OUT || Pos2 == TopAbs_OUT)
{
return Standard_False;
}

View File

@@ -96,7 +96,9 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
{
Standard_Real Cosi = 0., Cosi2 = 0.;
Standard_Real stepw = pasmax;
Standard_Real stepw = pasmax, SaveStepw = 0.;
Standard_Boolean IsAlwaysON = Standard_False;
Standard_Boolean IsModeON = Standard_False;
Standard_Integer nbp = line->NbPoints();
if(nbp >= 2){ //On reprend le dernier step s'il n est pas trop petit.
if(sens < 0.){
@@ -204,6 +206,21 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
if(bonpoint && line->NbPoints() == 1 && (situ1 != TopAbs_IN || situ2 != TopAbs_IN)){
State = Blend_StepTooLarge;
bonpoint = 0;
if (situ1 != TopAbs_OUT && situ2 != TopAbs_OUT) //ON or IN
{
if (IsModeON)
{
bonpoint = 1;
situ1 = situ2 = TopAbs_IN;
State = Blend_OK;
}
else
{
if (IsAlwaysON == Standard_False)
SaveStepw = stepw;
IsAlwaysON = Standard_True;
}
}
}
if(bonpoint){
w1 = w2 = Bound;
@@ -211,6 +228,12 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
recad2 = Standard_False;
echecrecad = Standard_False;
control = Standard_False;
if (IsModeON && situ1 != TopAbs_OUT && situ2 != TopAbs_OUT)
situ1 = situ2 = TopAbs_IN;
if (IsModeON &&
(situ1 == TopAbs_OUT || situ2 == TopAbs_OUT))
situ1 = situ2 = TopAbs_OUT;
if (situ1 == TopAbs_OUT || situ1 == TopAbs_ON) {
// pb inverse sur surf1
@@ -516,6 +539,16 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
{
stepw = stepw/2.;
if (Abs(stepw) < tolgui) {
if (IsAlwaysON)
{
IsModeON = Standard_True;
stepw = SaveStepw;
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
evalpinit(parinit,previousP,parprec,param,
infbound,supbound, clasonS1, clasonS2);
}
else
{
Ext1.SetValue(previousP.PointOnS1(),
sol(1),sol(2),
previousP.Parameter(),tolesp);
@@ -534,6 +567,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
// line->Clear();
// }
}
}
else {
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
evalpinit(parinit,previousP,parprec,param,