algorithmic modeling for Rhino
Hi David:
I have tried these codes in C#:
private void RunScript(Curve x, Curve y, ref object A)
{
Rhino.Geometry.Intersect.CurveIntersections ci;
ci = Rhino.Geometry.Intersect.Intersection.CurveCurve(x, y, 0.001, 0.001);
A = ci.Item[0].PointA;
}
Got the Error:
'Rhino.Geometry.Intersect.CurveIntersection' does not contain a definition for 'Item'
But in VB.Net:
Private Sub RunScript(ByVal x As Curve, ByVal y As Curve, ByRef A As Object)
Dim ci As Rhino.Geometry.Intersect.CurveIntersections
ci = Rhino.Geometry.Intersect.Intersection.CurveCurve(x, y, 0.001, 0.001)
A = ci.Item(0).PointA
End Sub
It works well!
Why? Is C# an incomplete version?
Thank you for your time!
Tags:
A = c[0].PointA;
A = c(0).PointA
for (int i = 0; i < ci.Count; i++)
intPts[i] = ci[i].PointA;
this is how it will appear.
Testing!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by