mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0026468: Out of range exception on current master
Problem with different ranges fixed. test cases update.
This commit is contained in:
parent
7365fad60b
commit
738d336be5
@ -389,9 +389,11 @@ GeomAbs_BSplKnotDistribution Geom_BSplineCurve::KnotDistribution () const
|
|||||||
|
|
||||||
void Geom_BSplineCurve::Knots (TColStd_Array1OfReal& K) const
|
void Geom_BSplineCurve::Knots (TColStd_Array1OfReal& K) const
|
||||||
{
|
{
|
||||||
Standard_DimensionError_Raise_if
|
Standard_DomainError_Raise_if (K.Lower() < knots->Lower() ||
|
||||||
(K.Length() != knots->Length(), "Geom_BSplineCurve::Knots");
|
K.Upper() > knots->Upper(),
|
||||||
K = knots->Array1();
|
"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
|
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
|
void Geom_BSplineCurve::KnotSequence (TColStd_Array1OfReal& K) const
|
||||||
{
|
{
|
||||||
Standard_DimensionError_Raise_if
|
Standard_DomainError_Raise_if (K.Lower() < flatknots->Lower() ||
|
||||||
(K.Length() != flatknots->Length(), "Geom_BSplineCurve::KnotSequence");
|
K.Upper() > flatknots->Upper(),
|
||||||
K = flatknots->Array1();
|
"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
|
const TColStd_Array1OfReal& Geom_BSplineCurve::KnotSequence() const
|
||||||
|
@ -397,9 +397,11 @@ GeomAbs_BSplKnotDistribution Geom2d_BSplineCurve::KnotDistribution () const
|
|||||||
|
|
||||||
void Geom2d_BSplineCurve::Knots (TColStd_Array1OfReal& K) const
|
void Geom2d_BSplineCurve::Knots (TColStd_Array1OfReal& K) const
|
||||||
{
|
{
|
||||||
Standard_DimensionError_Raise_if
|
Standard_DomainError_Raise_if (K.Lower() < knots->Lower() ||
|
||||||
(K.Length() != knots->Length(), "Geom2d_BSplineCurve::Knots");
|
K.Upper() > knots->Upper(),
|
||||||
K = knots->Array1();
|
"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
|
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
|
void Geom2d_BSplineCurve::KnotSequence (TColStd_Array1OfReal& K) const
|
||||||
{
|
{
|
||||||
Standard_DimensionError_Raise_if
|
Standard_DomainError_Raise_if (K.Lower() < flatknots->Lower() ||
|
||||||
(K.Length() != flatknots->Length(), "Geom2d_BSplineCurve::KnotSequence");
|
K.Upper() > flatknots->Upper(),
|
||||||
K = flatknots->Array1();
|
"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
|
const TColStd_Array1OfReal& Geom2d_BSplineCurve::KnotSequence() const
|
||||||
|
@ -9,7 +9,7 @@ puts ""
|
|||||||
set x 3.9999965207720098
|
set x 3.9999965207720098
|
||||||
set y 5.0000000629157348
|
set y 5.0000000629157348
|
||||||
set z 5.0002142991819367
|
set z 5.0002142991819367
|
||||||
set pp_ch 0.99715423329884956
|
set pp_ch 0.99715423329884789
|
||||||
|
|
||||||
restore [locate_data_file bug23706_c2.draw] c
|
restore [locate_data_file bug23706_c2.draw] c
|
||||||
set info [proj c $x $y $z]
|
set info [proj c $x $y $z]
|
||||||
|
@ -9,7 +9,7 @@ puts ""
|
|||||||
set x 3.999999652077201
|
set x 3.999999652077201
|
||||||
set y 5.0000000062915735
|
set y 5.0000000062915735
|
||||||
set z 5.00002142991819367
|
set z 5.00002142991819367
|
||||||
set pp_ch 0.99910795390933249
|
set pp_ch 0.99910795390933049
|
||||||
|
|
||||||
restore [locate_data_file bug23706_c2.draw] c
|
restore [locate_data_file bug23706_c2.draw] c
|
||||||
set info [proj c $x $y $z]
|
set info [proj c $x $y $z]
|
||||||
|
@ -9,7 +9,7 @@ puts ""
|
|||||||
set x 3.99999991301930024
|
set x 3.99999991301930024
|
||||||
set y 5.00000000157289337
|
set y 5.00000000157289337
|
||||||
set z 5.00000535747954842
|
set z 5.00000535747954842
|
||||||
set pp_ch 0.99955486819834583
|
set pp_ch 0.99955486819835271
|
||||||
|
|
||||||
restore [locate_data_file bug23706_c2.draw] c
|
restore [locate_data_file bug23706_c2.draw] c
|
||||||
set info [proj c $x $y $z]
|
set info [proj c $x $y $z]
|
||||||
|
@ -9,7 +9,7 @@ puts ""
|
|||||||
set x 3.99999999837571056
|
set x 3.99999999837571056
|
||||||
set y 5.0000000000293724
|
set y 5.0000000000293724
|
||||||
set z 5.0000001000463034
|
set z 5.0000001000463034
|
||||||
set pp_ch 0.99993927567408425
|
set pp_ch 0.99993927567399621
|
||||||
|
|
||||||
restore [locate_data_file bug23706_c2.draw] c
|
restore [locate_data_file bug23706_c2.draw] c
|
||||||
set info [proj c $x $y $z]
|
set info [proj c $x $y $z]
|
||||||
|
@ -14,7 +14,9 @@ set pp_ch2 2.1611867552406454
|
|||||||
set pp_ch3 3.5000000059308389
|
set pp_ch3 3.5000000059308389
|
||||||
set pp_ch4 5.0399884503606023
|
set pp_ch4 5.0399884503606023
|
||||||
set pp_ch5 5.4804063007678074
|
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
|
restore [locate_data_file bug23706_c12.draw] c
|
||||||
set info [proj c $x $y $z]
|
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 4 += +([-0-9.+eE]+)} $info full pp4
|
||||||
regexp {parameter 5 += +([-0-9.+eE]+)} $info full pp5
|
regexp {parameter 5 += +([-0-9.+eE]+)} $info full pp5
|
||||||
regexp {parameter 6 += +([-0-9.+eE]+)} $info full pp6
|
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 ||
|
if { $pp1 != $pp_ch1 ||
|
||||||
$pp2 != $pp_ch2 ||
|
$pp2 != $pp_ch2 ||
|
||||||
$pp3 != $pp_ch3 ||
|
$pp3 != $pp_ch3 ||
|
||||||
$pp4 != $pp_ch4 ||
|
$pp4 != $pp_ch4 ||
|
||||||
$pp5 != $pp_ch5 ||
|
$pp5 != $pp_ch5 ||
|
||||||
$pp6 != $pp_ch6} {
|
$pp6 != $pp_ch6 ||
|
||||||
|
$pp7 != $pp_ch7 ||
|
||||||
|
$pp8 != $pp_ch8} {
|
||||||
puts "Error : Projection is not correct"
|
puts "Error : Projection is not correct"
|
||||||
} else {
|
} else {
|
||||||
puts "OK: Projection is correct"
|
puts "OK: Projection is correct"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user