Instance/Block procedural sweep profile for sweep 1 rail (procedural)

Hello guys!

I started learning Rhino and Grasshopper a week ago so I am still a total newbie.
The reason I am posting this is because I find it hard to grasp how Rhino and Grasshopper
communicate and since I have a history with 3ds max I naturally tend to look for ways to emulate
familiar workflows in Rhino and GH.
I could not find simple and I mean really simple tutorials on Grasshopper which would help me with my problem hence I hope you guys will help me.

I drew a little diagram for better understanding.

What I am trying to do is to generate sweep profiles from curves (rectangles /w fillets) which I can then manipulate any time to try out different iterations
once they are incorporated in 5 different sweep 1 rail functions.
I set up a “sweep profile” at position 0,0,0 in 3d space and would like make an instance of it and move and rotate that instance of that sweep
profile to/at another position in 3d space (at the beginning of a rail curve).
There is however no “block” function in Grasshopper and I can not select the curve primitive rectangle in the Rhino viewport to “block”/instance it.
Ok, and when I draw the rectangle in the Rhino viewport and define it as such in GH I am not able to procedurally define width and height… :-/
Please, what am I doing wrong? How would you go about it?

This is my GH so far:

Kind regards,

Does using an Orient component do what you need?

I think the leap to a block concept is to think of the left most component (of the geometry) as the ‘block’. If you Move, Copy, Orient etc within the GH def, you’re creating instances.

Some of these tutorials may be helpful too.

Hello Brian,

Wow, that was fast.
Basically, yes! The Orient component does what I expected …BUT…
the problem with this method is

  1. the rail curve is not in the mid-point of the sweep profile curve but at the corner of “your rectangle”
    can’t it be positioned with it’s MID-POINT at the beginning of a rail curve?

  2. I have my original sweep profile oriented in XZ Plane and the rail curves like in this diagram for example (viewed from top):

    the beginning of the sweep is skewed and so is the entire sweep
    I managed to fix it by appending and tweaking a rotate component
    but it seems so over complicated compared to the sweep modifier in 3ds max or even the pipe command in rhino
    Rhino’s pipe command also assumes the “right” rotation/degree of the beginning of the sweep

Also thank you for the links.I have already watched tutorials of that kind, but what I really am looking for
are tutorials that show how to accomplish simple workflows from say “3ds max/Railclone Pro” in Rhino/Grasshopper
These are very very hard to come by.

hi Octavia, im also coming from 3dsMax, if you are new to grasshopper, a good start for you is to visit
there you can find tons of pdf tutorial and stuff.

if you want to position your profile curve to be at the center line of your rail, simply use [AREA] component and you will get your profile center point regardless of any profile shape you have.
I went through a lot of “ugly wiring” here just to get the same control to 3dsmax sweep modifier, in which you can easily choose alignment point to your rectangle profile = (bottom, bottom corner, etc,u know what I mean.)

there I create set of “rules” for my rectangle X and Y input so you can control alignment pretty easy.

if you have problem with orientation, it is most likely caused by your railCrv. check your rail Crv direction by evaluating your curve. you can see construction plane displayed on your viewport if you use any [eval] component that returns point. (if you dont see any, simply increase the size of your display plane on grasshopper menu bar = Display -> preview Plane Size) that aids me to make sure my curve vectors are in their desired direction.

just a reminder, I often do this kind of mullion creation in GH to mimic 3dsmax sweep modifier, all I can say is that sweep component in GH is t0o slow if you have hundreds of rail to work with.with NURBS srf as end result. I ended up redoing all definition to output them as mesh instead, with iteration slider to adjust its smootheness. (basically trying to mimic 3dsmax sweep modifier)

as for “block” instances, currently GH doesnt have block parameter to extract block instance object in your scene ( I believe u use block instance to connect your profile curve to other Application)
I would use [PipeLine] param. instead so you dont even have to asign your curve to [Crv] param., simply rename them or put them in specific layer.
when you export your profile curve or your rail curve from other application, make sure you rename them to match with [PipeLine] set up

Hope that helps.

Here’s how I’d set it up if the profiles are to be perpendicular to the rails. Any luck?

