Hello! I am trying to use rhino common c.extend method to extend my curves to a variety of other curves.I need to replace this pOd component. What am I doing wrong?
thank you for your reply! There is no way to make extend of curves to geometry?
Obviously there’s various ways.
But, say, if the extension style is Smooth there’s no guarantee that the extended end would “touch” the target … meaning that some sort of Recursive approach is required (kind a bouncy solver: extend in small steps until a Ccx Event occurs).
If on the other hand style is Line we are talking tangents and … well … the sure way is to test Ccx Events (rather a straight way to cut the musttard: kinda like a Ray3D against a Brep/Mesh, so to speak) and IF the prox Ccx Pt dist is < extension Length … blah, blah.
On the other hand another option would be “extend up to first Ccx pt” (with Length playing a secondary - if any - role).
So: what policy you want to follow?
I thought we can just use rhino common method, and it would work right away (I have no idea what is under the hood). But if that’s not the case here, I’m just looking for a way to extend planar polylines (“line” extension style will be enough) to the first obstacle curve. If there are no curves in the way - to return the same line, or error. Extension length does not matter. Can you give me a hint on that?
That’s very easy (but is faaaaar from the general case - I always think having “any” scenario in mind).
Give me a couple of minutes.
Sorry for the delay … but that %#%#%$ practice of mine (I hate this business - I was not born to do stupid/boring AEC things and the likes).
Curve_extend_V1.gh (17.2 KB)
I hear you: why don’t you exit if you find the first crv that yields Ccx events? (i.e. then order only these etc etc). Well … wait for the trad update (the V1A that is).
oh dear god
Thanks, it works great! You’re the guardian of c# on this forum
Who cares about C#? I rather prefer to promote The Ducati thing (obviously excluding the 999 - what an ugly design [designer fired after that]).
Moral: Ducati Uber Alles.
Found a couple of minutes for the trad Update.
Curve_extend_V1A.gh (16.5 KB)
BTW: Entry Level challenge for you: Do a Connectivity thing (i.e. a Tree of Type int). I mean what crv hits what target etc etc. Tip: in real life we use a Class to monitor stuff like that (and other related things).
BTW: Mid Level challenge: assume that there’s a zillion crvs and targets around. Do a thread safe // solution.
thank you! Will definitely experiment with that. That is perfect!