Grasshopper

algorithmic modeling for Rhino

Mesh Creation Managing a point Matrix - How can I create a universal sort points acording to planar co-ordinates?

I am creating a mesh from a grid that has been influenced by an attractor point script. In order to create the mesh I had to play around with the way the point list was ordered. Since different creation methods of points will yield different data structures I was wondering if there was a way to order points into a flattened list starting at a set point and ascending left to right, down to up. I developed a script to do this, but it needs a certain input based on the data tree order I received. See below:

The sort points command does not have enough inputs in order to sort all sets of points. It would need a row and column input and a plane input. IS there a way to order any group of points into a grid? I image that someone has figured out a smarter solution. . . . maybe the Paneling tools set for Rhino has an intelligent solution?

I was working out a set of tools to deal with Point Grids, reversing the column and grid order of flattened lists, reversing the column and row order of the data trees only extra I will post that separately under Matrix tools. If anyone is interested let me know. I find myself re-ordering lists a lot, and I thought that something like this would be a time saver, but maybe there are better tools out there already.

Views: 2104

Attachments:

Replies to This Discussion

This looks very interesting, I will try it out and see how that works. Thanks for the head's up!

I took a look at the thread but I didn't see a solution that was based on x and y coordinates of a c plane. I thought one might be able to sort a list of points by finding out there position in relationship to an origin, the bottom left corner of the point grid, and then use the x and Y values of this point grid to resort them. If rhino is able to create a mesh or nurbs from random points it should be possible. Not sure how difficult it is, I will give it a try.

If any one is interested, I found a thread here that seems to work, very simple solution:

Sort by Co-ordinates

It's the same theory just with 3 dimensions instead of 2

Attachments:

Thanks! This is working, I couldn't get the other script with the line as a sort guide to work. This is exactly what I was looking for. I'm going to play around with it, and get it to work in multiple co-ordinate systems for my facade. This is a real time saver. Its more versatile and simpler then what I came up with.

It still uses a line as a reference for the sorting algorithm.

Okay I will take a closer look at this. I wanted to compile a "tool set" that would help deal with data matrix's. In other words any set of data arranged into row and columns. I came up with some tools for changing the order from left to right to up to down, for example. Or to separate them into a data tree and to re-order the data tree up down or left right. Going to clean up the file and post later tonight after dinner.

I don't think that the path mapper can do this since it doen't know how many rows and columns there are but I could be wrong. Maybe there is a simpler way to do what I am doing. Thanks for all your help!

Here is the File I've assembled. Your tool already re-orders the list according to x and Y. I added one to flip the path structure from x to y and one to generate a path structure according to rows or columns. There may be an easier way of doing this. I'm not a programer, so the work is that of an amateur.

  Let me know if you find any of these useful or if you have some better solutions. The VB component for showing the text tag of paths is from Mode Lab I think. The rest is my own except for your sort method of course.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service