Help with grasshopper script

Hello everyone.

I am super new to Rhino and Grasshopper and I am struggling a bit. I’d appreciate some guidance.

So the task at hand is to create an auxetic pattern that I will then laser cut. I had some help developing the grasshopper script but have already completed this part using the following script.

Pattern 1:

Now the part that I am struggling with is applying continuous differentiation by placing attractor points.

Example: I have done this previously with a normal pattern. I used two attractor points on the second image.
Pattern 2:


So I somehow need to deform the auxetic pattern (Pattern 1) in a similar way so it does something different when I expand it after laser cutting. I built Pattern 1 and Pattern 2 in different ways so I am not able to translate the same logic to Pattern 1. And also I think the issue is that Pattern 1 isn’t a closed geometry but a set of lines that are disconnected so that might be causing the issue. I am super new to this, so please explain it in layman’s terms. I’d appreciate any help. Thanks in advance.

“auxetic pattern”? Here is one of many threads that play with similar patterns:

https://discourse.mcneel.com/search?q=islamic

So a pattern that will morph once laser cut and stretched. The picture you shared is more of what I have done in Pattern 2 which doesn’t have that characteristics of Pattern 1. I need to do what Pattern 2 is doing but with Pattern 1. if that makes sense.

No, it doesn’t make sense to me.

So in the images I have shared Pattern 1 has the properties that allow it to stretch when laser cut which Pattern 2 doesn’t.

With Pattern 2 I have managed to add attractor points that alter the geometry. What I am currently struggling with is applying that logic to Pattern 1. Because Pattern 1 isn’t made of shapes but rather lines (because those lines are going to be cut into) and right now they are very modular and I need to make differentiate them using attractor points. Hopefully this makes more sense.

could you please post the GH file? :slight_smile: it’s pretty difficult to think of solutions without seeing your geometries and data structure

Yes ofc. Here it is. origin_ahmadsaleh9994.gh (24.7 KB) transformation 2.gh (14.9 KB)

The Transformation 2 file is for you to understand the mechanism of the pattern, you can move the angle number slider (first component) to see what happens.

The Origin_ file is the laser cut file that I need to add attractor points to.

this gives a 30 degree rotation-range to the whole pattern (before the lines intersect, which I assumed is no good for laser cutting)


where were you planning to add attractors?
origin_ahmadsaleh9994_Re.gh (21.7 KB)

Oh nice! Does this still maintain the 1.5mm distance I have set between the lines?

Thinking maybe adding the attractor point in the center? so probably need to get the area of the bounding surface for that point?

also if you could please help me change the pattern to fill a 15x45cm rectangle. No idea how the current 15x15 was set to modify it myself.

I did not touch any value that generate the lines, so I think these are the very same ones you used:

this controls the size of the rectangle inside which the pattern is generated

the attractor is placed in the area centroid of the rectangle

these control:
A = maximum pattern rotation
B = radius of circle where max/min rotation happens
C = gives rotation range [0;A] or [A;0]

example:

origin_ahmadsaleh9994_Re.gh (33.7 KB)

1 Like

Thank you so much. This is perfect. I would have never been able to do this on my own (yet). I really appreciate it.

1 Like

it’s much easier than you think :slight_smile:

most of the job was done by grouping and ungrouping the initial pattern, in such a way to get one different branch for each single pattern (3 lines per pattern)


at that point it’s really easy to find the center of mass of each pattern for applying the rotation :+1:

2 Likes

Grasshopper is really fascinating. It is kind of like a puzzle that I try to figure out. And in my head some logic should work but I still don’t know the best ways to translate it into the script. Thanks for the explanation.