Grasshopper

algorithmic modeling for Rhino

I have a problem which I was hopping to get some help on. I'm trying to use grasshopper to draw an arc of given radius tangent both to a straight line of given length which passes through a fixed point and to a parabola/spline curve. I've attached a picture which will hopefully help clarify what I am trying to do. The two parameters that are not constrained are the angle of the straight line (alpha) and the angle of the arc (beta). I would appreciate it if someone could help me draw this shape using grasshopper for any given curve, straight length, and radius. I've included a grasshopper file with the point and curve internalized as a starting point. I appreciate any help and suggestions.

Views: 4079

Attachments:

Replies to This Discussion

That's really nice!

I didn't get too much into this because I didn't think this can be fully automated.

For example, if the curve is very "curvy", there could be 2 (or more?) acceptable solutions (well, I see you tackled this cleverly in your definition) or, if the point is too far away from the curve, there could be 0 solutions, etc...

Also I am not really sure my solution (with the curve offset) will work for every curve. It is ok for this case where the curve is straight-ish but I believe it could really mess things up with high curvatures... (especially since the offset component has some problems of its own)

ps. thanks for the mention, yet I always sucked at math (my approach in this was purely geometric) :) 

Surely it's not full proof. There are indeed certain conditions for the curviness of the curve, in combination with the set radius and line length, but I think it'll work for curves like the curve Ayed posted. Let's see what he thinks.

Thanks for all the help guys. I'm a little busy with some other work at the moment so I didn't get the chance to look into/test Pieter's solution, but I'll let you know how it works out when I get the chance. As for the curviness issue, the problem I am trying to solve is setting out post-tensioning tendons in a curved bridge. There are certain requirements that dictate that the ends must run straight for a certain length and that the radius of curvature must be a certain value or larger. In general the plan view curve of the tendons isn't expected to be very curvy so I don't think there will be any issues, but as you have said it would depend on the radius and line length inputs.

Again: credits to Nikos for the clever thinking.

Pieter, maybe I'm misunderstanding, but the last gh file you attached requires a direction as an input for the straight line rather than the radius of the arc.  It doesn't match what is in your screen shot. I tried recreating it from the screenshot you provided but there is a number component with an expression which I don't know whats in it so I was hopping you could upload the gh file itself. Thanks.

I don't follow Ayed, please rephrase the question.

Ah sorry my mistake. I think I reopened the original file you posted (Arc PSG) rather than the latest one (CurveArcLine NT PSG). I didn't realize and thought you had posted the wrong file.

So I'm trying to apply this method in 3D using spheres in place of circles and offsetting the surface that the curves lie on and re-mapping the curves instead of using a planar curve offset. I'm running into some issues and was hoping to get some help. I've attached my gh file for reference. I have excluded some of the stuff you guys added to deal with the fixed point being on alternate sides of the curve since in this instance the fixed point is always below the curve.

Attachments:

I think the problem lies in taking an offset of a line in 3D. its not as straight forward as in 2D so I'm not sure if it's in the right spot. This is probably leading to the intersection between the sphere and the curve to be a curve in some instances and to not exists in others. Is there a better way to do this to get the same result as the other method but in 3D?

I have a similar problem that I need to solve. This time the point on the curve is fixed, but the radius of the arc is unknown (see attached PDF.) Any idea how this arc can be drawn in a similar manner (using offsets, circles, etc.)? I would really appreciate any help. Thanks.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service