Grasshopper

algorithmic modeling for Rhino

Roman
  • Eindhoven
  • Netherlands
Share on Facebook
Share
  • Blog Posts
  • Discussions (25)
  • Events
  • Groups
  • Photos
  • Photo Albums
  • Videos

Roman's Discussions

Zip list and sort by Y-value
2 Replies

Hello,I am struggeling with the following (maybe it is quite simple):I am looking for a python script to zip two lists (#1: numbers and #2: point list) and then sort them by y-value and then by…Continue

Started this discussion. Last reply by Marc Jun 1.

Comparing unequal lists
6 Replies

Hello,I have a question about comparing unequal lists to eachother. I have a beam with 5 points, where on two points a reaction force occurs (see image):Points:                        Points with…Continue

Started this discussion. Last reply by Roman May 31.

Python script bug?

Hello,I encountered an very strange solution in a python script. I am trying to compare the X and Y-values of Endpoints. When I print the X values of the endpoints from different lines seperatly,…Continue

Started Apr 24

Connecting/Linking values to eachother

Hello,I have a question about connecting/linking values to eachother. In a first stage I have 15 lines with corresponding Normal-forces (Karamba)(see image):Line 0; -30.83Line 1; -30.83Line 2;…Continue

Started Apr 21

 

Roman's Page

Latest Activity

Marc replied to Roman's discussion Zip list and sort by Y-value
"Here is an example."
Jun 1
Marc replied to Roman's discussion Zip list and sort by Y-value
"Hello, A couple of list comprehensions should do the trick:## Script start ## # get the y-values from your points listy_values = [pt[1] for pt in points] # zip the points and y_values lists together and sort by the y_valuessorted_pts_y = [pt for (y,…"
Jun 1
Roman posted a discussion

Zip list and sort by Y-value

Hello,I am struggeling with the following (maybe it is quite simple):I am looking for a python script to zip two lists (#1: numbers and #2: point list) and then sort them by y-value and then by x-value. For example:#1: Numbers                #2: Point list1: -39.3                        {0.35, 0.3, 0.0}2: -439.9                      {1.25, 0.3, 0.0}3: 513.2                       {1.65, 1.3, 0.0}4: -10.2                        {1.25, 1.3, 0.0}5: 326.1                        {0.35, 1.3, 0.0}Now…See More
May 31
Roman replied to Roman's discussion Comparing unequal lists
"Exactly what I wanted. Thanks"
May 31
Anders Holden Deleuran replied to Roman's discussion Comparing unequal lists
"Something like this maybe (using in and list.index() to first check for value containment and then get index):"
May 30
Roman replied to Roman's discussion Comparing unequal lists
"Yes something like that. But I want to script it with variabels so Grasshopper recognizes the reaction force per point itself and I dont have to select it by meself."
May 30
Roman replied to Roman's discussion Comparing unequal lists
"A python script"
May 30
David Rutten replied to Roman's discussion Comparing unequal lists
"Are you looking for a solution using Python, VB or C#?"
May 30
Hyungsoo Kim replied to Roman's discussion Comparing unequal lists
"Something like this?"
May 30
Roman posted a discussion

Comparing unequal lists

Hello,I have a question about comparing unequal lists to eachother. I have a beam with 5 points, where on two points a reaction force occurs (see image):Points:                        Points with reaction force:      Reaction force:#0 {0.25, 0.1, 0.0}     {0.25, 0.1, 0.0}                    1071.43#1 {0.45, 0.1, 0.0}     {7.25, 0.1, 0.0}                    1928.57#2 {1.05, 0.1, 0.0}#3 {4.75, 0.1, 0.0}#4 {7.25, 0.1, 0.0}Now I want to create a new list with the reaction forces at each point and…See More
May 30
Roman posted a discussion

Python script bug?

Hello,I encountered an very strange solution in a python script. I am trying to compare the X and Y-values of Endpoints. When I print the X values of the endpoints from different lines seperatly, they intersect. However when I compare the lines to eachother python states that it is false, which is very strange since they actually intersect (see images). Does somebody know if I am doing something wrong or if this is a bug in python?Thanks in advance,See More
Apr 24
Anders Holden Deleuran replied to Roman's discussion Sorting midpoints by y-value and x-value
"This post/thread might help with the general problem of sorting in Python."
Apr 21
Roman posted discussions
Apr 21
Roman replied to Roman's discussion Remove duplicate lines
"First of all thanks for your quick reply. And yes it works, the dispatch component and comparing the length of curves in combination with a cull pattern.  Thanks a lot Ibrahim "
Apr 19
Ibrahim replied to Roman's discussion Remove duplicate lines
"Hi Roman, Can't you do it with the dispatch component using a true/false pattern comparing length of curves in both lists ?"
Apr 19
Roman posted discussions
Apr 19

Profile Information

Comment Wall

You need to be a member of Grasshopper to add comments!

Join Grasshopper

  • No comments yet!
 
 
 

Translate

Search Grasshopper

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service