Map curve to surface

In my attempt to create a ‘kinky sweep’ I used the ‘map to surface’ component and I had the impression that a curve that I used as a profile would follow the curvature of the target surface.

later I realized that only the control points of the curve are mapped on the surface, resulting in a curve that is slightly (or greatly) off the surface.

Am I using it wrong? or is there another way to map a curve on a surface?
(I thought about using ‘surface morph’ but it doesn’t work with planar curves (it requires a non zero z-dimension)
here is an example with the problem: (11.1 KB)

I think there are two problems:

  1. the control points that are outside the bounding box are not mapped (something that could be remedied by using a bounding box that includes them)
  2. even when the control points are mapped, the resulting curve can still deviate from the surface considerably (maybe reconstructing the curve to increase the CP’s?) Isn’t there a simple way?

See attached (Warning: still drifting > time flies > stop this > start that) (74.1 KB)

1 Like

I’m slowly accumulating a whole library of your scirpts!
Thanks man!!!

Wait a couple of minutes … forgot to add a more elaborated control on mapping From stuff (switching to C# for the V1 build)

and here’s the V1. (151.9 KB)

BUT … the 1M Q is > when you’ll start doing the things that you do best?
Answers to : the Lord, District 9, North Pole.

First of all: as a Devil you are very disappointing! You’re too kind.
(Unless of course it’s your scheme in order to rip more souls! :scream: )
second: the 1 dollar answer is: I already started although in order to keep whatever little contact I still have with the outside world, I’ve dedicated a small time segment to it!

As you said …that’s elementary : the Lord exposes his friendly (fake) mask until the victim signs the paper.

Your curve is a combination of degree 3 + degree1. The control points can only be increased if you want to apply this curve to a curved surface.
In my opinion, you’ll need a different approach to map your curve to a plane and a curved surface. (17.1 KB)

One more question:

I want the curve to be able to ‘rotate’ on the surface. but the problem is that with ‘boundary’ surface, the untrimmed surface rotates along with the curve,thus not passing on the rotation to the maped curve, which tells me that the curve must carry with it some kind of orientation info (one would expect the untrimmed surface to remain parallel to the world)

Is there some way to ‘force’ the untrimmed surface to remain parallel to xy? (14.8 KB)

Thanks Kim!

Unwillingly you gave me a solution to the other problem!
instead of using as a reference the boundary surface, to use one of the sides of the BBox!

(although it still leaves me with the question: why should the untrimmed surface of the ‘boundary surface’ be constructed parallel to the orientation of the curve and not the world xy?)

Nevertheless, if you have a look at Peter’s script, you’ll see that he managed to retain (almost) the same amound of control points while forcing the curve to stay on the surface! (what kind of sourcery is this !?!?!?)

Thank you guys! Now it works seamlessly!!!
I hope some day I can help others as you help me! (15.3 KB)

1 Like

His solution is to use the “Project” in order to fully adapt to the surface at the final step, so, it’s inevitable that the control points will increase.
You might also want to try “Sporph” on GH R6. (15.8 KB)

Nice animation. I was about to give you a ‘Like’ on that post until I found @PeterFotiadis C# code in your model. :frowning: Ugh!

Here is a mashup of @HS_Kim’s code and your rotation feature that uses no plugins or C# - close enough for me, if matching the original control point count is required. (29.9 KB)

Seems to work. (8.2 KB)

Very elegant solution! (I feel ashamed that I didn’t even know about ‘pull curve’.
With a little simplification of the curves (it is to be used for sweeping, so simple curves are important) it works amazingly! (11.2 KB)

The only downside is that you have to include the Control Points in the BBox and for the specific use I want it now that is a problem.
Still, very elegant solution!

P.S. Since you guys seem to be interested in the matter, doesn’t anybody have any guess as to why ‘boundary surface’ component creates a surface aligned to the curve and not to the world? It seems that each curve must carry some kind of meta-data with it… (in the beggining I suspected it might be aligning itself to the initial tangent of the curve but no. when the curve is unturned, the surface is aligned with the world. when it turns, the surface’s orientation turns with it…)

Here even better. Use surface morph. Then you can use bounding on the curve not the control points, and result has much less control points.

If you have r6 you can use sporph like @HS_Kim said, haven’t tested what the control point result is for that one but it is a similar component. (11.4 KB)


I love this forum!!!

The problem at hand has already been solved some 10 posts ago but new ideas keep sprouting, each with a different approach and each giving new insights to the use of grasshopper’s tools!
(I’ve never thought of extruding a planar bounding box !!!)

…one question posed, a hundred answered!

1 Like

Except for why on earth the friking ‘boundary surface’ aligns the surface to the curve! :joy:
I guess someone from McNeel can answer that!

I have same problem but I try with HS_Kim method it not work
My file
Map curve on surface rev1.3dm (38.2 KB)
Map curve on surface (11.4 KB)