Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4174

Joincurves coplanar

$
0
0

Hi anyone may help me on a c# script?
I am trying to create a script which will be able to joincurves which are coplanar and intersect each other…
I have tried to use the joinCurves method but i don t understand what the IEnumerable parameter is.

here is my script :

List<Curve> myListOfNewCurves = new List<Curve>();
Plane plane = new Plane(point, vector);

for (int i = 0; i < myListOfCurves.Count ; i++)
{
  for (int j = 0; j < myListOfCurves.Count  ; j++)
  {
    if (myListOfCurves[i] != myListOfCurves[j] && Curve.PlanarCurveCollision(myListOfCurves[i], myListOfCurves[j], plane, 0.1))
    {

LineCurve joinedCurve = new LineCurve(myListOfCurves[i].PointAtStart, myListOfCurves[j].PointAtEnd);
myListOfNewCurves.Add(joinedCurve);
}
}
}
A = myListOfNewCurves;

7 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 4174

Latest Images

Trending Articles



Latest Images