New to GH, meshes, nurbs,breps etc

I am discovering GH and I would like to modify the vertices of a mesh with a formula… I can extract the faces and apply the formula to the points of the polyline of each face but I don’t know how to rebuild the mesh from these lists or tree or whatever it is call ed here :wink:

I attached my test gh file.

Btw2 How to add my picture to this forum.

Thanks a lot in advance.
Franç (12.1 KB)

Deconstruct mesh, get the vertices, modify them. Then construct mesh, reconnect the original topology from the deconstruct mesh and the transformed vertices.

Thanks a lot, but what does this mean concretly ? (btw I updated my post where I managed now to attach my initial test)


Concretely, this: modify (11.2 KB)


(David beat me to it)


Thanks so much David and also John ! perfect ! there are so many widgets to choose from for a beginner ;-)!
After further struggle, I managed sth already :slight_smile: Annotation 2020-08-14 161631|399x500

New problem: how to create a manual list of 4 points u,v : e.g. (1.4,0) (0,1.4) (-1.4,0) (0,-1.4) , in fact with 1.4 being one variable (eg coming from a slider).
This is to use as an input for uv in the widget “curve on a surface” CrvSrf.
Thanks in advance.
BTW when I have a new question like that, should I create a new entry in the forum?

Use the merge component.

Please take this the right way @fr, but I think you just need to learn grasshopper from scratch using a decent tutorial.

Thanks John fir replying. Indeed it seems I am struggling with even basic things, although to reassure you I have had the Primer open on my screen for the last 3 days and tried to watch videos also. I am not new to programming and working with lists of lists etc, :wink: but indeed virgin to graphical programming… So, sorry to ask these dummy questions, and I know indeed the feeling of readers as I have been often on their side in other circonstances.
So I need to create some points (4 for a first test) in relative planes (about hundred of them around a volume), with well defined position (u, v) fixed or calculated) in each of these relative planes, but I don’t find how to make a list of them to input the curve-on-a-surface widget. I don’t see how to use “merge” to combine real numbers in 4 pairs, and even how to crete the pairs uv (although I tried the evaluation-expression widget). Maybe I need to use the #C evalaution widget, but that would sound an overkill, or I am tryng something not possible (at least this way) in GH?

I did a #C script to generate a list of UV corrdinate lists but Curv on Surf was still not happy… until I realised that what is called uv is in fact a POINT (or vector) u,v,0. Bluddy confusing label! So then of course the issue was solved and indeed I could use Merge to put my 4 points in a list :wink: : First statement = “A point is not a list (of numbers): it’s a Point object.” :slight_smile:

@jufu59 No problem, pleased to hear you’ve found the primer.

Now that you’ve told me there might be potentially 100 curves, that changes things a little and yes perhaps a script to assemble the points might be appropriate. You need to weave these into datatrees (e.g. 100 collections of 4 points). Yes, uv coordinates are usually inputted as points with no z-value. Some examples:

  • a) Two lists of points fed into the construct point component. The u and v will match up according to corresponding indexing and create a list of points.
  • b) Same but with one value variable (replacing an item in the previous list).
  • c) Having two long lists of u and v points and weaving them to create a data tree of two curves each containing 4 points each. Of course this could be made into 100 curves if you have the data someplace.

That’s it from me. Good luck with it! It does feel like a tutorial on lists, datatrees, etc. might be useful in order to understand how to assemble the correct datastructures to make gh work in your favour, hope this can aid your learning of gh in the meantime.

Best wishes,

John (105.2 KB)

1 Like

thanks a lot John, in particular for showing

  • the use of the multiline data pad and the item replacer
  • a correct example of C#
  • the preview curve widget


1 Like