SrfGrid Error: The UCount value is not valid for this amount of points

Hi, I’ve reviewed other posts on the error ‘The UCount value is not valid for this amount of points.’ when using the SrfGrid function in Grasshopper but am still unable to solve my issue with this error.

I’m trying to create a 3D surface from points that come from ‘canals’ (polylines). Everything moves smoothly until I reach the SrfGrid portion, whereby the error appears. I’ve added the ‘U + 1’ expression to the U-Count and also tried lowering the number of points on the surface, but the error still persists.

For reference, this is what I want to achieve:

sample file (source: Pull surface to the ridge lines - Grasshopper )

srf2crvs.gh (13.1 KB)

mur.3dm (134.1 KB)

But this is the error I’m encountering instead:

my file:

trial.gh (26.0 KB)

trial.3dm (89.6 KB)

I’d like to apologize in advance if there’s already a post on this that I just missed (-_-”). If not, does anyone have any advice on how to fix this error?

I can’t see everything in your Grasshopper definition but something is noticeable on the screenshot above. The points you connected to the P input of the Surface from Points component are in a data tree.. This would be necessary if you want to create many surfaces at once but I guess in your case it’s just one surface and you could actually get rid of the Shift Paths component and just flatten the input

Thank you for the advice! I’ve tried removing the data tree and flattening the P value, but the same ‘UCount Value is not valid…’ error still appears.

I don’t have the shortest walk plugin installed and I’m not going to.

Your point count might not be correct. One thing you could do is internalise the curves in the second purple group so this could be tested without the plugin. Another small thing for next time, the surface could also be internalised so you only need to upload one file and someone who’s helping needs just one file.

Thanks for the tip! Sorry for all the hassle thus far, I’m still pretty new to the software so your advice really helps!

I’ve internalised the curves and surfaces in the file below, for anyone’s reference if they’d like to hv a look or hop in. I’ll work on fixing the point count issue and probably explore other options that could give me similar outcomes^^

trial.gh (27.7 KB)

To me it is not obvious how you’re transforming the points.

The only thing I see right now is that you have 448 points and with your CLX and Points to numbers operation you create too many vectors and all of them seem to be zero units long.

I cannot help you.

as Martin noted, you have 448 points along the definition, and looks like you want to have the very same amount at the end when rebuilding your Surface from Points because are using the very same U_point_amount division

but here at the red circle with line|crv intersection you do something that ends up generating a data tree with 3603 values

so I suspect you wanted to do something that didn’t work as expected: what are you trying to do in that top part through Line|Crv intersection?


[edit]

maybe this is more in the likes of what you are trying to do?

trial (1)_inno.gh (23.0 KB)

@martinsiegrist No worries. Thanks for all your input and pointers!
@inno Thanks for your response. Yes! The updated sequence you posted is what I’m aiming to achieve with my model.

I’d like to apologise for the messy gh sequence I had created. I hv to admit that I was building this sequence using components based on the reference project I found, without really understanding the functions of each component, which probably led to my error in the first place. Your sequence really simplified the process and is much easier to understand.

Sorry for all the trouble. Thank you both for taking your time to help out with my issue!