Rotate objects along curve


Uploading: TEST.3dm…
alongWithCur.gh (15.5 KB)
Hi,
I am planning to rotate these objects which are next to the curve with certain degrees, and others remain 0 degrees. I tried my best and stopped here, can you please give me some suggestions or show me your methods to resolve my question?

Good news: The attached - existed already - does what you want (I guess).
Bad news: It’s useless to you (unless you have plans to walk the right walk).

Attractors_GeomBaseRotAccCrvDist_V1.gh (130.7 KB)
Attractors_GeomBaseRotAccCrvDist_V1.3dm (2.0 MB)

It accepts objects sampled in a List of GeometryBase Type. Then - per object - a Box is calculated (Box plane Z is user defined). Then calculates the Crv prox dist to Box center (2 modes available: push/pull). Then remaps the dist min/max values to 0 - rMax and rotates the object on the Box plane.

TextDots display the rotation angle (0 to rMax) - acc a user defined decimal accuracy.

Thanks, Peter. It’s a good concept for me.
This calculator works exactly the opposite way I want lol.
I want the objects to remind 0 degrees, but these objects rotate. Do you have any idea for this?

Er … what calculator?

Have you tried the push/pull mode?

Other than that… I could add very easily various options: notably related with (a) Transform [i.e. translate, rotate, scale, *combined* etc etc], (b) How exactly the Transform is defined, (c) What sort of global/local rule/filtering one should use.

With regard (b):

  1. Objects would Transform using a plane (as posted).
  2. Objects would Transform using a plane related with the curve (according some rule: for instance a perp Plane at Crv.ClosestPt … etc etc).

With regard (c):

  1. Global filtering: all objects would Transform using the curve as “attractor” (as posted).
  2. Local filtering: some objects would Transform if some condition is satisfied (for instance a ccx event and/or a value contained in some min/max values Interval and/or … blah, blah).

Update: found a couple of minutes for a simple Local condition (If ccx event between object/crv … then Rotate object to rMax) - spot that since the collection is of Type GeometryBase it accepts variable types (for this case: closed curves, meshes, breps).


Your .3dm file did not upload correctly so is not available. I replaced your rippled brep with a square surface and drew my own attractor curve (internalized).

The pattern I see does not match your image. The data trees of arrayed surfaces are a useless jumbled mess so I flattened them. Then I discovered that there are many duplicate surfaces so added the yellow group to cull duplicates. Of 1200 surfaces, only 200 are unique.

You didn’t say how to rotate them and didn’t even try yourself… There are thousands of examples on this forum of how to work with attractors. I rotated the surfaces 90 degrees on the X axis when they are close to the curve, zero degrees when they are far away. (white group)


alongWithCur_2021Dec31a.gh (24.6 KB)