Bending (wrapping) a Curve

Hello Everyone,
Now, I am dealing with a problem in Dynamo that has taken me longer than I expected. Here, it is:
I would like to bend or wrap a curve. I tried with the project onto the surface node. Nevertheless, the curve is smaller since the projection is perpendicular to the projected surface. Actually, I want to do it as you can see in the sketch.

Thanx.

You can kind of do this in Dynamo, but its functionality is really limited for type of problem and you’re better off using Grasshopper.

The concept is simple, just map your curve between surface parameter spaces. If you want to maintain maximum fidelity of the curve, then your source surface and mapping surface need to be of equal area an size if unrolled, which is the main problem to solve.

Anyway, the ‘kind of’ way of doing this in Dynamo using approximations:

  1. Create a flat surface (the parameter space)
  2. Draw your curve.
  3. Get points on curve (sample points - more points higher fidelity but wave good bye to performance)
  4. Get UVs from points on flat surfaces.
  5. Create mapping surface.
  6. Points by UV on this surface from step 4.
  7. Nurbs from points.

Its far from great as the curve wont follow the surface precisely but then…right tool for the right job:

Curve on a flat, rectilinear surface:

After mapping:

Home.dyn (37.7 KB)

3 Likes

Did you try this node yet?

https://dictionary.dynamobim.com/#/Geometry/Curve/Action/Project

If so what were the results and why weren’t they ideal (an image would help)?

Because a projection is performed along a vector (i.e. 1 direction) whereas ‘bending’ a curve on a surface (as the OP put it) can only be done via parametrisation between surfaces.

If it helps imagine you have cylinder and a line, if you wanted to ‘wrap’ that line around the cylinder like a piece of string, then clearly a projection is not going to work. Change that line to any other shape and it will become even more apparent. Instead you have to map it between parameter spaces as a showed above (its a comp design 101)…only Dynamo doesn’t have any method to map a curve between surface parameter space. GH does.

image

So yeah, Dynamo its pretty limited with this type of (basic) problem.

Gotcha. I think I was a bit thrown off by the initial imagery which seemed like a ‘project’ would work.

Not sure I’d qualify this as basic, but it’s definitely a miss. I’ll float to the team and see about adding it to the roadmap.

2 Likes