|
- void setClosed(AcDbSpline *pSpline)
- {
- int degree;
- Adesk::Boolean rational;
- Adesk::Boolean closed;
- Adesk::Boolean periodic;
- AcGePoint3dArray controlPoints;
- AcGeDoubleArray knots;
- AcGeDoubleArray weights;
- double controlPtTol;
- double knotTol;
- // get data from the spline
- pSpline->getNurbsData(degree, rational, closed, periodic,
- controlPoints, knots, weights,
- controlPtTol, knotTol);
- if(closed == Adesk::kTrue)
- return;
- // set as closed
- closed = Adesk::kTrue;
- // apply data back
- pSpline->setNurbsData(degree, rational, closed, periodic,
- controlPoints, knots, weights,
- controlPtTol, knotTol);
- }
复制代码 |
|