algorithmic modeling for Rhino
Error CS0103 "The name 'Intersect' does not exist in the current context"
Hi, new to c#, can anyone tell me why I'm receiving the above error? Is the something about using loops that removes the namespace? Below is the code as it stands.
double intersection_tolerance = 0.001;
Point3d overlap_point = new Point3d();
Curve[] overlap_curve;
foreach (Curve trail in Trails) {
foreach (Brep section in Sections) {
Intersect.Intersection.CurveBrep(trail, section, intersection_tolerance, out overlap_curve, out overlap_point);
}
}
Tags:
Hi Peter,
That seems to have solved it, though its given me a few other bugs to work out. Any idea why you would need to declare the namespace again inside the loop?
See attached as well
Had a look at this and I think I understand about 30% of what's going on haha. Will have to keep studying it, thanks for sending
Hi Peter,
Okay I am waaaaay out of my depth with this one obviously, so I don't expect you too waste any more time on me, I might be beyond hope.
I've worked out that the out stuff are arrays, which I am really struggling to work out how to convert into generic lists based on their types.
And I'm a little lost when you say the method returns false/true, unless you're referring to the fact an intersection might not exist therefor the method is false? If so I'm guessing I'll need to to have an if clause in case the result comes up null.
And I guess when you say the build in editor is crap you're referring to my previous question about why you need to declare a namespace inside a loop. If so agreed.
Well ... the build in editor is crap for a vast variety of reasons ... but programming is a task for the brave anyway (BTW: I hate computers).
Hope dies last ... so keep walking the walk. Buy decent cigars and tons of espresso as well.
See attached where the Method is not tested ... but the length of the out array is tested (if no ccx event occurs). The thing is unfinished on purpose: what happens if a line is "split" by another brep?
Haha very inspiring words. Thanks a lot mate, I'll have a look at it in a bit and report back.
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
© 2024 Created by Scott Davidson. Powered by