Fixed Angles Polyline for Waste Water Pipes

Hey,

im trying to get this working:

Draw Points, for reference (onlx xy, no depth); Find a path aproximting those reference points, using a specific bunch of angles, in this case 15,30,34,67,87° an their negativ counterparts; Those Values are specific for wast water pipes in germany, and its always a pain in the ass to draw stuff like this by hand…

Well i have it running, but my lack of programming knowledge drives me a little bit crazy; how can i “repeat on demand”, so if i add another point, it adds a new set of fixed angles; sorry i cant be more precicse about my problem, because i dont know how to formulate it properly, in lack of my programming knowledge; maybe someone can have a look into my grasshopper network, and tell me what to do to make it more responsive and adaptiv…

Locked Angles.gh (43.8 KB)


WHOA :bangbang: Not “The Grasshopper Way”.

:rofl:

yeah, thats exactly why im asking for some help; i could say: it aint stupid, if it works; but it seems to be quite stupid to my eyes

Looks to me like it doesn’t work. PLine is null. There is a reference point that is not internalized but that doesn’t seem to be the only problem.

You are asking for a lot of work! I don’t even understand your description?

10 points for reference; set multiple points;

No, you do it.

my problem is: that after setting the first vector from point 0 to point 1, i rotated this first vector into several directions (-15,+15 and so on) those vectors get the distance between point 1 and point 2 as length, now i use closest point to get the closest point (end points from the rotated, aka multilplied vector) to point 2; from now on its repeating, but i dont understand how i can make this repetition work;

la.zip (153.8 KB)

seems like internalise data doesnt store the right order for the referenced points…

Could it be more easy to define a curve that is followed by you curve ? I think it will be needed to define also a min length and max length of tube.

this is a dirty sketch of the first idea that came to my mind, a lot of redundancy… it’s just a sketch!

Mario_the_-German-_Plumber.gh (24.9 KB)

[it requires Anemone plugin]

image

Nice work. It gets more complicated if the polyline is not planar, eh? What if vertices move up and down, yet fixed angles must be maintained?

Your right, i tried it, its a little bit easier and flexibel, because the point order is maintained; but i still have the same problem when i want to add more or less points;

Yeah, its getting more complicated thats why i would split the workflow: at first im trying to get the 2d curve and those fixed angles, for the second part, the 3d part, i already found a solution to add a constant incline at each point; do you have an idea how i can get rid of this shitty part of my definition, where i have to reconnect out and inputs at every new referenced point?

I think (and hope, to be fair :smiley:) Jakob wants this to work in 2D only :joy:

my approach is indeed no good if the number of sections you want to use is different from the number of sections that are drawn

Its the other way round, the 3d part is pretty simple, to find a “route” with fixed angles, from start to end with a few stops inbetween, thats the complicated part; to be fair;

The whole thing looks “shitty” to me. Abandon it all and work with @inno’s loop approach. :wink:

Bake the Join after Loop End, modify the polyline (add/remove segments) and “import” it to GH again. Make copies of the GH file when you do.

Don’t internalize the polyline so you can drag its points in Rhino.

Mr. Oster, thanks for nothing; ill guess ill wait till someone wants to give me a hint; i guess my approach in grasshopper is just to simple to your experts eyes, as your graphics and designs are to my eyes; i could give you a hint, how to do some proper design, some graphics that dont look like straight outta ps1; couldnt you give me a hint on a little programming?

Well, well :bangbang: I guess we are done then. Bye-bye.

adding points to a Polyline can be done in Rhino by menu command Edit → Control Points → Insert Control Point then you click where you want the point to be added on the Polyline and the definition will update accordingly

I understand you might prefer to work with just Point entities instead of a Polyline, it’s also easier to add points to the Rhino canvas, but the point order is the main issue: in order to just “read” the points on
the Rhino screen and get them sorted the way you want (despite the order they were created) you need some sort of “helper” thing

for instance, you could use a helper Curve along with the points are sorted: the curve does not have to go through each point, it just has to flow in the same-ish direction you want the points to be sorted
that way, whatever point you add in Rhino canvas, they will be part of the calculation


Mario_the_Plumber_using_points_and_a_sorting_curve.gh (21.5 KB)

the main point is, this loop is very “stupid” meaning it doesn’t allow you to really control the exact trajectory of the final result… if your initial points all have angles of 45° between them, then you already know in advance that is impossible to accomplish as you have corners at 34° or 67°… but maybe you would be happy to have each time two consecutive corners of 30°+15°=45° to make the trajectory as similar as possible to the original one… those are all things to consider but only you can enlight us on those :slight_smile:

so everything depends on what you wanted this thing to do for you
for instance, you are drawing some points on the canvas:

  • if you draw 10 points, those points define 10-1=9 lines: would you expect the final solution to be composed by exactly 9 sections of pipe with 8 angles in between? (prioritize number of sections/corners)
  • or would you expect that the final solution passes through those points exactly? like “no matter what, the final piping need to have angle-parts over the location of those points” ? (prioritize passage point location in disfavour of number of sections/corners)
  • or would you be happy to draw a general nurbs curve that flows more or less in the neigborhoods of where the waste piping should flow, and then start populating it with points to create sections, and play with those looking for a compromise?

the way you define the problem very much influences the type of solution you might be able to get :slight_smile: