Hi to everyone! I’m new to C# scripting and I’m encountering a problem when writing in the C# script component inside Grasshopper . I’m currently using Rhino version 8.9.24194.18121. Rhino crashes specifically when I try to write a certain part of my code. Here is the code where the crash occurs, I have highlited the part when it crashes:
private void RunScript(
Surface iSurface,
List<Curve> iCurves,
double iRadius,
int iIterations,
double iTolerance,
ref object oNumberOfIntersections,
ref object oIntersectionPoint)
{
var intersectionEvents = Rhino.Geometry.Intersect.Intersection.CurveCurve(iCurves[0], iCurves[1], iTolerance, iTolerance);
if (intersectionEvents!=null)
{
int numberOfIntersections = intersectionEvents.Count;
if (numberOfIntersections == 1)
{
if (intersectionEvents[0].IsPoint)
{
Point3d point = intersectionEvents[0].PointA;
oIntersectionPoint = point;
}
}
}
}
// Rhino crashes when writing here, this comment was added inside the post
}
I also attach an image for more clarity:
Has anyone else experienced similar issues or knows a solution?
Thanks in advance !