Archived issue #0028276
Visualization, Graphic3d_ArrayOfPrimitives - fix usage of 16-bit indices
Description
Graphic3d_ArrayOfPrimitives decides to allocate 16-bit or 32-bit indices within the following check:
This check is OK for normally compressed data.
However, external data might include exhaustive amount of vertex data requiring 32-bit indexation while overall amount of indices is still small.
if (theMaxEdges < Standard_Integer(USHRT_MAX))
{
if (!myIndices->Init<unsigned short> (theMaxEdges))
{
myIndices.Nullify();
return;
}
}
else
{
if (!myIndices->Init<unsigned int> (theMaxEdges))
{
myIndices.Nullify();
return;
}
}
This check is OK for normally compressed data.
However, external data might include exhaustive amount of vertex data requiring 32-bit indexation while overall amount of indices is still small.
Steps to reproduce
N/A
Public activity
6 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Dec 23 21:21:00 2016 +0300
0028276: Visualization, Graphic3d_ArrayOfPrimitives - fix usage of 16-bit indices
Graphic3d_ArrayOfPrimitives now check the amount of vertex data rather than amount of indices.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Dec 23 21:21:00 2016 +0300
0028276: Visualization, Graphic3d_ArrayOfPrimitives - fix usage of 16-bit indices
Graphic3d_ArrayOfPrimitives now check the amount of vertex data rather than amount of indices.
Patch is ready for review.
Is it possible to implement a simple test case using pure OCCT capabilities (i.e. outside CAD Assistant)?
Branch CR28276 reviewed without remarks, ready for testing.
Dear Commenter 2,
Branch CR28276 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MasOS: 0 (0 on master)
products component:
Linux: 63
Windows: 0
MacOS: 1126
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 92817441 / 93054576 [-0.25%]
Total CPU difference: 21527.880000000092 / 21520.74000000037 [+0.03%]
Testing on Windows:
Total MEMORY difference: 58626750 / 58650770 [-0.04%]
Total CPU difference: 19440.75101939849 / 19731.318481998722 [-1.47%]
Branch CR28276 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MasOS: 0 (0 on master)
products component:
Linux: 63
Windows: 0
MacOS: 1126
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 92817441 / 93054576 [-0.25%]
Total CPU difference: 21527.880000000092 / 21520.74000000037 [+0.03%]
Testing on Windows:
Total MEMORY difference: 58626750 / 58650770 [-0.04%]
Total CPU difference: 19440.75101939849 / 19731.318481998722 [-1.47%]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Related records