NurbSpline Creation Error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm working on a Revit plugin that in part accepts curves from Rhino that can be used to create a beam in Revit.
My code works well, when controlpoints of curve are greater than or equal to four. But with three control points arises a problem.
How can I draw three control points curve in Revit API?
List<XYZ> ctrPoints = new List<XYZ>();
ctrPoints.Add(new XYZ(Utils.mmToFeet(72500.017337), Utils.mmToFeet(-5072.522765), Utils.mmToFeet(0)));
ctrPoints.Add(new XYZ(Utils.mmToFeet(105082.371745), Utils.mmToFeet(-748.798009), tils.mmToFeet(0)));
ctrPoints.Add(new XYZ(Utils.mmToFeet(117899.12727), Utils.mmToFeet(-15572.997171), Utils.mmToFeet(0)));
List<double> weights = new List<double>();
weights.Add(1);
weights.Add(1);
weights.Add(1);
List<double> knots = new List<double>();
knots.Add(0);
knots.Add(0);
knots.Add(0);
knots.Add(52464.568605);
knots.Add(52464.568605);
knots.Add(52464.568605);
NurbSpline detailNurbSpline = NurbSpline.Create(ctrPoints, weights, knots, 3, false, true);