Grasshopper

algorithmic modeling for Rhino

Repeating something along a curve and extrude it along another

Hi y'all,

I'm really quite new to GH so please be clement here :)

Here's my question :

I want to repeat an object (a simple rectangular volume created under rhino) along a curve. This I can do easily, as you can see below :

BUT I would ALSO like to extrude these volumes along another curve (the yellow one), so that they automatically fit a given height, even if I change the count of volumes.

Here I'm totally lost  :)

If anyone could give me a clue here, that would be great :)

Many thanks !

Mitch

Views: 3182

Replies to This Discussion

I just did something similar to this, and I was able to make it mostly work. If you post your file, I could build it out a little for you but basically it works like this:

Loft the two curves. Create Perp Frames along the bottom curve and create rectangles large enough to pierce through the entire lofted surface on those perp frames. Then, use a Brep|Brep intersection to find the lines that are created by the planes and loft surface intersection, and use those as Z-vectors to extrude your shape. It should follow the height and orientation of your guide curves perfectly.

Edit: I've been tweaking my own script and I've been told it may not be the best way to achieve it. It might be worth it to you to give it a shot anyway, but just know that I may be updating you later with a better way.

Hi Shawn, thank you very much !

Usually I like to test new stuff by myself but I admit the operation seems a bit complicated for me here :)

I uploaded .3dm and .gh of my work here. If you have 5 minutes in your spare time, it would be just great ! :)

Ps : You'll see in the .gh another version of the script, with an attempt to add colors to it (it works nice but never managed to bake it, nevermind). You can tweak whatever script you like here.

Thank you VERY MUCH for your time Shawn.

Mitch

Attachments:

Well, I've been trying on my own to do as you said Shawn, but this is really beyond my skills here :)

I found something interesting here (http://www.grasshopper3d.com/forum/topics/perpendicular-frames-on-a), but I need to base this script on a Rhino geometry (actually I'm designing a fence).

Again, thank you for your time :)

Hi Mitch,

here's a fix based on your input curves (which are a bit 'off' - watch them in TOP view to see what I mean by that). That's the one in the cyan group. Below that, two slightly altered approaches.

Attachments:

Thank you very much Pieter :)

I just had a look on your scripts, I haven't got it all yet, but it looks really promising !

And you are right for the curves which do not exactly get along. Actually these two lines will be a collection of straight lines eventually, it should be easier to manage.

Loads of thanx again, I will meticulously analyse (and try to understand ^^) what you sent me when I have a moment.

Best !

Ok, I couldn't resist tweaking your script, and I already do have a small question :)

See the image attached. I just reassign the two curves to new lines on Rhino, haven't touched anything else. Why is that on the right of the picture, when the first curve aims high, the upper line does not cut anymore ? Is that because the starting curve is no longer in 2D ?

Anyone who could answer me here please? :)

Thanks a lot !

Mitch,

Sorry I'm just getting back to you now. I'm going to look over everything and see what I can do.

Mitch,

Take a look at the attached files. I think I've got what you want. The definition I created takes the two curves and divides them into an equal number of points, then creates a series of vectors between the two sets of points to extrude a rectangle from. You could change the extrusion shape to pretty much any extrudable curve.

Hope this helps, and sorry for the long wait. It was a very hectic week at work and I had to get some of my own grasshopper stuff to waiting consultants.

Attachments:

Thank you so much Shawn. It seems super nice ! And you managed to include the color gradiant, bravo !

I couldn't find the two rhino curves on your file, but I switched tour script to another rhino (see the picture on this post).

There's only ONE thing I'd like to change here : having all the rectangles PARALLEL (perpendicular to the floor for instance). I'm gonna try to set this by myself, but if you have any clue, do not hesitate :)

Again, thank you for your time !

PS : Just for the record, I'm an architect designing a school in France here, and this is the fence we're talking about. If I can do this, you'll see it built someday ;)

See it here ! :)

http://www.lemoniteur.fr/article/air-architectures-signera-l-extens...

Alright at least I understand why rectangles are not paralel, since the same division is applied to both curves, and they have not the same length... 

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