Grasshopper

algorithmic modeling for Rhino

Hello, new Grasshopper here, since last weekend :)

I've been trying to solve this thing for about ten hours now, so it's time to ask for help.

The outline of what I want to achieve is that I have a Curve. In this Curve I have defined the points, I exploded the segments and have added a Perp Frame on the ends of each segment.

Oriented on each Perp Frame I have created a Rectangle from which I have drawn a Box Rectangle.

Each 'other' (odd or even, or each 'second' rectangle in the list) of these rectangles needs to get a negative length value so it doesn't point outward of the curve, but instead so that it has it's length perpendicular to the segment.

So, eventually I want to make it so that each segment has a Box Rectangle placed on it's outermost point, pointing inwards. Half of these Box Rectangles is already oriented in the right direction, but I don't know how to single out half of them, or construct two lists with the 1st, 3rd, 5th, 7th, etc. and the 2nd, 4th, 6th, 8th etc.

I have added screenshots, I am making this as a personal project for a school project on the Art Academy and am really eager to learn to master this Grasshopper a bit more.

Before trying to do it this way, I tried to do it with Sweep1 Rail, but could not get the orientation along the segment, and also I didn't manage to find out how to limit the Sweep1 Rail to a certain distance (like 30mm for example).

I had imagined this should be done by projecting a second line of 30mm from a segment outer end inwards from both sides and using this second 30mm long line to put the Sweep 1 Rail on. Then I could close the ends, do a Union, Merge all Faces and be done.

However, I couldn't figure it out and the method I'm trying to solve now has gotten me further down the line of the process.

The next step in my process will be to be able to generate a structure on a point of a curve where I can project a certain shape on. Then I want to export this collection of shapes as an STL and 3D-print them. (I have built 2 3D-printer all by myself).

The parts are connectors to connect cheap aluminium extrusions together with minimal effort so I can start prototyping a shape for a small carriage I am designing.

If my explanation is unclear, please tell me, I am new to this, and my mother-language is Dutch, so mathematical terms are a bit difficult for me to understand, but please do use diffcult terms in an explanation where needed. I can only learn :)

Hi from a very happy new user of Grasshopper!

Views: 2345

Attachments:

Replies to This Discussion

Hi Marinus

If they are always going to be a pair of distances one positive and one negative then I would approach it like this

Thank you so much Danny! I knew I was close, but this close!? No Graft and the Negative added solved it!

I didn't know that if you would just hook up two lines to the number slider it would then apply the first result to the first one and the second one to the second box, following the list all the way down.

This is a big moment. Thanks again!

Now I discovered that when the corner is too sharp, the corner of the Box Rectangle point to the outside of the corner, so I will start to try and solve that.

Maybe I will still have to start using a Sweep1 Rail instead of the Box solution. Give me some time, I will try to figure it out. If not, I will create a new topic as I think it's clearer for when someone is looking for a similar solution that it is in a new topic instead of in the tail of another topic.

- Marinus

Here's a method that works out the Average Plane at each vertex and then uses [Project Along] to get the shape at the corners to loft.

Wow, okay, I have to take some time to inspect each component you have used.

Would it possible for me to add the same functionality of having it only [Project Along] for a limited distance?

I was thinking of first drawing a line on top of the original used curve, but seeing this, it is probably not even neccesary.

Time to play!

Yeah. I would therefore use the [Dispatch] component and the [Reverse] vector component.

This one is setup to allow multiple closed curves so it has some [Shift Paths] to manage the data matching.

Think on. This would be better to get perp. edges. It shortens each shattered segment by the desired amount.

Lots for you to digest. If you get stuck I'll upload the definition... but try to figure it out yourself.

Update:

I changed the perp frames from 10 to 1 and now it works!

Sorry, I couldn't find it, but I started just checking each value and found out the perp frames messed it up.

Now it works great :)

Older content of this message:

I think I almost got it now, however there are parts sticking outwards from the corners, I might have made a mistake somwhere, but I can't find it. It looks exactly like your script.

Could you take a look?

Here it is:

http://s000.tinyupload.com/index.php?file_id=08686657663883588384

Sorry that was my fault. I did post the solution further down but you probably missed it:

http://www.grasshopper3d.com/forum/topics/select-each-second-box-re...

Hey thanks, indeed I didn't see this!

Meanwhile I've come a long way, however, I am trying to add holes in the connector piece and the solid union of the lofts doesn't want to work. However, if I bake them and then do a Union in Rhino, it does work somehow.

In the attached image you see that I managed to get 2 of the holes on one of the pieces (bottom-left), but on the other pieces, the holes that perform a Difference on the parts are positioned outside of the part that the need to do the Difference in.

As you can see there is some logic involved, as the space that they are misplaced in is related to the shape of the rectangle I'm using to position the lofts.

I hope I'm not mixing up terms too bad for you, when I talk about 'parts' or 'connectors' I mean the generated corners that will eventually be 3D-printer to connect a set of aluminum extrusions.

Could it be a solution to draw a second box around the first one that is the size of the first box + the spacing of the holes?

In this example you use an expression for the top [Shift List] Shift input. (In the example with [Project Along]).

But, what was in there? I've not worked with expressions before.

Currently cloning your scripts to learn them! They are very helpful. I think you do a good job in showing the possibilities and the approach of putting the result in the same picture with the Grasshopper tree works really well.

It was "-x" basically the shift list components are there to get the previous point and the next point.

If you look in the next example I remembered to scribbled the expression next to the component.

Thank you for the praise, but I take no credit in its implementation. If you go to the File Menu you will see an option for Quick Image Export. This brings up a screen capture of the Canvas and then you have various options like the Viewport window and The version number etc.

David puts a great deal of effort into making GH user friendly especially for teaching. For instance if you hold down Ctrl+Alt and click and hold on a component it will show the user where it is located. If you also include Shift a Save dialog opens allowing you to save the same image for use in the forum:

Ah, yes, before I started I did all the video tutorials, I've seen that one before. The program is very carefully maintained. I like that.

But for the "-x" expression, when I set the expression to -x it gives an error.

I must be doing something wrong.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service