I'm trying to use IModelDoc2 :: CreatePlaneFixed2 and ISketchManager::CreateSpline
to create a Spline from a 3DSketch of 3 points.
The problem is that when I pass the coordintes of points after CreatePlaneFixed2 I can't pass the right
coordinate of the 3rd point. Can someone help me?
Part of my code in C#:
double a, b, c;
a = p.vecLength(p2, p1);
b = p.vecLength(p3, p1);
c = p.vecLength(p3, p2);
points[0] = 0;
points[1] = 0;
points[2] = 0;
points[3] = a;
points[4] = 0;
points[5] = 0;
points[6] = (a * a + b * b - c * c) / 2 * a;
points[7] = Math.Sqrt(b * b - points[6] * points[6]);
points[8] = 0;
vecLength is a function I created to culculate the length of vectors.
SolidworksApi macros