Divide curves with a specified length and order

Hi There, I am quite new with grasshopper and I love it, however I need to solve this issue for me.
I create sand sculptures and I want to make a definition that helps me calculate the mount of forms I need. the basic lengths of forms are 2440 mm -1800mm -1220 mm and 610 mm.
now for instance when I create a hexagon curve with a large diameter (15000 ) then I want to divide those curves into the standard segments. like: a couple forms of 2400 and than wats left it needs to be filled up with a 1800, or a 1220, or a 610 length. How do I do this.
Basically it needs to redraw a new curve with the standard sizes from big to smaller

Hey Stijgerart,

It would be helpful to have a model attached for context.

I can get you started with the first super simple step. Can come back later when I have time to resolve the rest if someone doesn’t anticipate me.

This will divide your curves by the number of segments necessary for acomplishing the desired (single) element length.


Divide Curve.gh (5.8 KB)

Hi Francesco,

thank you so much for your effort, i am getting closer…however its not quite what I am looking for.

form length generator.gh (32.0 KB)

this is more less wat I like to have work properly.
the input should be any nr. of size polygon.( smallest size 610 biggest 26000mm)Diameter.
Output a close to same size polygon with the largest size forms first down to a smaller size to make it fit with the given lengths ( the polygon will get slightly a bit bigger or smaller, it would be even cooler if it will rounded down or up by choice…
Appreciate your answer.

hope I have understood correctly :slight_smile:

you want to cover the edges of a polygon with given radius (within 610 and 26000) and x edges
each edge will be equally covered using a combination of items with length: 2440, 1800, 1220, 610

first rule: use as many 2440 items as possible in order to cover the most length of a single edge
so we will end-up with a length “still to cover” which is always 2339 or shorter, otherwise we would have used another 2440 item

second rule: combine the least amount of smaller shapes to cover the most of this remaining length

there’s a limited combination of total lengths you can reach by combining only shorter shapes together:
610 ← [1x 610]
1220 ← [2x 610] or [1x 1220] (maybe this second option is to be always prefered?)
1800 ← [1x 1800]
1830 ← [3x 610] or [1x 1220 + 1x 610]

if this set of rules is correct, then you will almost never use the 1800mm item, as it will be indicated as best solution only if your remaining length to cover falls within 1800 and 1829:
starting from 1830 the best result is achieved with [3x 610 = 1830] or [1x 1220 + 1x 610 = 1830]

…or maybe the 1830 option should just be removed in favor of the 1800 item??

Hi Inno,

First of all.
Thanks so much for your time to reply!

your conclusion of the first rule looks correctly to me.
second rule also correct!

the combinations you show it needs to be refined, for instance…
when I make a small form (in a hex shape) then there are no combinations and uses only the smallest form first (610) than as the forms grows the 1220 form removes the 610. than we move up to 1800 up to 2440, after 2440 we connect a 610 , 2440+1220, 2440+1800…and so on.
It could be nice if there is a Method to also have a snapping when the length of an edge is close to 610 ( with a marge of say 200 mm )
about the 1830 situation I try to avoid using short forms unless it is a necessary need. for example…
the forms are connected together with boards (with extended ends) attached to the plywood (sketch included) some forms are female/male situated, others are unisex designed. in that matter we need always have an equal setup to avoid corner connection problems.so a pentagon is harder when the forms are small when that happens another small form needs to be attached to make it fit right)

I made a form calculator earlier that works pretty fine. but now I need to design a very large sculpture and want to make a definition to create the curves first to the given height and with steps of aprox. 35 cm .(see picture) In my case a hexagon shape with a large diameter (25000) and height.


if I feed in this curves into the form calculator I got problems.
I probably need to adjust that definition anyway. it das not take the corners in consideration.

conclusion beside the first problem of dividing, some more work needs to be done.
I am happy to share the definition if you like to improve it!! let me know !

some questions regarding the method to use to translate a shape into curves

let’s say you want to rebuild a volcano shape: first thing you model a weird volcano :slight_smile:
then you find horizontal section-curves on planes at constant distance (for instance every 35cm, in red)
at this point you have to transform those curves into polygons that you can re-create by combining together the straight shapes of given lengths (blue)

about this transformation: polygons are always convex but they do not necessarily need to be regular

for each polygon, how do you chose the number of edges (number of edges which determines the quality of approximation of the original curve)?
image
for instance, looking at the very top of this creation, I see a square
the only way I can think a square is the best approximation of whatever curve might be there, is that the edges of that square are already the shortest available ones (=610mm) so no better combination could be found that would be the best fit

but if you want to approximate a shape that let’s say is much bigger, so you could use a polygon with as many edges as you wanted, is there a rule of thumb that you normally apply?
like the maximum distance between your approximated polygon and the original curve?
or the ratio between their areas always to be not lower than a given %?

can this happen?


or is there a minimum safe distance “d” that each polygon/step must keep from the previous one?

I see most of these edges on one side are aligned to each other
is this a feature like “the most aligned the edges of different contours are, the better it is”, or it just happened to be like that but it’s not relevant?
image

