Grasshopper

algorithmic modeling for Rhino

I am creating a dashed curve, with each dash broken into several pieces. When I try to join the dash pieces, the resulting dashes appear to be in random order. What determines the order of joined curves, when there are multiple curves as a result? How can I sort the result?

Views: 2738

Attachments:

Replies to This Discussion

I have the same problem, any ideas of why this happens? I am probably not fully understanding whats happening.

Curve Join is not a simple operation. All the curves that participate in a join operation are put into a 3D structure which allows for very fast searches. After all, Join needs to work reasonably fast even on millions of curves. This 3D structure will break the linear order of a collection of curves and as a result the joined curves will appear to be in random sequence.

Rhino does not have a slow curve joiner which pays attention to curve order, but I could write it easily enough, it would just be slower than the Rhino join algorithm.

Another problem with the native Join is that it doesn't care which curve it picks if multiple options are available. This too could be part of an alternative join algorithm, though there are many different ways I can imagine you'd want to filter multiple join options, here's a few without thinking too much about it:

  • pick the one that is closest to the original tangent
  • pick the one that is closest to the original curvature
  • pick the one that is closest to the original curve plane
  • pick the one that is furthest from the original tangent
  • pick the one that is furthest from the original curvature
  • pick the one that is shortest
  • pick the one that is longest
  • pick the one with a length that is closest to the previous curve segment
  • pick the one that ends nearest to the join
  • pick the one that ends furthest from the join
  • pick the one that makes a closed loop if joined
  • pick the one that doesn't make a closed loop if joined
  • pick the straightest one
  • pick the curviest one
  • ......

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David, 

You mentioned that you could write a more " precise" join command which pays attention to the curve order. Is there any progress on this? It would be a great help for me.

Hi David, I'd like to know how can I do the " pick the one that makes a closed loop if joined" thing. Thanks

Attachments:

hi dedackelzucht,..i am trying the approach you outlined here, but i am getting an error due to the different length of the curve list after it is joined, and that of crv CP (t).

after shattering MULTIPLE curves - i am working with the edges of subsurfaces of a reference surface, i am changing some of the shattered curves, and joining the changed branch of the shattered curves back with unchanged branches of shattered curves.

the thing is that joining shattered straight lines i didnt have this problem with ramdom list orders of jointed curve, but as soon as I use shattered curves, I am having problem sorting the joined curves.

for now I will have to model with rhino with the joined curves it seems due to time contraint, but I would be happy to sort this out and post it here when i have time. If you see there is an approach that works for this, i would also very glad to test it :)

using tt toolbox u can "sort curves along curve"
http://www.food4rhino.com/project/tttoolbox

for rhino 4 use tttools version 1.1

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service