Grasshopper

algorithmic modeling for Rhino

here is what I want to do.

Specify two curves from rhino

divide both by an integer (say 10)

connect the division points from 4-8 only.

How can I do this?

thanks

Views: 17780

Replies to This Discussion

cull pattern, set pattern as true, false or vise versa. Or use dispatch component

another approach might be something like this.  

Reference in curves from rhino, divide curves, define range of list items that you wish to retrieve, (i used a series but you could also use a domain and range component), then feed that into a list item component. In this case, 2 curves were referenced in from rhino into the same curve parameter.

When those are fed into a divide curve component, the data is structured into 2 separate data branches, (one for each line).  so we end up with a list of points that lhas a data structure like this:

{0;0} N=11

{0;1} N=11

The series component defines the range of items I want to retrieve.  By feeding the list of points into a list item, then using the series of numbers as the items to retrieve, you get the corresponding items out of both branches of data.  The explode tree component separates the branches, (list of points for each curve), then connect them!

Hope that helps with an understanding of one possible approach!

without exploding trees, which can get annoying if you change the number of original curves or if you have a lot of curves.

hi,
wanted to ask a question related to the topic.
i have a 3 dimensional list of points.
how can i cull the list in 3x3 dimensional list?
so that i can create (with this cull-pattern) lines
in the spezific (x,y,z) directions.

or you know one blog_diskussion for this item?

many thanks

 

Attachments:

Hi

I am looking a solution to cull only the end points of a list.

I can cull the list individually 1 by removing 1st end point and 1 by removing 2nd end point.

But that's not working out, I want to it at once.

Please guide me

Hi Rashmi, you can Shift the list(s) +1 with wrap set to False, then shift it/them again with 1, wrap also set to False. (Or the other way around.)
You obviously used the forum's search option, but if you try some more I bet you'll find several other ways to achieve this. It might even be in the FAQ.

Great. It worked.

Thanks a lot.

Hi.

I have another problem which is not related to culling.

I am trying to create the polygons placed and sized randomly which is a very common exercise. 

Like image 1

But I am facing two problems

1. I want to control some minimum distance between the polygons so that the moment they intersect, the command fails or does not follow.

2. When I am increasing the size of my rectangle, the polygons are going out of the rectangular boundary. I want to control them and not letting them cross the boundary. The moment they exceed the boundary, the command should stop function or does not follow.

I am sending the pictures and .gh file for more clarity.

I have been trying to search this on internet but could not find the apt keywords to explain this problem.

 

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service