Grasshopper

algorithmic modeling for Rhino

Hey Everybody,

I was wondering if anyone has any suggestions on how to resolve an issue I am having. I had used a grid, and, based on the width and height of each cell, I created grids nested within the grid. This has more or less created a highly subdivided grid (much like this http://www.pyser-sgi.com/images/thumbnails/Graticules/NE29%20med.jpg)

My issue now is that I have to begin fabricating this grid. In order to do that, I need to cull the lines which overlap. Usually, I could just Kangaroo or test for the curves' midpoints, but, because the curves are of different lengths at times, I need purely to detect overlaps. I have tried a bit with Python, but I was unable to get it to compare each line against every other line.

Thanks very much for any help possible,

Connor

Views: 3948

Replies to This Discussion

Do the lines share starting points? Or can a line be overlapped part way along another curve?

The latter case. Unfortunately, the lines sometimes overlap without actually having coincident start or end points.

If you are after a single line representing a grid "column" or "row" then here's something you might find useful.

What I've done is to extend every curve beyond a boundary:

(Red Dots are end points of multiple curves in a grid system)

Find their intersect points and classify them.


So that you can end up with all similar curves on a single branch:

then you can find the Start and End point withing the grid system of that line and create a single representation.

Attachments:

3D version

Here's a better one using a sphere as the bounding volume

Attachments:
Okay thanks so much. These were very helpful. I'll dig through their logic more deeply moving foward. Again, thank you very much. I really appreciate it.

If your grids are like in the schema provided and you have been using the square grid component per se, you can cull "naked"(surrounding cells   surrounding edges) from the second level  of grids and after, then explode everything and apply a duplicate detection script either on Kangaroo or in python ect.

best,

M.

Thanks, this is a viable option, but the thing is a three-dimensional grid. Thus, always removing the outer most edges will result in loosing some of the edges which do not intersect with the nondivided areas.

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service