Curve side works not correct


(Sculpterra) #1

Hi, I’m using build 0.9 and have an issue with the curve side component. I have checked already everything I could the tree structure and order, NULL items in a tree etc. Have no idea were I’m wrong.
So this is the picture of what i/m trying to do.

I’ve cut out all the lines from the right side and now try to delete those wichs are been untouched, for that I check whether the middle point of lines from the right or the left side of the polyline. And there always is some mistakes.

So how does this component works? What am i doing wrong? Is there another approach for that task?

I’ll be very appreciated for help!


(David Rutten) #2

Can you upload the file? Ideally internalise the polyline and the line segments you’re trying to filter so it’s as simple as possible? (i.e. point #3 in this post)


(Sculpterra) #3

Here it is, a bit mess there I beg your excuse but I’ve grouped the most important parts.

curve cutting.gh (50.9 KB)


(David Rutten) #4

Yep there’s a bug if the point p being tested pulls onto the polyline at a corner c, and the tangent t at the corner is more than 180^{\circ} away from the vector \vec{cp}.

You can make it work for you now by adding a small fillet to the polyline you use for testing, but I’ll have to rethink the left/right testing algorithm.

I logged it under RH-42951.


(David Rutten) #5

curve cutting.gh (17.7 KB)


(Sculpterra) #6

Thank you! A small fillet works.

I’m happy to help with bug finding.


(David Rutten) #7

I fixed the component algorithm. It should also work much better now with non-planar curves. However it’s not critical enough to risk shoving it into Rhino 6.0, so it will go out with the first service release (I don’t know when that it, but the update schedule should be way faster than in earlier versions of Rhino).


(Sculpterra) #8

Thank you, may I have a look at it? I’m not a Rhino 6 user yet, but I do use this component often now.


(David Rutten) #9

I have no way of getting you the component if you have an earlier version of Grasshopper. However I attached the file I used to test this which contains a C# script. Note that this script does not include the improved planarity tests, but it should handle kinks correctly.

left_right.gh (23.3 KB)