Hello there,
In my custom C# Rhino plugin, I want to load a set of premade planar closed curves and align their seams in order to use them for sweeps without twists for example.
My problem is that if I call the ChangeClosedCurveSeam function available in Rhinocommon library I end up losing the periodicity of some of my curves (not all).
When I lose periodicity, I get a curve with 2 points at the same location at the desired seam point but if I move one of them I can see that the curve is not even closed anymore. I tried restoring the periodicity by calling Curve.CreatePeriodicCurve but I then end up with a periodic curve, with the correct shape, no duplicated point BUT the previous seam (before calling ChangeClosedCurveSeam) is now a control point with a strange behavior making inflections, as seen in this picture.
I tried using the command CrvSeam directly in Rhino UI but ended up having the same result of inflections…
So my questions are : what am I doing wrong here ? My goal is to have a set of periodic curves with aligned seams on their lowest point intersecting the YZ plane and keep their original shape.
Is it expected behavior for ChangeClosedCurveSeam to break periodicity of the input curve ?
I put my example file with 2 shapes, one “Rond” which fails when changing curve seam (inflection points appear or I lose periodicity), and one successful curve which poses no problem with this process. If this is not solvable, is there a way to at least detect curves that fail the process ? ( control points that do not behave like others) so that I can filter my curve set ?
exampleCurve.3dm (68.9 KB)
[EDIT] I Noticed that the inflection point is already present in the starting “Rond” curve of my example file, but even on some other curves with no starting inflection points, an inflection point is introduced at the previous seam.
Thank you for your help