diff --git a/src/Geom/Geom_BSplineCurve_1.cxx b/src/Geom/Geom_BSplineCurve_1.cxx index 96f214e08a..eab23c6036 100644 --- a/src/Geom/Geom_BSplineCurve_1.cxx +++ b/src/Geom/Geom_BSplineCurve_1.cxx @@ -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 diff --git a/src/Geom2d/Geom2d_BSplineCurve_1.cxx b/src/Geom2d/Geom2d_BSplineCurve_1.cxx index 07ab27c592..20478f21cf 100644 --- a/src/Geom2d/Geom2d_BSplineCurve_1.cxx +++ b/src/Geom2d/Geom2d_BSplineCurve_1.cxx @@ -397,9 +397,11 @@ GeomAbs_BSplKnotDistribution Geom2d_BSplineCurve::KnotDistribution () const void Geom2d_BSplineCurve::Knots (TColStd_Array1OfReal& K) const { - Standard_DimensionError_Raise_if - (K.Length() != knots->Length(), "Geom2d_BSplineCurve::Knots"); - K = knots->Array1(); + Standard_DomainError_Raise_if (K.Lower() < knots->Lower() || + K.Upper() > knots->Upper(), + "Geom2d_BSplineCurve::Knots"); + for(Standard_Integer anIdx = K.Lower(); anIdx <= K.Upper(); anIdx++) + K(anIdx) = knots->Value(anIdx); } const TColStd_Array1OfReal& Geom2d_BSplineCurve::Knots() const @@ -414,9 +416,11 @@ const TColStd_Array1OfReal& Geom2d_BSplineCurve::Knots() const void Geom2d_BSplineCurve::KnotSequence (TColStd_Array1OfReal& K) const { - Standard_DimensionError_Raise_if - (K.Length() != flatknots->Length(), "Geom2d_BSplineCurve::KnotSequence"); - K = flatknots->Array1(); + Standard_DomainError_Raise_if (K.Lower() < flatknots->Lower() || + K.Upper() > flatknots->Upper(), + "Geom2d_BSplineCurve::KnotSequence"); + for(Standard_Integer anIdx = K.Lower(); anIdx <= K.Upper(); anIdx++) + K(anIdx) = flatknots->Value(anIdx); } const TColStd_Array1OfReal& Geom2d_BSplineCurve::KnotSequence() const diff --git a/tests/bugs/modalg_5/bug23706_20 b/tests/bugs/modalg_5/bug23706_20 index e31b6e085d..a40965a0e7 100644 --- a/tests/bugs/modalg_5/bug23706_20 +++ b/tests/bugs/modalg_5/bug23706_20 @@ -9,7 +9,7 @@ puts "" set x 3.9999965207720098 set y 5.0000000629157348 set z 5.0002142991819367 -set pp_ch 0.99715423329884956 +set pp_ch 0.99715423329884789 restore [locate_data_file bug23706_c2.draw] c set info [proj c $x $y $z] diff --git a/tests/bugs/modalg_5/bug23706_21 b/tests/bugs/modalg_5/bug23706_21 index 0f314f989a..5e3fbf8f7b 100644 --- a/tests/bugs/modalg_5/bug23706_21 +++ b/tests/bugs/modalg_5/bug23706_21 @@ -9,7 +9,7 @@ puts "" set x 3.999999652077201 set y 5.0000000062915735 set z 5.00002142991819367 -set pp_ch 0.99910795390933249 +set pp_ch 0.99910795390933049 restore [locate_data_file bug23706_c2.draw] c set info [proj c $x $y $z] diff --git a/tests/bugs/modalg_5/bug23706_22 b/tests/bugs/modalg_5/bug23706_22 index 51358752a0..bf2be03327 100644 --- a/tests/bugs/modalg_5/bug23706_22 +++ b/tests/bugs/modalg_5/bug23706_22 @@ -9,7 +9,7 @@ puts "" set x 3.99999991301930024 set y 5.00000000157289337 set z 5.00000535747954842 -set pp_ch 0.99955486819834583 +set pp_ch 0.99955486819835271 restore [locate_data_file bug23706_c2.draw] c set info [proj c $x $y $z] diff --git a/tests/bugs/modalg_5/bug23706_24 b/tests/bugs/modalg_5/bug23706_24 index a3ca5d5c6a..041de217e8 100644 --- a/tests/bugs/modalg_5/bug23706_24 +++ b/tests/bugs/modalg_5/bug23706_24 @@ -9,7 +9,7 @@ puts "" set x 3.99999999837571056 set y 5.0000000000293724 set z 5.0000001000463034 -set pp_ch 0.99993927567408425 +set pp_ch 0.99993927567399621 restore [locate_data_file bug23706_c2.draw] c set info [proj c $x $y $z] diff --git a/tests/bugs/modalg_5/bug23706_53 b/tests/bugs/modalg_5/bug23706_53 index 681fb1de10..b5b2dad4eb 100644 --- a/tests/bugs/modalg_5/bug23706_53 +++ b/tests/bugs/modalg_5/bug23706_53 @@ -14,7 +14,9 @@ set pp_ch2 2.1611867552406454 set pp_ch3 3.5000000059308389 set pp_ch4 5.0399884503606023 set pp_ch5 5.4804063007678074 -set pp_ch6 1.1738953633378706 +set pp_ch6 6.2485611263687888 +set pp_ch7 6.7381612209715556 +set pp_ch8 1.1738953633378706 restore [locate_data_file bug23706_c12.draw] c set info [proj c $x $y $z] @@ -25,12 +27,16 @@ regexp {parameter 3 += +([-0-9.+eE]+)} $info full pp3 regexp {parameter 4 += +([-0-9.+eE]+)} $info full pp4 regexp {parameter 5 += +([-0-9.+eE]+)} $info full pp5 regexp {parameter 6 += +([-0-9.+eE]+)} $info full pp6 +regexp {parameter 7 += +([-0-9.+eE]+)} $info full pp7 +regexp {parameter 8 += +([-0-9.+eE]+)} $info full pp8 if { $pp1 != $pp_ch1 || $pp2 != $pp_ch2 || $pp3 != $pp_ch3 || $pp4 != $pp_ch4 || $pp5 != $pp_ch5 || - $pp6 != $pp_ch6} { + $pp6 != $pp_ch6 || + $pp7 != $pp_ch7 || + $pp8 != $pp_ch8} { puts "Error : Projection is not correct" } else { puts "OK: Projection is correct"