Help needed for Sweeping a Rectangle profile

@Gijs

Thank you for your kind suggestion.
I see that others decided to contribute so I’ll start by looking at the proposed solutions.

Regards
Rodolfo Santos.

Thank you very much Pascal.

The points you used have been manually created @ the knots locations on the Path, in Rhino ?
Screenshot 2021-03-24 at 17.08.55

Is there a particular reason for choosing this approach ?

Regards
Rodolfo Santos

Hi Rodolfo - yeah, I do not know if it is very practical, but it seemed worth exploring - the points are placed manually on the high points and the ends of the path - there is probably a more automatic way. The guide curve determines the orientation of the section curves, to these can be adjusted on the fly by editing the guide curve, is the idea, until you like how it all sits.

-Pascal

@pascal

That’s great to see how other brains are approaching a particular problem.

It is very cultivating and opens the ‘field’.

I’m going to play with this approach a little bit and compare it with the other proposed approaches.

It will keep me busy until the weekend probably.
Fortunately I just finished my webinar series, I have some free time.

Regards
Rodolfo Santos.

@RIL

Thank you very much for this contribution.
Amazing job.

I am particularly attracted by the logic used to evaluate the positions on the spiral.
It is an approach I would never have thought of without having it in front of me.

I’m still trying to figure out the relation between the BaseCrv and the SpiralCrv for changing the overall look of the sweep.


I guess it’s related to the rhino history relationship that needs to be restored…

Regards
Rodolfo Santos.

@RIL

Thank you again.

This definition is both impressive and captivating, it makes you want to dive inside to try to unpack the logic implemented.

If you allow me, I will have to take the necessary time to understand it and experiment it.
I am very grateful for the time spent.

Regards
Rodolfo Santos.

What do you mean by that, though grasshopper ?

Regards
Rodolfo Santos

I work in the following order:

  1. Dividing the helix curve into a point list (“ProfileCount” number of times)
  2. From each point, find ClosestPoint on the BaseCurve (small white points). (ClosestPoint will find a point on the BaseCurve (white points) perpendicular to the starting point).
  3. Make a vector/line between the points (red rings)
  4. Place a “Frame” (Plane) at each division point (see pic)
  5. Rotate the Frame (Plane) to align with the vector/line from §3. Blue arrow represents the alignment rotation.
  6. Place a ProfileCurve at the center of the Frame (Plane) and align the rotation according to the Frame/Plane.
  7. Sweep1 along rail.

You can optionally change the degree of the input RailCurve.
ProfileCount - makes default 40 divisions (add slider to reduce or increase)
GlobalShape - See Rhino Help for Sweep1.
NudgeProfileXYZ - Default {0,0,0} so it doesn’t move the profile in relation to WorldXYZ where it typically would be drawn.

Edit: I also realize now that if you have a sharp curvature 8as in your last picture), the ClosestPoint on the BaseCurve can land “behind” the previous ClosestPoint, and that will screw up the Sweep operation since the points come in scrambled order. Will think about how to avoid that. It probably requires a Point + Index struct which can pick the points in correct order in the internal algorithm.
// Rolf

That’s the behaviour I was referring to.
I will dive into the subject as well.

Thanks for the additional information.

Regards
Rodolfo Santos

@pascal

I see that there are various valid logics used with GH in order to manage the twist when using Sweep 1.

It is hard to imagine transposing some of those concepts in Rhino.
But the idea of using the osculating circle, which I found very elegant as a solution, could it not be a way of thinking for an option ?

Roadlike is one way.
That is a valid strategy in some situations, but there is a need for another strategy to better manage the twist with Sweep 1 with other situations, this thread is one example among others.

How you see things on this particular subject ?

Regards
Rodolfo Santos.

If I think the design to an end then it may look for example like the attached file. What I meant is to generate the geometry by some code with mathematical precision. You may get very clean surfaces with perfect curvature.


Look at the file size of this ring, is less than 200kb. You can easily create parametric variations and it does not matter if you change the “variables” in your code or in the command line or via sliders in grasshopper or by editing some geometry - that’s just the interface.
MathGeometry_jM.3dm (189.6 KB)

Question: Since I don’t know your final use-case, I wonder if you need to have any specific start and end tangent at the spiral ends?

Will/can the tangents at the ends only be

§1. manually defined, or
§2. will they start & end perpendicular to the centerline, or
§3. will they have directions as if the spiral would continue beyond the end points?

// Rolf

Right, I see.
That’s indeed, depending on the intent, an elegant way to approach the problem, it makes sense.

Regards
Rodolfo Santos

@RIL

There is no real generic scenario for the intended purpose.

As the path curve may be subject to arbitrary changes, I would say that

…would be a valid logic in many situations.

Regards
Rodolfo Santos.

Q: What is the intended purpose?

Why I’m asking is b/c I’m experimenting with a component which generates a helix from a center curve (I have use for it myself), but while defining radius and number or revolutions is already done, the start and end tangents of the spiral would have to have a strategy.

Automation would be possible if §2 or §3 would be acceptable.

Swollen Helix

Helix-Swell-Rotate

// Rolf

2 Likes

Fine metal casting.
The needs are both aesthetic and technical.

Automation may naturally help if "mathematical like designs’ is the intent.
The level of control shown( on the resulting path) would certainly be an advantage to better manage the technical side of things.

If you want to share the component in question, I can take some time to experiment it during the WE and compare the results obtained with more arbitrarily shaped model ( using one of the provided GH approach )

This may be interesting to look at for production purposes.

Regards
Rodolfo Santos

What is it that determines the directions of start and end tangents, apart from aesthetics? Not knowing this means that the helix generator can’t be finalized.

// Rolf

Unfortunately, I can’t give too much information about the project, but I can say that the spiral part is intended to be assembled on another part.

The final model must meet aesthetic and technical requirements.

This means that the scenario at the welding location will have to be adapted in an arbitrary way and is therefore not predefined.
For this reason it will probably be more relevant to define the tangents manually ( need confirmation… ).

Regards
Rodolfo Santos.

Even if it is not exactly what is needed, it is always possible to start from the result obtained and make some adjustments manually afterwards.

Getting the desired result in one step is not always possible or relevant.

Regards
Rodolfo Santos.