Grasshopper

algorithmic modeling for Rhino

Data matching - List of curves going through points

Hi everyone,

I have been working on this script for a few days now and cannot wrap my head around some data matching issues that I have.

The script is meant to extract the shortest 2D curves on a 3D surface between 2 cross-listed series of points which happen to be "Divides" of the edges of the 3D surface (some kind of planar geodesics if you want).

To do so, I am extracting the intersections between the 3D surface and a series of planes that are rotated (with an angular increment defined as precision) around an axis defined by the straight line between the points.

Hence I end up with a bunch of planar curves. I need to extract them and order them into lists (1 list per pair of points) to extract the shortest curve between each pair of points.

If the first list of point is numbered: 1, 2, 3, 4.....
&
the second list is lablelled a, b, c, d.....

I can't find a way to extract the shortest point curve of the list between

1 and a,
and between 1 and b,
and between 1 and c,
...
and between 2 and a,
and between 2 and b,
...

I think the problem would be fairly easy to solve if I could use VB or Python or any code but I dont know how to code and I am in quite a rush to hand the project in..

Also, I have been using a Python component downloaded from this forum which evaluates if a point is on a curve and returns the point. I modified the code so that it returns the Curve instead of the pt.

If you guys have an idea how to solve this, you would clearly be my saviour :)

Here are a 3dm, the gh and the python component. I have also been using the Kangaroo component that kills duplicate curves.. 

Views: 923

Attachments:

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service