I’ve encountered an issue where I’m scratching my head to resolve as I’ve been stuck for a couple of hours… I would appreciate some guidance/help!
I’ve created a lofted surfae with a number of curves (I prefer to control the shape in rhino, more intuitive personally), but parts of it dip below Z=0 as shown here in yellow:
As I created a number of lines from the center of the surface in polar direction, and projected back onto the surface to get the individual lines as the base for structures, I’ve finding that the curves in those highlighted region don’t sit at Z=0, which would be the ground.
I’ve tried to resolve it by fillet at the lowest point, but because they each behave slightly differently, there isn’t one single radius that can make all of them be exactly landing at Z=0.
I then tried to identify which points has a Z value smaller than 0, to then force it back to 0, and use interpolate curve to rebuild the curve. But I’m having 2 issues:
I’m unable to get all the points with a Z value smaller than 0 - it’s a bit confusing to me at these steps as shown below
Even as I tried to interpolate the original control points on the curves, they don’t build the curve as smooth/projected onto the surface as the original ones, which means even when I can swap them out to be at Z=0, they will not provide me with the intended shape.
How can I achieve the result to have all cuves’ lowest part touching Z=0? I’d like to stick to how I am building the lofted surface manually in rhino to control it more intuitively. Thank you all for your help in advance!!!
The idea that you expected anyone to solve this without posting geometry at the very least is absolutely ridiculous Your code was very helpful too: ArrPolar and Project.
I know… I thought screenshots were enough - how naive haha ;)…
Let me check it out!
P.S. I was also trying to resolve it by cutting curves below the Z=0 and then somehow blend them but your approach from the screenshot looks neat!!!
P.P.S. Thank you - that worked amazingly!!! Would you mind explaining a bit more on how CrvProx work - for example putting A or B into the IntCrv doesn’t change the result of the new loft…
I belatedly realized I should have used CrvProx ‘A’ (the “horizontal” curves) instead of ‘B’ (the projected ArrPolar curves) but just checked and the distance between the two is either zero or extremely small.
When I zoom way in to the side view, I can see that it’s not perfect but there is no difference between ‘A’ and ‘B’. So maybe there is still a better solution? I’m mildly intrigued but not very concerned about it.
P.S. I just remembered that I’ve dealt with this issue before, in hull design and this thread:
But it’s too late tonight for me to do any more.
P.P.S. Yes, something like this (below)… See the three points on the X axis? That makes the NURBS curve tangent at that point so it doesn’t go below Z=0. But being a NURBS curve means it doesn’t touch the yellow point as it should, so still needs work.
To continue where I left off last night with a NURBS curve solution… Unlike interpolated curves, NURBS curves don’t intersect every point. They “touch” the end points and “approach” the points in between. But they have a special property that’s a little hard to explain…
When two points are in a line a NURBS curve will be tangent to a straight line between them as it bends toward a third point. For this code (and the thread I referred to), three points in a line will cause a NURBS curve to be tangent to that line as it bends toward points before and after those three.
So CrvProx ‘A’ will produce four points (indices 0 to 3) where 30 projected lines cross the four lofted curves (30 branches of four points each). This method is applied to the middle two of those points: index 1 (white group) and index 2 (purple group).
I move/copy those points in two directions using vectors, Merge them with the original points and sort them AlongCrv before creating Nurbs curves and lofting them. This prevents the NURBS curve and loft from extending below Z=0 at index 1. The same thing is done at index 2 to make the NURBS curve closer to the projected lines. But these are different curves
This is written specifically for four lofted curves because it’s easier to understand. I could have clustered some of this code to handle more or fewer lofted curves but kept it simple.
P.S. I forgot to say, try moving the sliders in the white and purple groups!