NURBS Curve On Surface crash

NURBS Curve On Surface crash

Anonymous
Not applicable
403 Views
0 Replies
Message 1 of 1

NURBS Curve On Surface crash

Anonymous
Not applicable

Hi,

I have on the last months being familiar with NURBS API in the 3Ds max SDK. I experience as a very powerful API which lot of possibilities.

 

I started to use the NURBS API with 3Ds max 2014, there I could use the NURBSPointCurveOnSurface to draw an open NURBS on an arbitrary NURBS surface. In 3Ds max 2015, I'm not able to redo an open NURBSPointCurveOnSurface, since it defaults seem to be to close the curve, neither I haven't found a function so I can make the Curve open.

 

I found out then the NURBSCurveOnSurface did create an open curve, but after creating it, it fails to be rendered (3Ds max crashes). What I do is that I copy an existing NURBSCVCurve to define the NURBSCurveOnSurface.

 

  obj = node->GetObjectRef ();
  GetNURBSSet ( obj, 0, nset, false );
  NURBSObject* nurbs = GetNURBSObject ( nset, kNCVSurface, L"MySurface" );
nurbs_curve_ = new NURBSCurveOnSurface (); nurbs_curve_->SetName ( L"MySurfacePath" ); //nurbs_curve_->SetNSet ( &nset ); nurbs_curve_->SetParentId ( nurbs->GetId () ); //nurbs_curve_->SetObject ( obj ); npc->GetNURBSData ( 0, degree, numCVs, cvs, numKnots, knots ); nurbs_curve_->SetOrder ( degree ); nurbs_curve_->SetNumCVs ( numCVs ); nurbs_curve_->SetNumKnots ( numKnots ); for ( int i = 0; i < cvs.Count (); i++ ) { nurbs_curve_->SetCV ( i, *cvs.Addr ( i ) ); } for ( int i = 0; i < knots.Count (); i++ ) { nurbs_curve_->SetKnot ( i, *knots.Addr ( i ) ); } nurbs_curve_->AutoParam ( 0, kAutoCentripetal ); nset.AppendObject ( nurbs_curve_ ); AddNURBSObjects ( obj, mpIp, &nset );

 So how should I project an arbitrary NURBSCurve onto a NURBSSurface?

 

Kind regards

Patrik

0 Likes
404 Views
0 Replies
Replies (0)