mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0026468: Out of range exception on current master
Problem with different ranges fixed. test cases update.
This commit is contained in:
@@ -389,9 +389,11 @@ GeomAbs_BSplKnotDistribution Geom_BSplineCurve::KnotDistribution () const
|
||||
|
||||
void Geom_BSplineCurve::Knots (TColStd_Array1OfReal& K) const
|
||||
{
|
||||
Standard_DimensionError_Raise_if
|
||||
(K.Length() != knots->Length(), "Geom_BSplineCurve::Knots");
|
||||
K = knots->Array1();
|
||||
Standard_DomainError_Raise_if (K.Lower() < knots->Lower() ||
|
||||
K.Upper() > knots->Upper(),
|
||||
"Geom_BSplineCurve::Knots");
|
||||
for(Standard_Integer anIdx = K.Lower(); anIdx <= K.Upper(); anIdx++)
|
||||
K(anIdx) = knots->Value(anIdx);
|
||||
}
|
||||
|
||||
const TColStd_Array1OfReal& Geom_BSplineCurve::Knots() const
|
||||
@@ -406,9 +408,11 @@ const TColStd_Array1OfReal& Geom_BSplineCurve::Knots() const
|
||||
|
||||
void Geom_BSplineCurve::KnotSequence (TColStd_Array1OfReal& K) const
|
||||
{
|
||||
Standard_DimensionError_Raise_if
|
||||
(K.Length() != flatknots->Length(), "Geom_BSplineCurve::KnotSequence");
|
||||
K = flatknots->Array1();
|
||||
Standard_DomainError_Raise_if (K.Lower() < flatknots->Lower() ||
|
||||
K.Upper() > flatknots->Upper(),
|
||||
"Geom_BSplineCurve::KnotSequence");
|
||||
for(Standard_Integer anIdx = K.Lower(); anIdx <= K.Upper(); anIdx++)
|
||||
K(anIdx) = flatknots->Value(anIdx);
|
||||
}
|
||||
|
||||
const TColStd_Array1OfReal& Geom_BSplineCurve::KnotSequence() const
|
||||
|
Reference in New Issue
Block a user