A line tangential attached to cylinder. Could probably be done more easy?


line tangent on cylinder2.gh (12.2 KB)

It works, so no question about how to solve this.
But I have the feeling/idea that this could be done much easier, but have no idea how. Like to learn from your reactions.

This is how I did it:

  • Created a cylinder
  • Created a (temperorary) line, what hoovers a bit above the spot I want it.
    Then started the searching because: no tangent lines possible to cylinder only to circle.
    Tangent lines must be in same plane as cylinder.
  • Found closest point between line & cylinder
  • Made an isocurve there
  • Made a temperory line (projection of first line in same plane as isocurve).
  • tangent lines on cylinder (isocurve).
  • use the one I needed, and used endpoint for final line.
  • set all “in between steps” on non visible.

Regards, Eef

1 Like

Some options below.

  1. inspired by your use of isocurves:
    line tangent on cylinder2.gh (25.1 KB)

  1. Using an intersection of the cylinder:
    line tangent on cylinder2b.gh (19.7 KB)

  1. Less components with osculating circle:
    line tangent on cylinder2c.gh (21.4 KB)

  1. Or shorter using direction from surface curvature:
    line tangent on cylinder2d.gh (19.7 KB)

  1. Also, use the horizontal vector in the plane when evaluating the cylinder surface (or from the plane resulting from surface curvature):


line tangent on cylinder2e.gh (18.4 KB)

Is this what you meant with your question? Haha
I’ll stop here, I’m sure there are more interesting ways :slight_smile:

2 Likes

Yes, this is fast way to learn. Thank you. :pray:

I checked all them (in a quick way). All very quick. And somehow I like nr 4 best.
But
 maybe I did not mention that enough in my first version.
I started with the line and it is in an angle to the axis of the cylinder.
Most of my effort is put in finding a tangential point on the cylinder from there.
Can one or probably more of your suggestions used for that?

1 Like

:thinking:

I thought I grasped it but maybe I didn’t lol.

Not sure this is ‘easier’ but maybe similar?
line tangent on cylinder3.gh (13.9 KB)

And this is a different thing, I wouldn’t call it a solution based on your description.
I was just wondering if you need the circle to be planar from the beginning, as opposed to fitting a circle through two points resulting from intersecting the cylinder surface with a line perpendicular to the line you’re angling:
line tangent on cylinder3b.gh (18.2 KB)

I’m sure someone will contribute something more elegant! :slight_smile:
Cheers,
RC

Not easy to explain in words, what I am working on, but maybe this image helps. I want to transform this into a precisely fitting tunnel (solid difference) in a bigger part to be 3D-printed in 3D, The belt is supported all the way around and when pulled the load is spread equally.


Getting the line tangential to the axis is first of several steps to go.
Next is some auxiliary axles (in an angle to the cylinder)
 and so on.

(this is a learning traject for me).
You are using a couple of components, new to me:

  • the box, around cylinder, to create a plane where you want it
  • curve /line CLX and Fit line (Fline) to pinpoint it to the surface of cylinder
  • rotate axis Rotax, to get the angle.

The construction with Entwine etc, is for now, far above my “understanding ability”

Thanks for the nice input! Good stuff to work on.

1 Like