mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
0023838: Modeling Data - Standard_OutOfRange in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)
Fixed incorrect array allocation within GeomEvaluator_OffsetSurface::CalculateDN() and protection against assigning out-of-range values in case of non-square number of U and V derivatives on surface.
This commit is contained in:
parent
ad67e36766
commit
cb6cad7df1
@ -191,13 +191,21 @@ static void derivatives(Standard_Integer theMaxOrder,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = 0; i <= theMaxOrder + theNU+ 1; i++)
|
for (i = 0; i <= theMaxOrder + theNU+ 1; i++)
|
||||||
|
{
|
||||||
for (j = i; j <= theMaxOrder + theNV + 1; j++)
|
for (j = i; j <= theMaxOrder + theNV + 1; j++)
|
||||||
|
{
|
||||||
if (i + j > theMinOrder)
|
if (i + j > theMinOrder)
|
||||||
{
|
{
|
||||||
theDerSurf.SetValue(i, j, theBasisSurf->DN(theU, theV, i, j));
|
theDerSurf.SetValue(i, j, theBasisSurf->DN(theU, theV, i, j));
|
||||||
if (i != j)
|
if (i != j
|
||||||
|
&& j <= theDerSurf.UpperRow()
|
||||||
|
&& i <= theDerSurf.UpperCol())
|
||||||
|
{
|
||||||
theDerSurf.SetValue(j, i, theBasisSurf->DN(theU, theV, j, i));
|
theDerSurf.SetValue(j, i, theBasisSurf->DN(theU, theV, j, i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
for (i = 0; i <= theMaxOrder + theNU; i++)
|
for (i = 0; i <= theMaxOrder + theNU; i++)
|
||||||
for (j = 0; j <= theMaxOrder + theNV; j++)
|
for (j = 0; j <= theMaxOrder + theNV; j++)
|
||||||
theDerNUV.SetValue(i, j, CSLib::DNNUV(i, j, theDerSurf));
|
theDerNUV.SetValue(i, j, CSLib::DNNUV(i, j, theDerSurf));
|
||||||
@ -776,7 +784,7 @@ gp_Vec GeomEvaluator_OffsetSurface::CalculateDN(
|
|||||||
CSLib::Normal(theD1U, theD1V, the_D1MagTol, NStatus, Normal);
|
CSLib::Normal(theD1U, theD1V, the_D1MagTol, NStatus, Normal);
|
||||||
const Standard_Integer MaxOrder = (NStatus == CSLib_Defined) ? 0 : 3;
|
const Standard_Integer MaxOrder = (NStatus == CSLib_Defined) ? 0 : 3;
|
||||||
Standard_Integer OrderU, OrderV;
|
Standard_Integer OrderU, OrderV;
|
||||||
TColgp_Array2OfVec DerNUV(0, MaxOrder + theNu, 0, MaxOrder + theNu);
|
TColgp_Array2OfVec DerNUV(0, MaxOrder + theNu, 0, MaxOrder + theNv);
|
||||||
TColgp_Array2OfVec DerSurf(0, MaxOrder + theNu + 1, 0, MaxOrder + theNv + 1);
|
TColgp_Array2OfVec DerSurf(0, MaxOrder + theNu + 1, 0, MaxOrder + theNv + 1);
|
||||||
|
|
||||||
Standard_Real Umin = 0, Umax = 0, Vmin = 0, Vmax = 0;
|
Standard_Real Umin = 0, Umax = 0, Vmin = 0, Vmax = 0;
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
puts "TODO OCC23838 Windows: OSD_Exception_ACCESS_VIOLATION"
|
|
||||||
puts "TODO OCC23838 Linux: segmentation violation"
|
|
||||||
puts "TODO OCC23838 ALL:TEST INCOMPLETE"
|
|
||||||
|
|
||||||
puts "============"
|
puts "============"
|
||||||
puts "OCC23838"
|
puts "0023838: Modeling Data - Standard_Out Of Range in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)"
|
||||||
puts "============"
|
puts "============"
|
||||||
puts ""
|
puts ""
|
||||||
#######################################################
|
|
||||||
# Standard_OutOfRange in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
restore [locate_data_file bug23838_profile.brep] prof
|
restore [locate_data_file bug23838_profile.brep] prof
|
||||||
restore [locate_data_file bug23838_SpineAndSupport.brep] comp
|
restore [locate_data_file bug23838_SpineAndSupport.brep] comp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user