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:
@@ -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;
|
||||
}
|
||||
|
@@ -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,23 +539,34 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
||||
{
|
||||
stepw = stepw/2.;
|
||||
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;
|
||||
if (line->NbPoints()>=2) {
|
||||
// Indiquer qu on s arrete en cours de cheminement
|
||||
}
|
||||
// else {
|
||||
// line->Clear();
|
||||
// }
|
||||
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);
|
||||
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;
|
||||
if (line->NbPoints()>=2) {
|
||||
// Indiquer qu on s arrete en cours de cheminement
|
||||
}
|
||||
// else {
|
||||
// line->Clear();
|
||||
// }
|
||||
}
|
||||
}
|
||||
else {
|
||||
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
|
||||
|
Reference in New Issue
Block a user