algorithmic modeling for Rhino
Hi, I have a collection of closed polylines I want to assign to layers. Now as far as I can ascertain, grasshopper does not link this type of data with in Rhino, but if I can simulate my layers in the Grasshopper environment I should be able to create the layers in Rhino, once baked...right?
First how can I take my curves (polylines) and assign each individual one a specific value, specifically a layer with a name and a colour?
Secondly how do I get these parameters baked?
I am a relatively new Grasshopper user and my knowledge base is very limited so please understand where I am coming from.
Thank you.
Tags:
If you right click on the component in GH that contains your closed polyline and then click on Bake in the context drop down menu a window will open that will allow you to select the layer you want to bake the lines into. I believe that the layers need to be already defined and named in Rhino. There are some other options that might also be of use to you in that Bake panel.
I have continued my search and found this site http://www.giuliopiacentino.com/grasshopper-tools/ with exceptionally clever and useful tools. I will see if they can solve my definition. Thanks Giulio.
Hi Chris, thank you for your response. I am aware of this option.
What I am trying to achieve is to take a collection of closed polylines and in Grasshopper assign each of these polylines to a layer that will get baked with it. I would also like to bake all of the curves simultaneously as there will be many of them and each one must be on a separate layer. I trust this makes more sense of what I am looking to achieve.
Rob,
You can try it with Guilio's bakeComponent.
As a strategy try the following:
1. Use ListLength to get your number of curves you would like to bake.
2. Wire it up with a SeriesComponent (ListLength value into Count input)
3. Use Concatenate (Input A: Layer_ , Input B: SeriesComponent)
4. Wire it up with the bakeComponent (layerInput)
Bake it. This should bake your geometry on separate layers.
Let me know if this works.
Best,
Ralf
Thank you Ralf, I am currently working with Guilio's component, and will add what you have mentioned in your strategy along with what I am busy with, and will let you know where I come out.
All the best Rob.
Hey Rob,
You can reference you polylines and it creates a list of them, and then you can set up a point attractor, and have that distance be the set of numbers you use for the component gradient color componenent. ry this out
Hope it helps,
Thank you very much Brepkrew. I have attached my definition so far, and as you can see my needs are very specific as far as colour and layers are concerned, so although I have not used the first part of your definition, I note you have an up to date C# bake component, which I have used, thank you (Giulio Piacentino's components seem to be out of date(old) and I am not up to scripting.....just yet).
Ralf, my definition is now doing what I want in terms of baking my polylines to my specified layers, with the correct colour and order all in one go, which is what I wanted, BUT....
My geometry is broken (attached image), and it is something I see in Rhino from time to time with its contour function, which if it is the same problem as in Rhino, means I must repair my geometry, which I will look into.
And the other thing is, although my polylines are the correct colour, my definition is not creating the colour for my layer properties(attached image), it is creating the colour as a display colour. If you offhand know of a way to correct this that would be great. If not I shall continue my search.
Thanks, Rob.
Rob,
I think you need to tune in Guilio's component the way how the colour is assigned to the layer or to the object. It's probably best if you ask him directly.
In the meantime you can use the component I did a while ago. It's a bit of a botch and I haven't really finished it but I think it does the job for now. If it works for you I can also quickly rewrite it as a C# component inside Grasshopper so you can play around with the code.
Regarding broken geometry, if you want you can attach your file and I can have a look. I don't know it on top of my head.
Best,
Ralf
Hey Rob,
thanks for pointing out such a great set of tools.
Hi Jesus, no problem. The real thanks goes to Giulio Piacentino and all of the other clever people leaving pearls all over this site.
All the best Rob.
Thank you Ralf. I will look at your component when I have a moment, very busy presently. I did note that your screenshot of the properties layer looks more like what I am after, thanks.
As for tuning Giulio's component, Brepkrew have done this and it is what I am currently using to get my result. Except for the colour not being assigned to my layer and rather as a display colour, everything else is working great.
My geometry was dodgy as I suspected and this issue was resolved once corrected. Thank you for your kind offer but sorting out ones own mess is usually a good thing, and my Rhino modelling is normally very sharp.
I noted that the definition would not open with out throwing a warning message, (Attached)
Thanks, Rob.
I think what Brepkrew did with the component was updating Guilio's older C# component with a newer version without changing the code.
What you might need to do is tuning the code so it outputs the colour by layer.
Re warning message,
You first need to load the bakeComponent into Grasshopper. It's a component writen in VS.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by