lots of questions :slight_smile:

Hi Inno,

very well thanks!! I am impressed with just your questions, most of them are right on!
the last picture of that mount of forms is wat I can do now with the definition. I have to clean up some edges before I order wood and sand!!
for safety I need a step distance witch can be in a variation between 200 and 600 mm.
That square at the top should be of course calculated with smaller forms so that I can follow as good as possible that hex (or whatever shape/ volcano) (I like that approach of dividing) maybe that area ratio should be a slider because sometimes you want a smaller or bigger ratio (at the top smaller)
about choosing the mount of edges they always should be an even number so that the forms fit together if possible. (for just a square you need 4 forms if you put a fifth because you want a bigger square, they wont fit properly and there need to be 1 form to be added) than you end up with 6 forms! (however I can see you will get more the shape of a rectangle! :slight_smile: but you get the point)

Hi all,
At the moment I am using this definition to divide the length of a curve.
however when I use a larger than component I get in trouble. see def…
anyone can solve thisdivide by sp lengt 2.gh (28.0 KB)
in this example I create a X length curve and it automatically divide it by 2440 the rest of the length is a toggle technique I am not so familiar with. The Idea is to evaluate the length (rest after divide) and see if its shorter or larger than a specific length.

the goal of course is to divide the curve in efficient lengths .
first divide in 2440 than if there is a bit of length lef. could it be a 610, a 1220 or a 1830(*) or if its close to that number snap to it.

  • yes 1830 is the better way to go Inno
    any help welcome

I have tried some “things” in the last days but I’m not very sure if they’re moving into the right direction :slight_smile:

I thought using Kangaroo was the right move because of:
→ line LengthSnap
→ possibility to turn on/off line EqualLength to match weird contours
→ possibility to play with the contours using Grab in real time

but there is one main drawback into Line LengthSnap: I thought to set the snap to 610, because it was multiple of everything, but it comes out the 1800 length is not really a multiple of 610 :slight_smile: so that’s one thing to solve

my approach is on 2D, because once we have found the contours of a given 3D shape, we can as well project them on XY plane, do all the needed operations, and put them back on their original plane + extrusions only as very last step
so starting from a random mountain like this, I find the contours and project them on XY:

now I divide each of these curves into N parts (the number of edges you want to have for each layer), and connect each branch of points with a closed polyline (here I have chosen 6 sides for all of them)

here is where Kangaroo comes into play, because we can force each of those edges length to be a multiple of 610 units, while keeping the exagon points as pulled as possible to its contour curve
in addition we can activate constraints like equal angles on the exagons, equal lengths on the edges of each given exagon…

I did not find a solution yet (but I didn’t think hard enough, and fore sure my Kangaroo experience is pretty limited) for keeping the different exagons inside each other with a minimum distance, like you pointed out here

so by manually modifying an exagon, this constraint has to reflect on all the other exagons (not only the inside ones, but also the outside ones)

long story short :slight_smile: this is what I wanted to end up with, in my mind the possibility to rotate sections was very interesting (expecially if the number of edges happens to be bigger than 6?)

but I’m still far from having it working correctly :slight_smile:


about the edge length you would end up with something like [X+Y]
where X is the amount of units length 2440, and Y is the type of additional siongle small one to add

like for instance 5+0 means 5x2440 and nothing more
while 4+3 means 4x2440 + 1x1800 (ehm… I calculate 1830 there…)
4+2 is 4x2440 + 1x1220… and so on

I’m attaching the WIP definition, still far from being working :slight_smile:
Sand_Sculptures.gh (25.1 KB)

Awesome work you can do wit GH!!
I can only hope t reach that level one day! Ill include a definition that calculates the forms from curves.
Now I can design a form-plan with curves (thanks to grasshopper) however with bigger shapes it would be so better if I just can recalculate those curves in suitable lengths.
check the definition if you like to understand more of the Idea!
mallen berekenaar beta .gh (70.2 KB)

the goal is to produce a form plan . where I easy can see where what form goes , each should have a number and a level ( didn’t add that one in yet)
Btw I was wrong about the 1800 lengt it is a mutiple of 610… so it is 1830!!!
looking foreward

your def is very well done!

I have added a small part here in the beginning, just after the input curves, which forces the length of each segment from each polygon to become a multiple of 610mm

and a small part here next to the dimension line, that indicates how many of each member is used:

so the first part transforms all the lines in multiples of 610, and the second part translates those lengths in info inside the dimension lines text:

what you see in yellow is the original line I drew, and of course you can still drag its control points to change its shape, scale it up/down, and length snap + indications will change accordingly


mallen berekenaar beta_Re .gh (75.5 KB)


about adding level-codes, maybe a solution would be for the code of each wall to be
Level [dot] wall_number ?
where Level indicates the height-level, and wall_number is just always increasing?
so for instance if at ground level you have an exagon, its walls will be named 1.1 1.2 1.3 … 1.6
next level will be 2.7 2.8 … 2.12 and so on?

