Grasshopper

algorithmic modeling for Rhino

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

Roman's Discussions

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

Sorting midpoints by y-value and x-value
1 Reply

Hello,I have a problem sorting midpoints first by y-values and then by x-values (see image) in python language. Sorting by y-value works, however subsequently it doesn't sort at x-value. Could this…Continue

Started this discussion. Last reply by Anders Holden Deleuran Apr 21.

Remove duplicate lines
2 Replies

Hello,I have a problem with removing all the duplicate lines. I want to delete all the lines with the same length compared from two lists (see attached image):List1:                          …Continue

Started this discussion. Last reply by Roman Apr 19.

 

Roman's Page

Latest Activity

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
Roman replied to Roman's discussion Add lines between non consecutive points
"Or is it possible to remove lines if they overlap or if they are duplicate. I know it is possible for 3D points to remove duplicates, however when I apply the same code for line-like curves it doesn't work. I know there is a Kangaroo component…"
Mar 27
Ortler Mark replied to Roman's discussion Deleting points by x- and y-value
"Just to show up a python-syntax which is great ;)"
Mar 25
Sid replied to Roman's discussion Deleting points by x- and y-value
"Awesome Anders. How can we select the selective points what we want. may be by index numbers or any other method. Would appreciate if you could help on this.  Thanks in advance"
Mar 25
Roman posted a discussion

Add lines between non consecutive points

Hello,I have scripted (python) a line raster which will give the intersection points. Now I want to add diagonals between the points. In (image:Diagonals) for instance I want lines between points (0,1,4,5), (1,2,5,6), (4,5,9,8) etc. However the problem is that the Horizontal lines and Vertrical lines are parametric and thus can change in amount, so it is possible to create a raster 2x2 but also a raster of for instance 10 x 8.Additonal it is also possible to create a raster that hasn't points…See More
Mar 22
Roman replied to Roman's discussion Deleting points by x- and y-value
"No you didn't misunderstood the problem, this was exactly what I was looking for. Short and effective piece of script, thank you."
Mar 22
Anders Holden Deleuran replied to Roman's discussion Deleting points by x- and y-value
"Unless I'm misunderstanding the problem, this is pretty straightforward using a conditional statements within a loop:"
Mar 22
Roman replied to Roman's discussion Deleting points by x- and y-value
"I managed to solved it by meself via another method. However this is an even more efficient method, thanks."
Mar 22
Ortler Mark replied to Roman's discussion Deleting points by x- and y-value
"Have a look at this. class MyPoint:      X = 0     Y = 0    def __init__(self, x , y):      self.X = x      self.Y = y    def __repr__(self):     …"
Mar 22
Roman posted a discussion

Deleting points by x- and y-value

Hello,I have a python script that will output a list of points (x-, y- and z-coordinates) (see image). Now I want to delete the points that lie between certain x- and y-values. For instance if a point lies between a x-value of 2750-3000 AND a y-value 1500-1750 the point has to be deleted, in this example point nr. 13 has to be removed from the list.Thanks in advance See More
Mar 20
Roman replied to Roman's discussion Line intersection of lines in multiple lists
"Yess thanks to you all. I forgot the last line in the example of Tom, "result.append(ie[0])" now I added this line and it works, many thanks. The script from Marcus works as well and is short and effective, thanks."
Mar 15

Profile Information

Comment Wall

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

Join Grasshopper

  • No comments yet!
 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service