How to Export Point Coordinates Along a Curve in Parametric Order?

Hi everyone,

I’m trying to export the coordinates of points along consecutive curves in Rhino 3D (version 5), and I need them to be in the exact order they appear along the curve (from start to finish).

Here’s what I’ve tried so far:

  1. Exploded the curves and found the intersection points.
  2. Joined the curves and divided them into 40 segments.
  3. Selected the resulting points and exported them as a .txt file.

However, the exported points are not in the correct order along the curve.

A few notes:

  • The curves are all planar along the X-axis, but their Y and Z coordinates vary, forming shapes like semicircles.
  • For example, I’d expect the exported points to follow a logical order, like in this illustration:

Could someone guide me on how to export the points in the correct order so they form the same line when connected? If scripting is required, an example script would be greatly appreciated.

Thanks in advance!

it looks like you used excel here in between, exporting and reimporting points seems to work alright, but using cvs for excel and then importing this again a rotation seems to be happening

left is imported, i just extruded a surface for orientation matters.

maybe a bug how cvs data is handled? did you export from excel or what did you do?

Hello, thanks for the reply.
I used Excel at the end of the process to check the points coordinates sequence as exported from Rhino. In other words, in the screenshot above, on the right it is the Rhino file (blue lines, cyan points), and on the left are the coordinates of points exported from rhino. In the middle is the scatter plot in excel used to check the points sequence (order).

This is the order sequence I am after:


Ordering the points manually is not an option due to high number of points and curves that must be exported.

Attached is the Rhino file and points txt exported. Any further thoughts?
Points on Curves to be Exported as point coordinates in logical order.3dm (57.5 KB)
Points Fr.0 few points ver2.txt (1.2 KB)

i am really not sure how to accomplish that, maybe it depends on how the points where created, since each points should be getting an individual id which could theoretically be used to order them. but using divided for instance to create new points also does not allow for CurveThroughPt to recreate the path accordingly and scrambles up denser areas… maybe you need something like a script or two scripts, or grasshopper?

1 Like

Hi @RamCADl, see if below example script helps as a starting guide. It prompts for a single curve and some point objects, then for a csv file location to save to. The order is derived from the curve parameter which is closest to each point.

WritePtsOnCurveToCsv.py (1.4 KB)

Tip: Check your curve direction using the _Dir command before exporting.
_
c.

1 Like

Hi clement, that script solved it! It works nicely. Thank you.