in this case the level to which a given wall belongs-to, might be retrieved directly from the height (Z value) at which the line is drawn?

Hi Inno,
cool ,very cool The only thing now is how to get forms out of the drawing. I see that the formula is giving out how many 2440"s and how many 1830"s very nice option but… here is the thing. The length for example (2x2440) and (1x610) is a total of 5490mm. Now the forms comes most of the time in sheeds of 2440 ,1830,1220,610. and they put the boards on them as well with extend ends. this way I can made calculations on how many nails/screws I need to combine 2x2440 and 1x610! if I need to make a rectangle for about 5490x2440 it would be cool if the definition shows exacly the seperations (3x2440 1x 1830) X (1x2440)

I added this list that shows all the sizes and quantities you will need for the whole installation:


mallen berekenaar beta_Re_Re .gh (81.8 KB)

is something like this useful? like all the panels needed for each shape, listed per shape-edge?

sorry, I didn’t get this

Hi Inno,
Ill try to explain.
I made 2 screenshots 1 shows the separations between each length and project it on the field above including the beams/boards lengths according to the curve.
in the first example I get very long boards and panels than I have still separate them in useful lengths (so that other people visually understand how many of wat length is needed)

in The other example you see that the curve is divided according to the calculated length and so it displays the forms and boards as needed)
I had to move one point in order to create separate boards and panels.

the information you added is already very helpful, but if the forms are separated in the divided numbers, it means that the boards are going to be longer because they interlock.(have extents)
see picture, in your situation the boards are not calculated with extends and ill order too less in this case.

I think dough that this is the way to go.

ok, the info I get from the above explanation is that the wood sheets are always cut in given sizes 2440, 1830, 1220, 610 and given height, while the beams on top and bottom of each side do not follow this rule, and can be cut in custom length :+1:

I see the amount of extension for the top/bottom beams is now controlled by this slider, that at the moment elongates only the start/end of the whole top/bottom beam:

should that very same slider controls how much extension is applied to each single beam-item that composes each edge? or you prefere to keep the “amount of overlapping of each beams inside each edge” and the “extension at edge start/end” two different separated values?

I mean something like this, blue is “ends extension” while red are “edge overlapping”, same slider for both or two different values?

I think at this point it’s just easier rewrite the portion of definition that handles the 3D visualization of wood shets and beams, because I’m finding it difficult to use data with branches in the existing def

how do you count the amount of nails you use for a given edge?

The values for the extensions can be the same for each form, top and bottom .
The nails are calculated like this: for each beam there will be X mount of nails for each end, top + Bottom.
In real life, most of the time they put in 2 / 3 s crews in the corners and 4 / 6 in the overlapping beams in between.
and last but not the least, the panels need to be amount to the beams with nails or screws (shorter ones than the connecting screws in the corners) again, for each beam divided by length - the extension of course! if it is a 610 form it should be around 4 nails top and 4 nails bottom. I would like a slider for this as well :slight_smile:
and if its possible it would be perfect to calculate the Meters of straps that goes around the forms (needed while compacting the sand inside the forms) also sometimes they put steel bars trough the layers with blocks of wood covering the forms on each side!! how much steel bars is needed and how many blocks. (this could be complicated)
Also think about when we have concave forms!! than you need to cut the extends beams in an angle!
ill include some examples.large

blokhus2020

what is the maximum length of a single wood beam you can use?

I see here for instance that there are two wooden beams connected together despite this being a single straight edge of the sculpture

in case you have long edges that require more than one beam to be reinforced, like in the image, (and this depends on the maximum beam length) I guess the number of screws used for this beam-to-beam connection is the very same one to be used in the corners?
image

edit: this is a super work-in-progress
it divides plywood in given lengths and considers the wooden beams for a max variable length you can set by a slider (it also counts nails, both long ones [beam-to-beam] and short ones [beam-to-plywood]) but all data is displayed in panels in GH, not on canvas yet…

please try it for some minutes using multiple shapes, and let me know if something behaves differently from what you would expect :slight_smile:


mallen_berekenaar_new .gh (118.3 KB)

still have to do the following, which are all pretty easy:
-panel numbering (consider also Height Level)
-all the text that are not dimensions to be displayed on canvas (volumes etc)
-all the 2D views of panels and beams like in your original version

Hi Inno, yes were getting close now!!
the beams dough need to be adjusted in the definition.
the beams always need to cover the panels + extension, length should be a multiple of the panels.
In your picture just above, it would be better if it is overlapping the seem with the extension of course!
but I love the Idea of adjust the beams in case there are long! most of the time they are just the length of the panels + extension, I need this option as well. it goes weird when there is a short form on the end! maybe if possible exclude those ones from the 2440 lengths!

here is another thing I like to mention out, and perhaps need to be programmed in a better way.
I created earlier a curve generator to help me create a form-plan. as you can see somehow it didn’t work nicely with the form-generator .


could there be a way to create the curves first in the right dimensions and than feed them into the form generator to get all the data needed?

curve generator.gh (19.1 KB)

1 Like