Hello Runnie, hello Brian,

Thank you for your suggestions.
Please be patient with me. I am slowly dissecting each node, rewiring it and trying to understand its function :wink:

What a relief to meet someone on this forum who is also an Autodesk refugee :wink:
Like you said: the area component centered the section/profile crv.

As for the section Crv orientation and Rail Crv direction - I did use an Eval Crv Component, but honestly …I wouldn’t know what’s next …yet.
I agree, you made a pretty nifty node setup to emulate the 3ds max sweep modifier, which saddens me a bit because of the effort which is required to achieve the same in Rhino/GH
altough I have found something which comes pretty close to sweep mod. --> see @Brian/ mesh sweep

what I meant by “blocks/instances” was simply something which allows me to work with a piece of geometry at on place in 3d space (0,0,0)
which is instanced/referenced somewhere else in 3d space and/or rotated, upside down etc. being updated on the fly.
(when you shift drag geo in max, the pop-up asks you copy, reference or instance… =-)

oh right, the shortcomings of my current node setup:


-> Rail Crv is moved, sweep does not update -> I repeatedly need to “set one point” :frowning:


if I move the control point of Rail Crv the orientation of the section Crv does not adapt accordingly…

I re-created your setup the best I could and it seems very robust compared to my previous one!

However, something is missing, because section Crv is not centered (Area Component won’t fix this in this particular example) and I do not know how “to enter additional data or lists”
and I clearly can see those fancy wires going from your PFrames/F to L/Item to B/Orient etc. etc.
Could you let me have a peek inside?

Also, I have found this tool which executes a sweep command reminiscent of Max’ Sweep Modifier (for those coming from 3ds max with no patience to tinker around :wink: )

And going one step further:
Which components would I need to use to specify two section Crvs / Rail Crv? A larger one at the beginning, a smaller on at the end of the Rail Crv --> then Sweep in between.
It does work with a normal sweep component -> Set multiple Section Crvs, but is not so straightforward with these more sophisticated networks (at least to me it isn’t…)

Thank you for you help, guys!

I deleted the last one but here’s a new def that I think covers what you need. (12.8 KB)
MultiSweep_3dm.3dm (299.8 KB)

hahaha yup, I went thru alot of trouble because I need to ouput it as a mesh instead of NURBS and I plan to bring geometry back to 3dsmax that is why the set up is kinda unnecessary long but I coudlnt avoid that as I need to make sure the data tree for my mesh is clean for further editing in Max.:slight_smile: the good thing about grasshopper is that we can customize it to suit all your need :slight_smile: whether you want to ouput it as mesh or NURBS.

