mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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;
|
ParDep = sol;
|
||||||
Pos1 = domain1->Classify(gp_Pnt2d(sol(1), sol(2)), Min(tolerance(1), tolerance(2)), 0);
|
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);
|
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;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
@@ -96,7 +96,9 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
|||||||
{
|
{
|
||||||
Standard_Real Cosi = 0., Cosi2 = 0.;
|
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();
|
Standard_Integer nbp = line->NbPoints();
|
||||||
if(nbp >= 2){ //On reprend le dernier step s'il n est pas trop petit.
|
if(nbp >= 2){ //On reprend le dernier step s'il n est pas trop petit.
|
||||||
if(sens < 0.){
|
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)){
|
if(bonpoint && line->NbPoints() == 1 && (situ1 != TopAbs_IN || situ2 != TopAbs_IN)){
|
||||||
State = Blend_StepTooLarge;
|
State = Blend_StepTooLarge;
|
||||||
bonpoint = 0;
|
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){
|
if(bonpoint){
|
||||||
w1 = w2 = Bound;
|
w1 = w2 = Bound;
|
||||||
@@ -211,6 +228,12 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
|||||||
recad2 = Standard_False;
|
recad2 = Standard_False;
|
||||||
echecrecad = Standard_False;
|
echecrecad = Standard_False;
|
||||||
control = 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) {
|
if (situ1 == TopAbs_OUT || situ1 == TopAbs_ON) {
|
||||||
// pb inverse sur surf1
|
// pb inverse sur surf1
|
||||||
@@ -516,23 +539,34 @@ void Blend_Walking::InternalPerform(Blend_Function& Func,
|
|||||||
{
|
{
|
||||||
stepw = stepw/2.;
|
stepw = stepw/2.;
|
||||||
if (Abs(stepw) < tolgui) {
|
if (Abs(stepw) < tolgui) {
|
||||||
Ext1.SetValue(previousP.PointOnS1(),
|
if (IsAlwaysON)
|
||||||
sol(1),sol(2),
|
{
|
||||||
previousP.Parameter(),tolesp);
|
IsModeON = Standard_True;
|
||||||
Ext2.SetValue(previousP.PointOnS2(),
|
stepw = SaveStepw;
|
||||||
sol(3),sol(4),
|
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
|
||||||
previousP.Parameter(),tolesp);
|
evalpinit(parinit,previousP,parprec,param,
|
||||||
if (!previousP.IsTangencyPoint()) {
|
infbound,supbound, clasonS1, clasonS2);
|
||||||
Ext1.SetTangent(previousP.TangentOnS1());
|
}
|
||||||
Ext2.SetTangent(previousP.TangentOnS2());
|
else
|
||||||
}
|
{
|
||||||
Arrive = Standard_True;
|
Ext1.SetValue(previousP.PointOnS1(),
|
||||||
if (line->NbPoints()>=2) {
|
sol(1),sol(2),
|
||||||
// Indiquer qu on s arrete en cours de cheminement
|
previousP.Parameter(),tolesp);
|
||||||
}
|
Ext2.SetValue(previousP.PointOnS2(),
|
||||||
// else {
|
sol(3),sol(4),
|
||||||
// line->Clear();
|
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 {
|
else {
|
||||||
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
|
param = parprec + sens*stepw; // on ne risque pas de depasser Bound.
|
||||||
|
Reference in New Issue
Block a user