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);
|
---|