mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
Methods GeomConvert::ConcatG1, GeomConvert::ConcatC1, Geom2dConvert::ConcatG1, Geom2dConvert::ConcatC1 are corrected to prevent exceeding maximum degree of BSpline curve in case of closed contour.
This commit is contained in:
parent
31e8d3c185
commit
4a3610588f
@ -1608,3 +1608,6 @@ so that related methods have been removed from AIS_InteractiveContext interface:
|
|||||||
|
|
||||||
A set of deprecated methods previously related to Local Context and now redirecting to other methods has been preserved to simplify porting; they will be removed in next release.
|
A set of deprecated methods previously related to Local Context and now redirecting to other methods has been preserved to simplify porting; they will be removed in next release.
|
||||||
|
|
||||||
|
@subsection upgrade_740_extremaalgo Changes in behavior of Convert algorithms
|
||||||
|
|
||||||
|
Now methods *GeomConvert::ConcatG1*, *GeomConvert::ConcatC1*, *Geom2dConvert::ConcatG1*, *Geom2dConvert::ConcatC1* modify the input argument representing the flag of closedness.
|
@ -939,7 +939,7 @@ private:
|
|||||||
void Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves,
|
void Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
const TColStd_Array1OfReal& ArrayOfToler,
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
Handle(TColGeom2d_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
Handle(TColGeom2d_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
||||||
const Standard_Boolean ClosedFlag,
|
Standard_Boolean& ClosedFlag,
|
||||||
const Standard_Real ClosedTolerance)
|
const Standard_Real ClosedTolerance)
|
||||||
|
|
||||||
{Standard_Integer nb_curve=ArrayOfCurves.Length(),
|
{Standard_Integer nb_curve=ArrayOfCurves.Length(),
|
||||||
@ -1013,6 +1013,14 @@ void Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve& ArrayOf
|
|||||||
|
|
||||||
Standard_Real aPolynomialCoefficient[3];
|
Standard_Real aPolynomialCoefficient[3];
|
||||||
|
|
||||||
|
Standard_Boolean NeedDoubleDegRepara = Need2DegRepara(ArrayOfCurves);
|
||||||
|
if (nb_group==1 && ClosedFlag && NeedDoubleDegRepara)
|
||||||
|
{
|
||||||
|
Curve1 = ArrayOfCurves(nb_curve-1);
|
||||||
|
if (Curve1->Degree() > Geom2d_BSplineCurve::MaxDegree()/2)
|
||||||
|
ClosedFlag = Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
if ((nb_group==1) && (ClosedFlag)){ //traitement d'un cas particulier
|
if ((nb_group==1) && (ClosedFlag)){ //traitement d'un cas particulier
|
||||||
indexmin=Indexmin(ArrayOfCurves);
|
indexmin=Indexmin(ArrayOfCurves);
|
||||||
if (indexmin!=(ArrayOfCurves.Length()-1))
|
if (indexmin!=(ArrayOfCurves.Length()-1))
|
||||||
@ -1024,8 +1032,8 @@ void Geom2dConvert::ConcatG1(TColGeom2d_Array1OfBSplineCurve& ArrayOf
|
|||||||
Curve2=ArrayOfCurves(0);
|
Curve2=ArrayOfCurves(0);
|
||||||
for (j=1;j<=nb_curve-1;j++){ //boucle secondaire a l'interieur de chaque groupe
|
for (j=1;j<=nb_curve-1;j++){ //boucle secondaire a l'interieur de chaque groupe
|
||||||
Curve1=ArrayOfCurves(j);
|
Curve1=ArrayOfCurves(j);
|
||||||
if ( (j==(nb_curve-1)) &&(Need2DegRepara(ArrayOfCurves))){
|
if ( (j==(nb_curve-1)) && (NeedDoubleDegRepara)){
|
||||||
const Standard_Integer aNewCurveDegree = Min(2 * Curve1->Degree(), Geom2d_BSplineCurve::MaxDegree());
|
const Standard_Integer aNewCurveDegree = 2 * Curve1->Degree();
|
||||||
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
||||||
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
||||||
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
||||||
@ -1159,7 +1167,7 @@ void Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve& ArrayOf
|
|||||||
const TColStd_Array1OfReal& ArrayOfToler,
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
Handle(TColGeom2d_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
Handle(TColGeom2d_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
||||||
const Standard_Boolean ClosedFlag,
|
Standard_Boolean& ClosedFlag,
|
||||||
const Standard_Real ClosedTolerance)
|
const Standard_Real ClosedTolerance)
|
||||||
{
|
{
|
||||||
ConcatC1(ArrayOfCurves,
|
ConcatC1(ArrayOfCurves,
|
||||||
@ -1179,7 +1187,7 @@ void Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve& ArrayOf
|
|||||||
const TColStd_Array1OfReal& ArrayOfToler,
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
Handle(TColGeom2d_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
Handle(TColGeom2d_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
||||||
const Standard_Boolean ClosedFlag,
|
Standard_Boolean& ClosedFlag,
|
||||||
const Standard_Real ClosedTolerance,
|
const Standard_Real ClosedTolerance,
|
||||||
const Standard_Real AngularTolerance)
|
const Standard_Real AngularTolerance)
|
||||||
|
|
||||||
@ -1260,6 +1268,14 @@ void Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve& ArrayOf
|
|||||||
Pretreatment(ArrayOfCurves);
|
Pretreatment(ArrayOfCurves);
|
||||||
Standard_Real aPolynomialCoefficient[3];
|
Standard_Real aPolynomialCoefficient[3];
|
||||||
|
|
||||||
|
Standard_Boolean NeedDoubleDegRepara = Need2DegRepara(ArrayOfCurves);
|
||||||
|
if (nb_group==1 && ClosedFlag && NeedDoubleDegRepara)
|
||||||
|
{
|
||||||
|
Curve1 = ArrayOfCurves(nb_curve-1);
|
||||||
|
if (Curve1->Degree() > Geom2d_BSplineCurve::MaxDegree()/2)
|
||||||
|
ClosedFlag = Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
if ((nb_group==1) && (ClosedFlag)){ //traitement d'un cas particulier
|
if ((nb_group==1) && (ClosedFlag)){ //traitement d'un cas particulier
|
||||||
ArrayOfIndices->SetValue(0,0);
|
ArrayOfIndices->SetValue(0,0);
|
||||||
ArrayOfIndices->SetValue(1,0);
|
ArrayOfIndices->SetValue(1,0);
|
||||||
@ -1277,12 +1293,12 @@ void Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve& ArrayOf
|
|||||||
else
|
else
|
||||||
Curve1=ArrayOfCurves(j);
|
Curve1=ArrayOfCurves(j);
|
||||||
|
|
||||||
const Standard_Integer aNewCurveDegree = Min(2 * Curve1->Degree(), Geom2d_BSplineCurve::MaxDegree());
|
const Standard_Integer aNewCurveDegree = 2 * Curve1->Degree();
|
||||||
|
|
||||||
if (j==0) //initialisation en debut de groupe
|
if (j==0) //initialisation en debut de groupe
|
||||||
Curve2=Curve1;
|
Curve2=Curve1;
|
||||||
else{
|
else{
|
||||||
if ( (j==(nb_curve-1)) &&(Need2DegRepara(ArrayOfCurves))){
|
if ( (j==(nb_curve-1)) && (NeedDoubleDegRepara)){
|
||||||
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
||||||
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
||||||
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
||||||
@ -1463,8 +1479,8 @@ void Geom2dConvert::C0BSplineToC1BSplineCurve(Handle(Geom2d_BSplineCurve)& BS,
|
|||||||
|
|
||||||
BS->D1(BS->FirstParameter(),point1,V1); //a verifier
|
BS->D1(BS->FirstParameter(),point1,V1); //a verifier
|
||||||
BS->D1(BS->LastParameter(),point2,V2);
|
BS->D1(BS->LastParameter(),point2,V2);
|
||||||
|
|
||||||
if ((point1.SquareDistance(point2) < gp::Resolution()) &&
|
if ((point1.SquareDistance(point2) < tolerance) &&
|
||||||
(V1.IsParallel(V2, anAngularToler)))
|
(V1.IsParallel(V2, anAngularToler)))
|
||||||
{
|
{
|
||||||
closed_flag = Standard_True;
|
closed_flag = Standard_True;
|
||||||
@ -1555,7 +1571,7 @@ void Geom2dConvert::C0BSplineToArrayOfC1BSplineCurve(const Handle(Geom2d_BSpline
|
|||||||
BS->D1(BS->FirstParameter(),point1,V1);
|
BS->D1(BS->FirstParameter(),point1,V1);
|
||||||
BS->D1(BS->LastParameter(),point2,V2);
|
BS->D1(BS->LastParameter(),point2,V2);
|
||||||
|
|
||||||
if (((point1.SquareDistance(point2) < gp::Resolution())) &&
|
if (((point1.SquareDistance(point2) < Tolerance)) &&
|
||||||
(V1.IsParallel(V2, AngularTolerance)))
|
(V1.IsParallel(V2, AngularTolerance)))
|
||||||
{
|
{
|
||||||
closed_flag = Standard_True;
|
closed_flag = Standard_True;
|
||||||
|
@ -83,7 +83,10 @@ public:
|
|||||||
//! Raised if FromK1 or ToK2 are out of the bounds
|
//! Raised if FromK1 or ToK2 are out of the bounds
|
||||||
//! [FirstUKnotIndex, LastUKnotIndex]
|
//! [FirstUKnotIndex, LastUKnotIndex]
|
||||||
//! Raised if FromK1 = ToK2
|
//! Raised if FromK1 = ToK2
|
||||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) SplitBSplineCurve (const Handle(Geom2d_BSplineCurve)& C, const Standard_Integer FromK1, const Standard_Integer ToK2, const Standard_Boolean SameOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom2d_BSplineCurve) SplitBSplineCurve (const Handle(Geom2d_BSplineCurve)& C,
|
||||||
|
const Standard_Integer FromK1,
|
||||||
|
const Standard_Integer ToK2,
|
||||||
|
const Standard_Boolean SameOrientation = Standard_True);
|
||||||
|
|
||||||
|
|
||||||
//! This function computes the segment of B-spline curve between the
|
//! This function computes the segment of B-spline curve between the
|
||||||
@ -101,7 +104,11 @@ public:
|
|||||||
//! curve (The tolerance criterion is ParametricTolerance).
|
//! curve (The tolerance criterion is ParametricTolerance).
|
||||||
//! Raised if Abs (FromU1 - ToU2) <= ParametricTolerance
|
//! Raised if Abs (FromU1 - ToU2) <= ParametricTolerance
|
||||||
//! Raised if ParametricTolerance < Resolution from gp.
|
//! Raised if ParametricTolerance < Resolution from gp.
|
||||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) SplitBSplineCurve (const Handle(Geom2d_BSplineCurve)& C, const Standard_Real FromU1, const Standard_Real ToU2, const Standard_Real ParametricTolerance, const Standard_Boolean SameOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom2d_BSplineCurve) SplitBSplineCurve (const Handle(Geom2d_BSplineCurve)& C,
|
||||||
|
const Standard_Real FromU1,
|
||||||
|
const Standard_Real ToU2,
|
||||||
|
const Standard_Real ParametricTolerance,
|
||||||
|
const Standard_Boolean SameOrientation = Standard_True);
|
||||||
|
|
||||||
//! This function converts a non infinite curve from
|
//! This function converts a non infinite curve from
|
||||||
//! Geom into a B-spline curve. C must be an ellipse or a
|
//! Geom into a B-spline curve. C must be an ellipse or a
|
||||||
@ -167,7 +174,8 @@ public:
|
|||||||
//! respectively the first and the last parameters of the
|
//! respectively the first and the last parameters of the
|
||||||
//! trimmed curve (this method of parameterization
|
//! trimmed curve (this method of parameterization
|
||||||
//! cannot be used to convert a quasi-complete circle or ellipse).
|
//! cannot be used to convert a quasi-complete circle or ellipse).
|
||||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) CurveToBSplineCurve (const Handle(Geom2d_Curve)& C, const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
|
Standard_EXPORT static Handle(Geom2d_BSplineCurve) CurveToBSplineCurve (const Handle(Geom2d_Curve)& C,
|
||||||
|
const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
|
||||||
|
|
||||||
//! This Method concatenates G1 the ArrayOfCurves as far
|
//! This Method concatenates G1 the ArrayOfCurves as far
|
||||||
//! as it is possible.
|
//! as it is possible.
|
||||||
@ -175,11 +183,17 @@ public:
|
|||||||
//! ArrayOfToler contains the biggest tolerance of the two
|
//! ArrayOfToler contains the biggest tolerance of the two
|
||||||
//! points shared by two consecutives curves.
|
//! points shared by two consecutives curves.
|
||||||
//! Its dimension: [0..N-2]
|
//! Its dimension: [0..N-2]
|
||||||
//! ClosedTolerance indicates if the ArrayOfCurves is closed.
|
//! ClosedFlag indicates if the ArrayOfCurves is closed.
|
||||||
//! In this case ClosedTolerance contains the biggest tolerance
|
//! In this case ClosedTolerance contains the biggest tolerance
|
||||||
//! of the two points which are at the closure.
|
//! of the two points which are at the closure.
|
||||||
//! Otherwise its value is 0.0
|
//! Otherwise its value is 0.0
|
||||||
Standard_EXPORT static void ConcatG1 (TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves, const TColStd_Array1OfReal& ArrayOfToler, Handle(TColGeom2d_HArray1OfBSplineCurve)& ArrayOfConcatenated, const Standard_Boolean ClosedFlag, const Standard_Real ClosedTolerance);
|
//! ClosedFlag becomes False on the output
|
||||||
|
//! if it is impossible to build closed curve.
|
||||||
|
Standard_EXPORT static void ConcatG1 (TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
|
Handle(TColGeom2d_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
|
Standard_Boolean& ClosedFlag,
|
||||||
|
const Standard_Real ClosedTolerance);
|
||||||
|
|
||||||
//! This Method concatenates C1 the ArrayOfCurves as far
|
//! This Method concatenates C1 the ArrayOfCurves as far
|
||||||
//! as it is possible.
|
//! as it is possible.
|
||||||
@ -187,11 +201,18 @@ public:
|
|||||||
//! ArrayOfToler contains the biggest tolerance of the two
|
//! ArrayOfToler contains the biggest tolerance of the two
|
||||||
//! points shared by two consecutives curves.
|
//! points shared by two consecutives curves.
|
||||||
//! Its dimension: [0..N-2]
|
//! Its dimension: [0..N-2]
|
||||||
//! ClosedTolerance indicates if the ArrayOfCurves is closed.
|
//! ClosedFlag indicates if the ArrayOfCurves is closed.
|
||||||
//! In this case ClosedTolerance contains the biggest tolerance
|
//! In this case ClosedTolerance contains the biggest tolerance
|
||||||
//! of the two points which are at the closure.
|
//! of the two points which are at the closure.
|
||||||
//! Otherwise its value is 0.0
|
//! Otherwise its value is 0.0
|
||||||
Standard_EXPORT static void ConcatC1 (TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves, const TColStd_Array1OfReal& ArrayOfToler, Handle(TColStd_HArray1OfInteger)& ArrayOfIndices, Handle(TColGeom2d_HArray1OfBSplineCurve)& ArrayOfConcatenated, const Standard_Boolean ClosedFlag, const Standard_Real ClosedTolerance);
|
//! ClosedFlag becomes False on the output
|
||||||
|
//! if it is impossible to build closed curve.
|
||||||
|
Standard_EXPORT static void ConcatC1 (TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
|
Handle(TColGeom2d_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
|
Standard_Boolean& ClosedFlag,
|
||||||
|
const Standard_Real ClosedTolerance);
|
||||||
|
|
||||||
//! This Method concatenates C1 the ArrayOfCurves as far
|
//! This Method concatenates C1 the ArrayOfCurves as far
|
||||||
//! as it is possible.
|
//! as it is possible.
|
||||||
@ -199,29 +220,43 @@ public:
|
|||||||
//! ArrayOfToler contains the biggest tolerance of the two
|
//! ArrayOfToler contains the biggest tolerance of the two
|
||||||
//! points shared by two consecutives curves.
|
//! points shared by two consecutives curves.
|
||||||
//! Its dimension: [0..N-2]
|
//! Its dimension: [0..N-2]
|
||||||
//! ClosedTolerance indicates if the ArrayOfCurves is closed.
|
//! ClosedFlag indicates if the ArrayOfCurves is closed.
|
||||||
//! In this case ClosedTolerance contains the biggest tolerance
|
//! In this case ClosedTolerance contains the biggest tolerance
|
||||||
//! of the two points which are at the closure.
|
//! of the two points which are at the closure.
|
||||||
//! Otherwise its value is 0.0
|
//! Otherwise its value is 0.0
|
||||||
Standard_EXPORT static void ConcatC1 (TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves, const TColStd_Array1OfReal& ArrayOfToler, Handle(TColStd_HArray1OfInteger)& ArrayOfIndices, Handle(TColGeom2d_HArray1OfBSplineCurve)& ArrayOfConcatenated, const Standard_Boolean ClosedFlag, const Standard_Real ClosedTolerance, const Standard_Real AngularTolerance);
|
//! ClosedFlag becomes False on the output
|
||||||
|
//! if it is impossible to build closed curve.
|
||||||
|
Standard_EXPORT static void ConcatC1 (TColGeom2d_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
|
Handle(TColGeom2d_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
|
Standard_Boolean& ClosedFlag,
|
||||||
|
const Standard_Real ClosedTolerance,
|
||||||
|
const Standard_Real AngularTolerance);
|
||||||
|
|
||||||
//! This Method reduces as far as it is possible the
|
//! This Method reduces as far as it is possible the
|
||||||
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
||||||
//! It returns a new BSpline which could still be C0.
|
//! It returns a new BSpline which could still be C0.
|
||||||
//! tolerance is a geometrical tolerance
|
//! tolerance is a geometrical tolerance
|
||||||
Standard_EXPORT static void C0BSplineToC1BSplineCurve (Handle(Geom2d_BSplineCurve)& BS, const Standard_Real Tolerance);
|
Standard_EXPORT static void C0BSplineToC1BSplineCurve (Handle(Geom2d_BSplineCurve)& BS,
|
||||||
|
const Standard_Real Tolerance);
|
||||||
|
|
||||||
//! This Method reduces as far as it is possible the
|
//! This Method reduces as far as it is possible the
|
||||||
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
||||||
//! It returns an array of BSpline C1.
|
//! It returns an array of BSpline C1.
|
||||||
//! Tolerance is a geometrical tolerance
|
//! Tolerance is a geometrical tolerance
|
||||||
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS, Handle(TColGeom2d_HArray1OfBSplineCurve)& tabBS, const Standard_Real Tolerance);
|
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS,
|
||||||
|
Handle(TColGeom2d_HArray1OfBSplineCurve)& tabBS,
|
||||||
|
const Standard_Real Tolerance);
|
||||||
|
|
||||||
//! This Method reduces as far as it is possible the
|
//! This Method reduces as far as it is possible the
|
||||||
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
||||||
//! It returns an array of BSpline C1.
|
//! It returns an array of BSpline C1.
|
||||||
//! tolerance is a geometrical tolerance
|
//! tolerance is a geometrical tolerance
|
||||||
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS, Handle(TColGeom2d_HArray1OfBSplineCurve)& tabBS, const Standard_Real AngularTolerance, const Standard_Real Tolerance);
|
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS,
|
||||||
|
Handle(TColGeom2d_HArray1OfBSplineCurve)& tabBS,
|
||||||
|
const Standard_Real AngularTolerance,
|
||||||
|
const Standard_Real Tolerance);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -785,7 +785,7 @@ private:
|
|||||||
void GeomConvert::ConcatG1(TColGeom_Array1OfBSplineCurve& ArrayOfCurves,
|
void GeomConvert::ConcatG1(TColGeom_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
const TColStd_Array1OfReal& ArrayOfToler,
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
Handle(TColGeom_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
Handle(TColGeom_HArray1OfBSplineCurve) & ArrayOfConcatenated,
|
||||||
const Standard_Boolean ClosedG1Flag,
|
Standard_Boolean& ClosedG1Flag,
|
||||||
const Standard_Real ClosedTolerance)
|
const Standard_Real ClosedTolerance)
|
||||||
|
|
||||||
{Standard_Integer nb_curve=ArrayOfCurves.Length(),
|
{Standard_Integer nb_curve=ArrayOfCurves.Length(),
|
||||||
@ -855,6 +855,14 @@ private:
|
|||||||
Pretreatment(ArrayOfCurves);
|
Pretreatment(ArrayOfCurves);
|
||||||
Standard_Real aPolynomialCoefficient[3];
|
Standard_Real aPolynomialCoefficient[3];
|
||||||
|
|
||||||
|
Standard_Boolean NeedDoubleDegRepara = Need2DegRepara(ArrayOfCurves);
|
||||||
|
if (nb_group==1 && ClosedG1Flag && NeedDoubleDegRepara)
|
||||||
|
{
|
||||||
|
Curve1 = ArrayOfCurves(nb_curve-1);
|
||||||
|
if (Curve1->Degree() > Geom2d_BSplineCurve::MaxDegree()/2)
|
||||||
|
ClosedG1Flag = Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
if ((nb_group==1) && (ClosedG1Flag)){ //treatment of a particular case
|
if ((nb_group==1) && (ClosedG1Flag)){ //treatment of a particular case
|
||||||
indexmin=Indexmin(ArrayOfCurves);
|
indexmin=Indexmin(ArrayOfCurves);
|
||||||
if (indexmin!=(ArrayOfCurves.Length()-1))
|
if (indexmin!=(ArrayOfCurves.Length()-1))
|
||||||
@ -866,7 +874,7 @@ private:
|
|||||||
Curve2=ArrayOfCurves(0);
|
Curve2=ArrayOfCurves(0);
|
||||||
for (j=1;j<=nb_curve-1;j++){ //secondary loop inside each group
|
for (j=1;j<=nb_curve-1;j++){ //secondary loop inside each group
|
||||||
Curve1=ArrayOfCurves(j);
|
Curve1=ArrayOfCurves(j);
|
||||||
if ( (j==(nb_curve-1)) &&(Need2DegRepara(ArrayOfCurves))){
|
if ( (j==(nb_curve-1)) && (NeedDoubleDegRepara)){
|
||||||
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
||||||
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
||||||
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
||||||
@ -983,7 +991,7 @@ void GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve& ArrayOfCurv
|
|||||||
const TColStd_Array1OfReal& ArrayOfToler,
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
const Standard_Boolean ClosedG1Flag,
|
Standard_Boolean& ClosedG1Flag,
|
||||||
const Standard_Real ClosedTolerance)
|
const Standard_Real ClosedTolerance)
|
||||||
{
|
{
|
||||||
ConcatC1(ArrayOfCurves,
|
ConcatC1(ArrayOfCurves,
|
||||||
@ -1003,7 +1011,7 @@ void GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve& ArrayOfCurv
|
|||||||
const TColStd_Array1OfReal& ArrayOfToler,
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
const Standard_Boolean ClosedG1Flag,
|
Standard_Boolean& ClosedG1Flag,
|
||||||
const Standard_Real ClosedTolerance,
|
const Standard_Real ClosedTolerance,
|
||||||
const Standard_Real AngularTolerance)
|
const Standard_Real AngularTolerance)
|
||||||
|
|
||||||
@ -1082,6 +1090,14 @@ void GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve& ArrayOfCurv
|
|||||||
Pretreatment(ArrayOfCurves);
|
Pretreatment(ArrayOfCurves);
|
||||||
Standard_Real aPolynomialCoefficient[3];
|
Standard_Real aPolynomialCoefficient[3];
|
||||||
|
|
||||||
|
Standard_Boolean NeedDoubleDegRepara = Need2DegRepara(ArrayOfCurves);
|
||||||
|
if (nb_group==1 && ClosedG1Flag && NeedDoubleDegRepara)
|
||||||
|
{
|
||||||
|
Curve1 = ArrayOfCurves(nb_curve-1);
|
||||||
|
if (Curve1->Degree() > Geom2d_BSplineCurve::MaxDegree()/2)
|
||||||
|
ClosedG1Flag = Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
if ((nb_group==1) && (ClosedG1Flag)){ //treatment of a particular case
|
if ((nb_group==1) && (ClosedG1Flag)){ //treatment of a particular case
|
||||||
ArrayOfIndices->SetValue(0,0);
|
ArrayOfIndices->SetValue(0,0);
|
||||||
ArrayOfIndices->SetValue(1,0);
|
ArrayOfIndices->SetValue(1,0);
|
||||||
@ -1101,7 +1117,7 @@ void GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve& ArrayOfCurv
|
|||||||
if (j==0) //initialisation at the begining of the loop
|
if (j==0) //initialisation at the begining of the loop
|
||||||
Curve2=Curve1;
|
Curve2=Curve1;
|
||||||
else{
|
else{
|
||||||
if ( (j==(nb_curve-1)) &&(Need2DegRepara(ArrayOfCurves))){
|
if ( (j==(nb_curve-1)) && (NeedDoubleDegRepara)){
|
||||||
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
Curve2->D1(Curve2->LastParameter(),Pint,Vec1);
|
||||||
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
Curve1->D1(Curve1->FirstParameter(),Pint,Vec2);
|
||||||
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
lambda=Vec2.Magnitude()/Vec1.Magnitude();
|
||||||
|
@ -91,7 +91,10 @@ public:
|
|||||||
//! Raised if FromK1 = ToK2
|
//! Raised if FromK1 = ToK2
|
||||||
//! Raised if FromK1 or ToK2 are out of the bounds
|
//! Raised if FromK1 or ToK2 are out of the bounds
|
||||||
//! [FirstUKnotIndex, LastUKnotIndex]
|
//! [FirstUKnotIndex, LastUKnotIndex]
|
||||||
Standard_EXPORT static Handle(Geom_BSplineCurve) SplitBSplineCurve (const Handle(Geom_BSplineCurve)& C, const Standard_Integer FromK1, const Standard_Integer ToK2, const Standard_Boolean SameOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom_BSplineCurve) SplitBSplineCurve (const Handle(Geom_BSplineCurve)& C,
|
||||||
|
const Standard_Integer FromK1,
|
||||||
|
const Standard_Integer ToK2,
|
||||||
|
const Standard_Boolean SameOrientation = Standard_True);
|
||||||
|
|
||||||
|
|
||||||
//! This function computes the segment of B-spline curve between the
|
//! This function computes the segment of B-spline curve between the
|
||||||
@ -109,7 +112,11 @@ public:
|
|||||||
//! curve (The tolerance criterion is ParametricTolerance).
|
//! curve (The tolerance criterion is ParametricTolerance).
|
||||||
//! Raised if Abs (FromU1 - ToU2) <= ParametricTolerance
|
//! Raised if Abs (FromU1 - ToU2) <= ParametricTolerance
|
||||||
//! Raised if ParametricTolerance < Resolution from gp.
|
//! Raised if ParametricTolerance < Resolution from gp.
|
||||||
Standard_EXPORT static Handle(Geom_BSplineCurve) SplitBSplineCurve (const Handle(Geom_BSplineCurve)& C, const Standard_Real FromU1, const Standard_Real ToU2, const Standard_Real ParametricTolerance, const Standard_Boolean SameOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom_BSplineCurve) SplitBSplineCurve (const Handle(Geom_BSplineCurve)& C,
|
||||||
|
const Standard_Real FromU1,
|
||||||
|
const Standard_Real ToU2,
|
||||||
|
const Standard_Real ParametricTolerance,
|
||||||
|
const Standard_Boolean SameOrientation = Standard_True);
|
||||||
|
|
||||||
|
|
||||||
//! Computes the B-spline surface patche between the knots values
|
//! Computes the B-spline surface patche between the knots values
|
||||||
@ -126,7 +133,13 @@ public:
|
|||||||
//! [FirstUKnotIndex, LastUKnotIndex]
|
//! [FirstUKnotIndex, LastUKnotIndex]
|
||||||
//! FromVK1 or ToVK2 are out of the bounds
|
//! FromVK1 or ToVK2 are out of the bounds
|
||||||
//! [FirstVKnotIndex, LastVKnotIndex]
|
//! [FirstVKnotIndex, LastVKnotIndex]
|
||||||
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S, const Standard_Integer FromUK1, const Standard_Integer ToUK2, const Standard_Integer FromVK1, const Standard_Integer ToVK2, const Standard_Boolean SameUOrientation = Standard_True, const Standard_Boolean SameVOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S,
|
||||||
|
const Standard_Integer FromUK1,
|
||||||
|
const Standard_Integer ToUK2,
|
||||||
|
const Standard_Integer FromVK1,
|
||||||
|
const Standard_Integer ToVK2,
|
||||||
|
const Standard_Boolean SameUOrientation = Standard_True,
|
||||||
|
const Standard_Boolean SameVOrientation = Standard_True);
|
||||||
|
|
||||||
|
|
||||||
//! This method splits a B-spline surface patche between the
|
//! This method splits a B-spline surface patche between the
|
||||||
@ -141,7 +154,11 @@ public:
|
|||||||
//! FromK1 or ToK2 are out of the bounds
|
//! FromK1 or ToK2 are out of the bounds
|
||||||
//! [FirstUKnotIndex, LastUKnotIndex] in the
|
//! [FirstUKnotIndex, LastUKnotIndex] in the
|
||||||
//! considered parametric direction.
|
//! considered parametric direction.
|
||||||
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S, const Standard_Integer FromK1, const Standard_Integer ToK2, const Standard_Boolean USplit, const Standard_Boolean SameOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S,
|
||||||
|
const Standard_Integer FromK1,
|
||||||
|
const Standard_Integer ToK2,
|
||||||
|
const Standard_Boolean USplit,
|
||||||
|
const Standard_Boolean SameOrientation = Standard_True);
|
||||||
|
|
||||||
|
|
||||||
//! This method computes the B-spline surface patche between the
|
//! This method computes the B-spline surface patche between the
|
||||||
@ -162,7 +179,14 @@ public:
|
|||||||
//! Raised if Abs (FromU1 - ToU2) <= ParametricTolerance or
|
//! Raised if Abs (FromU1 - ToU2) <= ParametricTolerance or
|
||||||
//! Abs (FromV1 - ToV2) <= ParametricTolerance.
|
//! Abs (FromV1 - ToV2) <= ParametricTolerance.
|
||||||
//! Raised if ParametricTolerance < Resolution.
|
//! Raised if ParametricTolerance < Resolution.
|
||||||
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S, const Standard_Real FromU1, const Standard_Real ToU2, const Standard_Real FromV1, const Standard_Real ToV2, const Standard_Real ParametricTolerance, const Standard_Boolean SameUOrientation = Standard_True, const Standard_Boolean SameVOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S,
|
||||||
|
const Standard_Real FromU1,
|
||||||
|
const Standard_Real ToU2,
|
||||||
|
const Standard_Real FromV1,
|
||||||
|
const Standard_Real ToV2,
|
||||||
|
const Standard_Real ParametricTolerance,
|
||||||
|
const Standard_Boolean SameUOrientation = Standard_True,
|
||||||
|
const Standard_Boolean SameVOrientation = Standard_True);
|
||||||
|
|
||||||
|
|
||||||
//! This method splits the B-spline surface S in one direction
|
//! This method splits the B-spline surface S in one direction
|
||||||
@ -182,7 +206,12 @@ public:
|
|||||||
//! Raises if FromParam1 or ToParam2 are out of the parametric bounds
|
//! Raises if FromParam1 or ToParam2 are out of the parametric bounds
|
||||||
//! of the surface in the considered direction.
|
//! of the surface in the considered direction.
|
||||||
//! Raises if Abs (FromParam1 - ToParam2) <= ParametricTolerance.
|
//! Raises if Abs (FromParam1 - ToParam2) <= ParametricTolerance.
|
||||||
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S, const Standard_Real FromParam1, const Standard_Real ToParam2, const Standard_Boolean USplit, const Standard_Real ParametricTolerance, const Standard_Boolean SameOrientation = Standard_True);
|
Standard_EXPORT static Handle(Geom_BSplineSurface) SplitBSplineSurface (const Handle(Geom_BSplineSurface)& S,
|
||||||
|
const Standard_Real FromParam1,
|
||||||
|
const Standard_Real ToParam2,
|
||||||
|
const Standard_Boolean USplit,
|
||||||
|
const Standard_Real ParametricTolerance,
|
||||||
|
const Standard_Boolean SameOrientation = Standard_True);
|
||||||
|
|
||||||
//! This function converts a non infinite curve from
|
//! This function converts a non infinite curve from
|
||||||
//! Geom into a B-spline curve. C must be an ellipse or a
|
//! Geom into a B-spline curve. C must be an ellipse or a
|
||||||
@ -249,7 +278,8 @@ public:
|
|||||||
//! respectively the first and the last parameters of the
|
//! respectively the first and the last parameters of the
|
||||||
//! trimmed curve (this method of parameterization
|
//! trimmed curve (this method of parameterization
|
||||||
//! cannot be used to convert a quasi-complete circle or ellipse).
|
//! cannot be used to convert a quasi-complete circle or ellipse).
|
||||||
Standard_EXPORT static Handle(Geom_BSplineCurve) CurveToBSplineCurve (const Handle(Geom_Curve)& C, const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
|
Standard_EXPORT static Handle(Geom_BSplineCurve) CurveToBSplineCurve (const Handle(Geom_Curve)& C,
|
||||||
|
const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
|
||||||
|
|
||||||
|
|
||||||
//! This algorithm converts a non infinite surface from Geom
|
//! This algorithm converts a non infinite surface from Geom
|
||||||
@ -268,11 +298,17 @@ public:
|
|||||||
//! ArrayOfToler contains the biggest tolerance of the two
|
//! ArrayOfToler contains the biggest tolerance of the two
|
||||||
//! points shared by two consecutives curves.
|
//! points shared by two consecutives curves.
|
||||||
//! Its dimension: [0..N-2]
|
//! Its dimension: [0..N-2]
|
||||||
//! ClosedG1 indicates if the ArrayOfCurves is closed.
|
//! ClosedFlag indicates if the ArrayOfCurves is closed.
|
||||||
//! In this case ClosedG1 contains the biggest tolerance
|
//! In this case ClosedTolerance contains the biggest tolerance
|
||||||
//! of the two points which are at the closure.
|
//! of the two points which are at the closure.
|
||||||
//! Otherwise its value is 0.0
|
//! Otherwise its value is 0.0
|
||||||
Standard_EXPORT static void ConcatG1 (TColGeom_Array1OfBSplineCurve& ArrayOfCurves, const TColStd_Array1OfReal& ArrayOfToler, Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated, const Standard_Boolean ClosedG1Flag, const Standard_Real ClosedTolerance);
|
//! ClosedFlag becomes False on the output
|
||||||
|
//! if it is impossible to build closed curve.
|
||||||
|
Standard_EXPORT static void ConcatG1 (TColGeom_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
|
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
|
Standard_Boolean& ClosedFlag,
|
||||||
|
const Standard_Real ClosedTolerance);
|
||||||
|
|
||||||
//! This Method concatenates C1 the ArrayOfCurves as far
|
//! This Method concatenates C1 the ArrayOfCurves as far
|
||||||
//! as it is possible.
|
//! as it is possible.
|
||||||
@ -280,11 +316,18 @@ public:
|
|||||||
//! ArrayOfToler contains the biggest tolerance of the two
|
//! ArrayOfToler contains the biggest tolerance of the two
|
||||||
//! points shared by two consecutives curves.
|
//! points shared by two consecutives curves.
|
||||||
//! Its dimension: [0..N-2]
|
//! Its dimension: [0..N-2]
|
||||||
//! ClosedG1 indicates if the ArrayOfCurves is closed.
|
//! ClosedFlag indicates if the ArrayOfCurves is closed.
|
||||||
//! In this case ClosedG1 contains the biggest tolerance
|
//! In this case ClosedTolerance contains the biggest tolerance
|
||||||
//! of the two points which are at the closure.
|
//! of the two points which are at the closure.
|
||||||
//! Otherwise its value is 0.0
|
//! Otherwise its value is 0.0
|
||||||
Standard_EXPORT static void ConcatC1 (TColGeom_Array1OfBSplineCurve& ArrayOfCurves, const TColStd_Array1OfReal& ArrayOfToler, Handle(TColStd_HArray1OfInteger)& ArrayOfIndices, Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated, const Standard_Boolean ClosedG1Flag, const Standard_Real ClosedTolerance);
|
//! ClosedFlag becomes False on the output
|
||||||
|
//! if it is impossible to build closed curve.
|
||||||
|
Standard_EXPORT static void ConcatC1 (TColGeom_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
|
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
|
Standard_Boolean& ClosedFlag,
|
||||||
|
const Standard_Real ClosedTolerance);
|
||||||
|
|
||||||
//! This Method concatenates C1 the ArrayOfCurves as far
|
//! This Method concatenates C1 the ArrayOfCurves as far
|
||||||
//! as it is possible.
|
//! as it is possible.
|
||||||
@ -292,11 +335,19 @@ public:
|
|||||||
//! ArrayOfToler contains the biggest tolerance of the two
|
//! ArrayOfToler contains the biggest tolerance of the two
|
||||||
//! points shared by two consecutives curves.
|
//! points shared by two consecutives curves.
|
||||||
//! Its dimension: [0..N-2]
|
//! Its dimension: [0..N-2]
|
||||||
//! ClosedG1 indicates if the ArrayOfCurves is closed.
|
//! ClosedFlag indicates if the ArrayOfCurves is closed.
|
||||||
//! In this case ClosedG1 contains the biggest tolerance
|
//! In this case ClosedTolerance contains the biggest tolerance
|
||||||
//! of the two points which are at the closure.
|
//! of the two points which are at the closure.
|
||||||
//! Otherwise its value is 0.0
|
//! Otherwise its value is 0.0
|
||||||
Standard_EXPORT static void ConcatC1 (TColGeom_Array1OfBSplineCurve& ArrayOfCurves, const TColStd_Array1OfReal& ArrayOfToler, Handle(TColStd_HArray1OfInteger)& ArrayOfIndices, Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated, const Standard_Boolean ClosedG1Flag, const Standard_Real ClosedTolerance, const Standard_Real AngularTolerance);
|
//! ClosedFlag becomes False on the output
|
||||||
|
//! if it is impossible to build closed curve.
|
||||||
|
Standard_EXPORT static void ConcatC1 (TColGeom_Array1OfBSplineCurve& ArrayOfCurves,
|
||||||
|
const TColStd_Array1OfReal& ArrayOfToler,
|
||||||
|
Handle(TColStd_HArray1OfInteger)& ArrayOfIndices,
|
||||||
|
Handle(TColGeom_HArray1OfBSplineCurve)& ArrayOfConcatenated,
|
||||||
|
Standard_Boolean& ClosedFlag,
|
||||||
|
const Standard_Real ClosedTolerance,
|
||||||
|
const Standard_Real AngularTolerance);
|
||||||
|
|
||||||
//! This Method reduces as far as it is possible the
|
//! This Method reduces as far as it is possible the
|
||||||
//! multiplicities of the knots of the BSpline BS.(keeping the
|
//! multiplicities of the knots of the BSpline BS.(keeping the
|
||||||
@ -305,12 +356,16 @@ public:
|
|||||||
//! The Angular toleranceis in radians and mesures the angle of
|
//! The Angular toleranceis in radians and mesures the angle of
|
||||||
//! the tangents on the left and on the right to decide if the
|
//! the tangents on the left and on the right to decide if the
|
||||||
//! curve is G1 or not at a given point
|
//! curve is G1 or not at a given point
|
||||||
Standard_EXPORT static void C0BSplineToC1BSplineCurve (Handle(Geom_BSplineCurve)& BS, const Standard_Real tolerance, const Standard_Real AngularTolerance = 1.0e-7);
|
Standard_EXPORT static void C0BSplineToC1BSplineCurve (Handle(Geom_BSplineCurve)& BS,
|
||||||
|
const Standard_Real tolerance,
|
||||||
|
const Standard_Real AngularTolerance = 1.0e-7);
|
||||||
|
|
||||||
//! This Method reduces as far as it is possible the
|
//! This Method reduces as far as it is possible the
|
||||||
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
//! multiplicities of the knots of the BSpline BS.(keeping the geometry).
|
||||||
//! It returns an array of BSpline C1. tolerance is a geometrical tolerance.
|
//! It returns an array of BSpline C1. tolerance is a geometrical tolerance.
|
||||||
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom_BSplineCurve)& BS, Handle(TColGeom_HArray1OfBSplineCurve)& tabBS, const Standard_Real tolerance);
|
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom_BSplineCurve)& BS,
|
||||||
|
Handle(TColGeom_HArray1OfBSplineCurve)& tabBS,
|
||||||
|
const Standard_Real tolerance);
|
||||||
|
|
||||||
//! This Method reduces as far as it is possible the
|
//! This Method reduces as far as it is possible the
|
||||||
//! multiplicities of the knots of the BSpline BS.(keeping the
|
//! multiplicities of the knots of the BSpline BS.(keeping the
|
||||||
@ -319,7 +374,10 @@ public:
|
|||||||
//! The Angular tolerance is in radians and mesures the angle of
|
//! The Angular tolerance is in radians and mesures the angle of
|
||||||
//! the tangents on the left and on the right to decide if the curve
|
//! the tangents on the left and on the right to decide if the curve
|
||||||
//! is C1 or not at a given point
|
//! is C1 or not at a given point
|
||||||
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom_BSplineCurve)& BS, Handle(TColGeom_HArray1OfBSplineCurve)& tabBS, const Standard_Real AngularTolerance, const Standard_Real tolerance);
|
Standard_EXPORT static void C0BSplineToArrayOfC1BSplineCurve (const Handle(Geom_BSplineCurve)& BS,
|
||||||
|
Handle(TColGeom_HArray1OfBSplineCurve)& tabBS,
|
||||||
|
const Standard_Real AngularTolerance,
|
||||||
|
const Standard_Real tolerance);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3901,11 +3901,12 @@ Standard_Integer OCC26446 (Draw_Interpretor& di,
|
|||||||
aCurves.SetValue(1, aCurve2);
|
aCurves.SetValue(1, aCurve2);
|
||||||
aTolerances.SetValue(0, aTolConf);
|
aTolerances.SetValue(0, aTolConf);
|
||||||
|
|
||||||
|
Standard_Boolean closed_flag = Standard_False;
|
||||||
GeomConvert::ConcatC1(aCurves,
|
GeomConvert::ConcatC1(aCurves,
|
||||||
aTolerances,
|
aTolerances,
|
||||||
anIndices,
|
anIndices,
|
||||||
aConcatCurves,
|
aConcatCurves,
|
||||||
Standard_False,
|
closed_flag,
|
||||||
aTolClosure);
|
aTolClosure);
|
||||||
|
|
||||||
Handle(Geom_BSplineCurve) aResult =
|
Handle(Geom_BSplineCurve) aResult =
|
||||||
|
@ -477,11 +477,12 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
|
|||||||
}
|
}
|
||||||
Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves
|
Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves
|
||||||
Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex
|
Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex
|
||||||
|
Standard_Boolean closed_flag = Standard_False;
|
||||||
GeomConvert::ConcatC1(tab_c3d,
|
GeomConvert::ConcatC1(tab_c3d,
|
||||||
tabtolvertex,
|
tabtolvertex,
|
||||||
ArrayOfIndices,
|
ArrayOfIndices,
|
||||||
concatcurve,
|
concatcurve,
|
||||||
Standard_False,
|
closed_flag,
|
||||||
Precision::Confusion()); //C1 concatenation
|
Precision::Confusion()); //C1 concatenation
|
||||||
|
|
||||||
if (concatcurve->Length() > 1)
|
if (concatcurve->Length() > 1)
|
||||||
@ -523,11 +524,12 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
|
|||||||
}
|
}
|
||||||
Handle(TColGeom2d_HArray1OfBSplineCurve) concatc2d; //array of the concatenated curves
|
Handle(TColGeom2d_HArray1OfBSplineCurve) concatc2d; //array of the concatenated curves
|
||||||
Handle(TColStd_HArray1OfInteger) ArrayOfInd2d; //array of the remining Vertex
|
Handle(TColStd_HArray1OfInteger) ArrayOfInd2d; //array of the remining Vertex
|
||||||
|
closed_flag = Standard_False;
|
||||||
Geom2dConvert::ConcatC1(tab_c2d,
|
Geom2dConvert::ConcatC1(tab_c2d,
|
||||||
tabtolvertex,
|
tabtolvertex,
|
||||||
ArrayOfInd2d,
|
ArrayOfInd2d,
|
||||||
concatc2d,
|
concatc2d,
|
||||||
Standard_False,
|
closed_flag,
|
||||||
Precision::Confusion()); //C1 concatenation
|
Precision::Confusion()); //C1 concatenation
|
||||||
|
|
||||||
if (concatc2d->Length() > 1)
|
if (concatc2d->Length() > 1)
|
||||||
|
@ -20,5 +20,7 @@ set log [bopcurves f_1 f_2 -2d]
|
|||||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||||
|
|
||||||
regexp {Tolerance Reached=+([-0-9.+eE]+)} ${log} full Toler
|
regexp {Tolerance Reached=+([-0-9.+eE]+)} ${log} full Toler
|
||||||
checkreal TolReached $Toler 4.60347250530349e-008 0.0 0.1
|
|
||||||
|
|
||||||
|
if { ${Toler} > 1.e-7} {
|
||||||
|
puts "Error: bad tolerance of result"
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user