Project points without crossings

I’m wondering if there’s any way to automate a proccess like this one

I have two curves, that could be even a bit more complex that, and I’d like to project the points of the first arc in their normla direction to the next arc

Problem is, when the center of the source arc is before the target one, crossings such as the ones on the image happen, so, manually I could connect project the points in a direction that has a minimal deviation from the normal vector, in a way the lines don’t cross and, even more, they have a minimal spacing, of 15 centimeters, for example

But doing that hundreds of times could prove time consuming, so maybe someone would know how to automate this?

I posted on the kangaroo section cause I did some research and it showed promissing results, but not there yes
Test Most Parallel Projection without crossings.gh (9.3 KB)

Perhaps something like that?
asd.gh (19.4 KB)

2 Likes

I hope this is what you need.

Test Most Parallel Projection without crossingsEW.gh (14.5 KB)

1 Like

not quite there yet, but it helped me a lot to have a better understanding of how I would do

I’ll test an idea I had later and post it here, thanks a lot

Parallel Projection :question:

What I see doesn’t look parallel to me?


Parallel Projection without crossing_2025Jul1a.gh (14.3 KB)

P.S. This is the purple group. The lines are perpendicular to the tangent on the left arc but obviously cross. One doesn’t hit the arc on the right at all.


Parallel Projection without crossing_2025Jul1b.gh (14.7 KB)

Well, that’s a different thing.

1 Like

Yeah, you’re right, I meant the closest vector possible to the normal of that point, rather than parallel

Parallel Projection without crossing_2025Jul1c.gh (12.5 KB)

1 Like

Maybe @Joseph_Oster already solved it but based off of your original diagram @duckythatlikesturtle, here’s something that gets you close to what you showed on the right:

Model Space:

Graph Space:

20250701_Test Most Parallel Projection without crossings_Response_01a.gh (12.4 KB)

1 Like

:rofl:


hahaha yeah, let me edit the script

your approach and @Joseph_Oster are relly close to what I was looking for, my diagram is actually more complex than two arcs, something like this:

I was trying to incorporate the same logic @Eef delivered on this situation by finding the average point among all of those that are adequally spaced on the target curve

But I feel I’m still missing a piece

(Also, the filter per distance is for the points too close to the end cause their average position would end up being too far away due to the discontinuity of the curve)

Edit: should be fine now @Joseph_Oster

Test Projection no cross.gh (26.2 KB)

This has to be said…


Parallel Projection without crossing_2025Jul1d.gh (27.1 KB)


Parallel Projection without crossing_2025Jul1dd.gh (21.1 KB)

1 Like

yeah, but you see the visual result on the last file? Looks cleaner, however, that’s my issue: how to achieve that parametrically

Like this section


The blue preview is what I’m looking for

  • The factor slider moves the in between curve, so the crossings move outside your curves
  • rebuild was needed, to smoothen some “kinks” (try without to see the difference)


Parallel Projection without crossing_EW2.gh (29.2 KB)

2 Likes

Perfect, looks amazing, thanks a lot, that’s a very creative solution, damn

I agree, it looks great. Just be aware that Rebuild Curve uses the default value’ of ten for 'N (number of control points), which might work better with some curves than others. So another parameter in addition to TweenCrvF(‘Factor’) that might need to be adjusted.

1 Like

I also checked the suggestion of @Joseph_Oster about the number in Rebuild Curve. With a setting between 4 and about 12 and moving the sliders it gives more different results to choose from. Downside of this all is the manipulating with a couple of sliders to get what you want, so:

I tried to make it more robust. The tricky part was the TweenCrv because there is no control on how it will look like. And also Rebuild Curve, what made it more smooth is question of trial and error.

So I replaced that with my DIY-inbetween-curve. Made it by

  • Dividing the original curves with same number
  • Connect with (poly)line and set MidPoints.
  • Then made a long polyline (also tried Interpolate but that also gives less control).
  • Exploded the polyline, set frames on the midpoints. This has two pros:
    * using frames makes it useable for non-planar curves.
    * less chance that lines will cross in the endresult. (In each intermediate line, the tangents of two consecutive points are averaged)"
  • Curve | Plane to find the intersection points on curves A and B

NB I think the setup could be more compact, if I had more knowledge/experience with datasets.


Parallel Projection without crossing_EW3.gh (30.0 KB)

just something unrelated but could you give me the specs for this grasshopper theme you have on? Looks really good

Hi @duckythatlikesturtle ,

It’s vanilla grasshopper with the “Moonlight” plugin to give me the dark theme.

https://www.food4rhino.com/en/app/moonlight

What I like is that it remembers when set to dark mode so you don’t need to do it every time you open a script.

Cheers!