if you want to work with piece of geometry on 3d space (0,0,0) almost all component that deals with transpose and alignment needs to input “base” geometry so you can always specify which point in 3dspace will be the base of your geometry. (it can be world-based or even Local-based depending on how you set it up :blush:

as for “instanced” or “referenced” copy in grasshopper it is just a matter of the way you plug your wire to your next definition.

if let say you have definition A and create several copy out of it then you have an “instanced” copy. , that is changing initial parameter will affect the whole copy.( one thing there is no such thing as “copy” in grasshopper, any thing that you output as an array of list will be “copies”)

if let say you have those copies of definition A but then you plug the output to Definition B with additional control relative only to Deftinition B. any copies derived from definition B will be your “reference copies” that is, changing initial parameter witll affect both Copy A and B but changing additional parameter relavie to Def.B will only affect Copy B.

I hope that clear things up, if my english confuses you (me spik broken inglish) maybe @BrianJ can give further explanation.

WOW, well, it is exactly what I had imagined and what I was trying to achieve.
Now I just need to dissect it piece by piece, append a panel to everything and try to understand it. …and only then I can truly enjoy it :smile:
Thank you Brian!

Thank you for that explanation, Runnie!
As far I understand the only way to obtain an instance of an object in GH is the orient component (as was explained by Brian)
Are there any other components that do something similar?

One peculiar thing I noticed is that in Rhino a closed 2d polycurve can not be made a block, but instead must be exploded first…
That is kind of odd…

and your english is giusto fine :smile:

every single [Component] in Grasshopper can create an “instance” behaviour like 3dsmax, because what [component] does is basically modifying any Attributes of your Parameter. (be its position, its orientation, its size or its data structure,etc)

all grasshopper “Nodes” can be classified into several different type = ( I will try to find an equivalent “function” in 3dsmax to make u better understand how this works)

  1. the first type is called “Parameter” this is basically any 3D and 2D Object (or even a text, or image) that you input before you modify its attribute. think of them as Primitive Object or PolyObject in 3dsmax (Poly, Mesh and Curve(Spline)
    you can see “parameter” nodes on the first tab of your canvas

  2. the second one is called “component” this as I have said, are nodes to modify any data or information once you have the parameter nodes connected to it. think of them as "Modifier stack in 3dsmax , like edit poly (change vertex location and polygon topology), FreeFormDeformer, Space warp/Local modifier, etc etc) component in grasshopper works pretty much like scripting. meaning you can tell them to do hundreds of operation without having to do it manually.(for example, with CurveParameter connected to ExtrudeComponent, you can extrude them all at the same time, and even add simple logics or math to drive different values for each curve.

3.Grasshopper comes with several sets of Input Utility node to help you to adjust any type of value “on the fly” those are sliders, MD sliders, buttons, etc, those are equivalent to 3dsmax Helper object(Slider) linked to Object’s transform or attributes (like you create helper slider. link it to PolyObject "Z direction and you can scrub the slider and your object will move in Z direction according to your slider value)

the advantage of grasshopper over 3dsmax (at least before 3dsmax version 2016) is that you can modify data tree. the tab is under “Sets” Tab. there you can access different component specifically designed to edit data tree.

in 3dsmax 2016 however, they have MCG (Max Creation Graph) and can do similar stuff.I havent tried it yet as I have ended my 3dsmax subscription and move on to other software.

a good resource for you to understand all of this thing is to visit and they have PDF tutorials to help u go thru this thing one by one.

I hope that helps.


u can input closed Polyline to any of your parameter make sure u choose “Curve” parameter, double click your canvas and type “//” and Enter, you will get a mini notepad (in Grasshopper its called panel) just connect anything to that “mini notepad” and you can read your parameter explanation listed there.


yes, I had figured those out after watching some tutorials and you explained it very well.
As to, I did browse through the downloadable materials,
especially “generative algorithms” and “grasshopper primer”, and find it rather dry…and too generic.
I think my biggest problem is like with math in school - I always need an example or workflow similarity for a respective algorithm or at least easier, dumbed down language
to memorize and understand its function.

Furthermore, I would very much welcome a group for “3ds max + RailClone/Para3D refugees migrating to Rhino + GH”,
because as much as it saddens me: 3ds max and especially Autodesk are dead to me.

“generative algorithms” by mohamad khabazi is a good start really, he explain things down to the very basic. I strongly recommend to follow his examples one by one and u will find it extremely useful later on.

most of the time you dont need to write math equation unless you are aiming for extremely complex deformation. so dont be scared when people mention the word “math”.

if you are still comfotable with 3dsmax-Para3D workflow, you can create half the stuff in Max and then bring it to Rhino and let GH handle the rest. I use Rhino+GH to support my modelling in Maya. so if you still prefer 3dsmax with Para3D I suggest you to use both.

I do agree that there should be a dedicated group from people who is coming from AD. but to be honest I found very few people actually hav gone thru years of Max modelling in this forum. so, having that subforum is very unlikely. here people are more familiar with NURBS modelling.

may I know the reason behind this statement? :smile:

3dsmax 2016 has MCG(Max Creation Graph) it might worth a try if you want a more simplified node-based modelling.


During my time as a student I was offered a free educational 3ds max license.
I dedicated a lot of time to this program and I would have bought it, but then
I learned how bad Autodesk is treating their customers in regards to pricing, subscription (punishment) etc.
I feel betrayed and I do not want to support a company like that.

McNeel, on the other hand, offered me a 80% off of the original price plus I am allowed to us it on at least 2 computers
and also for commercial purposes (…which I do not need, but it is good to have)
And I am pretty sure I will update Rhino to v6.