mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0031258: Mesh - OCCT 7.4.0 VIS get wrong render data
Check intervals for infinite value causing exception in GeomLib::NormEstim
This commit is contained in:
parent
0c74168c42
commit
973f7d55bd
@ -269,11 +269,17 @@ namespace
|
|||||||
for (; aIntervalU <= theIntervals[0].Upper (); ++aIntervalU)
|
for (; aIntervalU <= theIntervals[0].Upper (); ++aIntervalU)
|
||||||
{
|
{
|
||||||
const Standard_Real aParamU = theIntervals[0].Value(aIntervalU);
|
const Standard_Real aParamU = theIntervals[0].Value(aIntervalU);
|
||||||
|
if (Precision::IsInfinite (aParamU))
|
||||||
|
continue;
|
||||||
|
|
||||||
Standard_Integer aIntervalV = theIntervals[1].Lower ();
|
Standard_Integer aIntervalV = theIntervals[1].Lower ();
|
||||||
for (; aIntervalV <= theIntervals[1].Upper (); ++aIntervalV)
|
for (; aIntervalV <= theIntervals[1].Upper (); ++aIntervalV)
|
||||||
{
|
{
|
||||||
gp_Dir aNorm;
|
gp_Dir aNorm;
|
||||||
const Standard_Real aParamV = theIntervals[1].Value(aIntervalV);
|
const Standard_Real aParamV = theIntervals[1].Value(aIntervalV);
|
||||||
|
if (Precision::IsInfinite (aParamV))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (GeomLib::NormEstim (theSurf, gp_Pnt2d (aParamU, aParamV), Precision::Confusion (), aNorm) != 0)
|
if (GeomLib::NormEstim (theSurf, gp_Pnt2d (aParamU, aParamV), Precision::Confusion (), aNorm) != 0)
|
||||||
{
|
{
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
16
tests/bugs/mesh/bug31258
Normal file
16
tests/bugs/mesh/bug31258
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
puts "======="
|
||||||
|
puts "0031258: Mesh - OCCT 7.4.0 VIS get wrong render data"
|
||||||
|
puts "======="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug31258.brep] result
|
||||||
|
tclean result
|
||||||
|
|
||||||
|
vinit
|
||||||
|
vsetdispmode 1
|
||||||
|
vdisplay result
|
||||||
|
vfit
|
||||||
|
|
||||||
|
checktrinfo result -tri 166 -nod 102
|
||||||
|
|
||||||
|
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user