View Issue Details

IDProjectCategoryView StatusLast Update
0031553CommunityOCCT:Modeling Datapublic2020-05-08 00:07
Reporteralexzkw Assigned Tomsv 
PrioritynormalSeverityminor 
Status newResolutionopen 
PlatformWindowsOSWindows 
Product Version7.3.0 
Summary0031553: Modeling Data - Geom_Surface value() returns invalid point - NaN
DescriptionI have a special scenario, where the Value() method of Geom_Surface returns a gp_Pnt with invalid coordinates (NaN, NaN, NaN).

I added the C++ code snippet to reproduce.
Steps To Reproduce
TColgp_Array2OfPnt ControlPoints(1, 2, 1, 5);
for(int u = 1; u <= 2; u++)
{
    for(int v = 1; v <= 5; v++)
    {
        ControlPoints.SetValue(u, v, gp_Pnt(u, v, 0));
    }
}

TColStd_Array1OfReal KnotValues_U(1, 2);
KnotValues_U.SetValue(1, 0);
KnotValues_U.SetValue(2, 1);
TColStd_Array1OfInteger Multis_U(1, 2);
Multis_U.SetValue(1, 2);
Multis_U.SetValue(2, 2);

TColStd_Array1OfReal KnotValues_V(1, 4);
KnotValues_V.SetValue(1, 0);
KnotValues_V.SetValue(2, 1);
KnotValues_V.SetValue(3, 2);
KnotValues_V.SetValue(4, 3);
TColStd_Array1OfInteger Multis_V(1, 4);
Multis_V.SetValue(1, 2);
Multis_V.SetValue(2, 2);
Multis_V.SetValue(3, 2);
Multis_V.SetValue(4, 2);

const int Degree_U = 1;
const int Degree_V = 2;

const Handle(Geom_BSplineSurface) BSplineSurface = new Geom_BSplineSurface(ControlPoints, KnotValues_U, KnotValues_V, Multis_U, Multis_V, Degree_U, Degree_V);

double u0, u1, v0, v1;
BSplineSurface->Bounds(u0, u1, v0, v1);

// Does give correct result
const gp_Vec Vec= BSplineSurface->DN(u0, v1, 0, 0);

// Invalid result: Coordinates of P are not a number
const gp_Pnt P = BSplineSurface->Value(u0, v1);

// Invalid result: Coordinates of Q are not a number
gp_Pnt Q;
BSplineSurface->D0(u0, v1, Q);
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-05-07 15:35 alexzkw New Issue
2020-05-07 15:35 alexzkw Assigned To => msv
2020-05-08 00:07 kgv Summary Geom_Surface value() returns invalid point - NaN => Modeling Data - Geom_Surface value() returns invalid point - NaN
2020-05-08 00:07 kgv Steps to Reproduce Updated