Hello all. I'm working with plug-in for SolidWorks at C#. One of options - create boundary surface (plane) from b-spline curves. How i can do it, without sketches ??
Code for creating b-splines:
public Curve Create(IPartDoc part, double width)
{
Body2 body = part.ICreateNewBody2();
List
points = new List (); double step = width / Constants.FRAGMENTATION;
for (int i = 0; i <= Constants.FRAGMENTATION; i++)
{
double radius = Zr(i * step);
points.Add(i * stepX);
points.Add(i * stepY);
points.Add(radius);
}
Curve spline = body.AddProfileBsplineByPts(points.Count / 3, points.ToArray()) as Curve;
return spline;
}
Zr - simple function F(X).
SolidworksApi macros