Grasshopper

algorithmic modeling for Rhino

Hello, I have two lists with 11 branches each. Each branch has one value.

I want to divide each number from the first list with the correspondig number of the second list. However I have some zero values that cannot be divided to each other.

(I attached a pic with the lists)

I want to replace the zero "0" values with "1" so that I can have a valid division.

Could you help me ? Thank you .

Views: 8062

Attachments:

Replies to This Discussion

Hi Dimitris,

Use the "Replace members" component:

Attachments:

Thank you very much! this is the one ! There is something else I would like to ask.. Is there a component that checks if a surface is inside a border, the same way the component

Can you clear that a little bit? Or post a screenshot/sketch of what you want?

You have a closed polygon or curve, and you want to check if the surface is inside of it?


Sorry for the delay.. my internet connection is more than bad.. Ok here is te thing . In the uploaded picture you can see a piece of urban fabric.. The aim is to put the buldings into groups so that each group of buildings corresponds to its square. Namely, I want to relate the buildings to their squares. The initial thought was to represent buildings with points and check with ConEx , if each point( and therefore building) is inside the square or not. Then I keep only the points that are inside the area of the square. However, this method cannot provide a relation between actual buildings (as polylines or surfaces) to the squares. So I need to group the polylines that represent the buildings with their respective square, in order to compare several quantities such as built/unbuilt per square etc.. Any ideas?

Attachments:

Sorry I do not understand you.
Maybe somebody else will.

ok thanks anyway!

There is no check to see whether an entire surface is within a boundary. You can test individual points though, so you could use the Area Centroid if you know that a shape is never part of more than one boundary. Containment Ex is indeed the component you're looking for.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanx David, I quess it should be enough. It is an urban planning project with more or less easy geimetries.. so a building is whether entirely inside a square, or outside. so i guess it is ok to use its centroid .
thnx again

Hi Dimitris,

I was not aware of that component David mentioned, and it seems the solution lies within it.

Maybe this will work for you:

(green surfaces are inside of boundary, orange partly inside, red surfaces are out)

Attachments:

awsome. thats great,

thanx guys.

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