Hello,
I need technical assistance to resolve this issue. Specifically, I’m looking for guidance on how to modify my algorithm to correctly handle the creation of sub-curves that intersect the starting point. Any insights or suggestions would be greatly appreciated.
I need to create sub-curves from a closed curve. I have a problem using my method when I want a sub-curve that intersects the starting point. In that case, I need the algorithm to use the L+ instead of the L-length parameter, as shown in the GH file. So, I need to create a condition where IF the SUM of the L+ more the half length of the sub-curve is greater than the length of the curve, the algorithm will use the L+ instead of L-.
I’ve solved the problem by creating one different curve from each point and changing the seam. Still, I can’t use this method because it creates a problem following the algorithm.
Thank You,
Roy
Try to reorganize your words or just show the final result you want. Really hard to understand what is your problem.
Hi Quan!
Thank You for your reply.
Okay. My solution works if I don’t use the curve’s starting point. I need it to work using the starting point too.
Thanks again,
Roy
Ah, I get it, you like to slide the short rubber tube along the closed curve as if there is no curve seam.
This is interesting and kind of something new.
just to think at a different approach, I’m wondering if it would work to temporarily slide the seam of the curve on an unused location just for the purpose of creating the pipes
in a scenario like this, where P0 is a point where a pipe should be created, but also the start/end point of the curve itself
if you slide the seam in some remote location like this:
then you can create the pipe with your standard definition without too much concerns?
the location where to move the seam might be in the middle of the Length Parameter of the two most distant Points along the curve, in this case somewhere between Length Parameter of P1 and Length Parameter of P2 (easy to compare with shift list, and find the highest)
Hi Quan,
thanks for Your reply.
Unfortunately, I can’t transpose your solution to my request (create more than one sub-curve in a closed curve at the start point, too).
Thanks for trying,
Roy
Hi Inno,
I’ve already found a solution using multiple seams, but it creates various curves that will prevent me from proceeding with my solution.
The solution is to tell GRASSHOPPER to use L- when the points are far from the start and L+ when they are near or equal to the start.
But I can only find the solution by myself now.
Thanks for helping,
Roy
not entirely sure what you’re trying to achieve, but here’s function that a achieves that
not sure how to use it in your GH but here’s the GH anyway, and there is some ambiguity in you equation, but i think the expression component is what you’re after.
so to the if function works like this
If ( test_logic, return A when test is true, return B when false)
to add (or remove) variables, you zoom in on the left until you see tiny plus and minus signs
now when you pass in a number in SubCurve, you can use that number in the equation
Hi, ADEL!
Thank You for Your reply. Unfortunately, I’m not able to use your expression.
I link an update on how I’m working right now.
I’ve reached the solution, but I need to automatise the algorithm to choose just a curve and some random points to have the sub-curves.
starting point closed curve subcurve _roy edit 1.gh (15.0 KB)