mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0024829: sprops with precision throws an exception
Reason of exception is reading nonexistent element of array. Test case for issue CR24829
This commit is contained in:
parent
18f4e8e28d
commit
e97a6598fe
@ -216,9 +216,9 @@ static Standard_Integer LFillIntervalBounds(Standard_Real A,
|
|||||||
const TColStd_Array1OfReal& Knots,
|
const TColStd_Array1OfReal& Knots,
|
||||||
const Standard_Integer NumSubs)
|
const Standard_Integer NumSubs)
|
||||||
{
|
{
|
||||||
Standard_Integer iEnd = Knots.Upper(), jEnd = L1->Upper();
|
Standard_Integer iEnd = MaxSubs(Knots.Upper()-1, NumSubs), jEnd = L1->Upper();
|
||||||
|
iEnd = Max(iEnd, Knots.Upper());
|
||||||
if(iEnd - 1 > jEnd){
|
if(iEnd - 1 > jEnd){
|
||||||
iEnd = MaxSubs(iEnd-1,NumSubs);
|
|
||||||
L1 = new math_Vector(1,iEnd);
|
L1 = new math_Vector(1,iEnd);
|
||||||
L2 = new math_Vector(1,iEnd);
|
L2 = new math_Vector(1,iEnd);
|
||||||
DimL = new math_Vector(1,iEnd);
|
DimL = new math_Vector(1,iEnd);
|
||||||
@ -242,9 +242,9 @@ static Standard_Integer UFillIntervalBounds(Standard_Real A,
|
|||||||
const TColStd_Array1OfReal& Knots,
|
const TColStd_Array1OfReal& Knots,
|
||||||
const Standard_Integer NumSubs)
|
const Standard_Integer NumSubs)
|
||||||
{
|
{
|
||||||
Standard_Integer iEnd = Knots.Upper(), jEnd = U1->Upper();
|
Standard_Integer iEnd = MaxSubs(Knots.Upper()-1, NumSubs), jEnd = U1->Upper();
|
||||||
|
iEnd = Max(iEnd, Knots.Upper());
|
||||||
if(iEnd - 1 > jEnd){
|
if(iEnd - 1 > jEnd){
|
||||||
iEnd = MaxSubs(iEnd-1,NumSubs);
|
|
||||||
U1 = new math_Vector(1,iEnd);
|
U1 = new math_Vector(1,iEnd);
|
||||||
U2 = new math_Vector(1,iEnd);
|
U2 = new math_Vector(1,iEnd);
|
||||||
DimU = new math_Vector(1,iEnd);
|
DimU = new math_Vector(1,iEnd);
|
||||||
|
15
tests/bugs/modalg_5/bug24829
Normal file
15
tests/bugs/modalg_5/bug24829
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
puts "========="
|
||||||
|
puts "OCC24829"
|
||||||
|
puts "========="
|
||||||
|
puts ""
|
||||||
|
###########################################################
|
||||||
|
# sprops with precision throws an exception
|
||||||
|
###########################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug24829_faceOutput-wrong.brep] result
|
||||||
|
|
||||||
|
sprops result 0.0001
|
||||||
|
|
||||||
|
set square 15.1187
|
||||||
|
|
||||||
|
set 3dviewer 1
|
Loading…
x
Reference in New Issue
Block a user