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

0031303: Different calculation of offset direction in Adaptor2d_OffsetCurve and Geom2d_OffsetCurve

Calculations in Adaptor2d_OffsetCurve are unified with similar calculations in Geom2d_OffsetCurve using   methods extracted from Geom2dEvaluator_OffsetCurve to Geom2dEvaluator.cxx

BRepFill_OffsetWire.cxx, Geom2dGcc_Circ2d2TanRadGeo.cxx, Geom2dGcc_Circ2dTanOnRadGeo.cxx, MAT2d_Circuit.cxx are modified to satisfy changing offset direction.
This commit is contained in:
ifv
2020-02-25 11:27:28 +03:00
committed by bugmaster
parent d6e18114eb
commit 68ad329c9d
12 changed files with 395 additions and 318 deletions

View File

@@ -183,7 +183,8 @@ pararg2(1,aNbSolMAX)
IntRes2d_Domain D1;
for (Standard_Integer jcote2 = 1; jcote2 <= nbrcote2 && NbrSol < aNbSolMAX; jcote2++) {
Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(Cu2);
Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2));
//Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2));
Adaptor2d_OffsetCurve C2(HCu2, -cote2(jcote2));
firstparam = Max(C2.FirstParameter(),thefirst);
lastparam = Min(C2.LastParameter(),thelast);
IntRes2d_Domain D2(C2.Value(firstparam), firstparam, Tol,
@@ -367,7 +368,8 @@ pararg2(1,aNbSolMAX)
D1.SetEquivalentParameters(0.,2.*M_PI);
for (Standard_Integer jcote2 = 1 ; jcote2 <= nbrcote2 ; jcote2++) {
Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(Cu2);
Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2));
//Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2));
Adaptor2d_OffsetCurve C2(HCu2, -cote2(jcote2));
firstparam = Max(C2.FirstParameter(),thefirst);
lastparam = Min(C2.LastParameter(),thelast);
IntRes2d_Domain D2(C2.Value(firstparam), firstparam, Tol,
@@ -499,7 +501,8 @@ pararg2(1,aNbSolMAX)
Geom2dInt_TheIntConicCurveOfGInter Intp;
for (Standard_Integer jcote1 = 1; jcote1 <= nbrcote1 && NbrSol < aNbSolMAX; jcote1++) {
Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1);
Adaptor2d_OffsetCurve Cu2(HCu1,cote1(jcote1));
//Adaptor2d_OffsetCurve Cu2(HCu1,cote1(jcote1));
Adaptor2d_OffsetCurve Cu2(HCu1,-cote1(jcote1));
firstparam = Max(Cu2.FirstParameter(),thefirst);
lastparam = Min(Cu2.LastParameter(),thelast);
IntRes2d_Domain D2(Cu2.Value(firstparam), firstparam, Tol,
@@ -832,7 +835,8 @@ pararg2(1,aNbSolMAX)
Geom2dInt_GInter Intp;
for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1);
Adaptor2d_OffsetCurve C1(HCu1,cote1(jcote1));
//Adaptor2d_OffsetCurve C1(HCu1,cote1(jcote1));
Adaptor2d_OffsetCurve C1(HCu1, -cote1(jcote1));
#ifdef OCCT_DEBUG
Standard_Real firstparam = Max(C1.FirstParameter(), thefirst);
Standard_Real lastparam = Min(C1.LastParameter(), thelast);
@@ -841,7 +845,8 @@ pararg2(1,aNbSolMAX)
#endif
for (Standard_Integer jcote2 = 1; jcote2 <= nbrcote2 && NbrSol < aNbSolMAX; jcote2++) {
Handle(Geom2dAdaptor_HCurve) HCu2 = new Geom2dAdaptor_HCurve(Cu2);
Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2));
//Adaptor2d_OffsetCurve C2(HCu2,cote2(jcote2));
Adaptor2d_OffsetCurve C2(HCu2, -cote2(jcote2));
#ifdef OCCT_DEBUG
firstparam = Max(C2.FirstParameter(), thefirst);
lastparam = Min(C2.LastParameter(),thelast);

View File

@@ -125,7 +125,8 @@ parcen3(1,aNbSolMAX)
Geom2dInt_TheIntConicCurveOfGInter Intp;
for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1);
Adaptor2d_OffsetCurve C2(HCu1,Coef(jcote1));
//Adaptor2d_OffsetCurve C2(HCu1,Coef(jcote1));
Adaptor2d_OffsetCurve C2(HCu1, -Coef(jcote1));
firstparam = Max(C2.FirstParameter(),thefirst);
lastparam = Min(C2.LastParameter(),thelast);
IntRes2d_Domain D2(C2.Value(firstparam), firstparam, Tol,
@@ -238,7 +239,8 @@ parcen3(1,aNbSolMAX)
Geom2dInt_TheIntConicCurveOfGInter Intp;
for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1);
Adaptor2d_OffsetCurve C2(HCu1,cote1(jcote1));
//Adaptor2d_OffsetCurve C2(HCu1,cote1(jcote1));
Adaptor2d_OffsetCurve C2(HCu1, -cote1(jcote1));
firstparam = Max(C2.FirstParameter(),thefirst);
lastparam = Min(C2.LastParameter(),thelast);
IntRes2d_Domain D2(C2.Value(firstparam),firstparam,Tol,
@@ -593,7 +595,8 @@ parcen3(1,aNbSolMAX)
Geom2dInt_GInter Intp;
for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
Handle(Geom2dAdaptor_HCurve) HCu1 = new Geom2dAdaptor_HCurve(Cu1);
Adaptor2d_OffsetCurve C1(HCu1,cote1(jcote1));
//Adaptor2d_OffsetCurve C1(HCu1,cote1(jcote1));
Adaptor2d_OffsetCurve C1(HCu1, -cote1(jcote1));
firstparam = Max(C1.FirstParameter(),thefirst);
lastparam = Min(C1.LastParameter(),thelast);
IntRes2d_Domain D1(C1.Value(firstparam), firstparam, Tol,