Problem with different ranges fixed.
test cases update.
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
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
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
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
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]
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]
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]
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]
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]
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"