Simplify polycurve

Is there any way to simplify or rebuild a polycurve with the least amount of lines? The polycurve consists of lots of little straight lines and I want to simplify it before creating Revit geometry, such as a model curve.

In Grasshopper there are 2 commands that can do this - simplify curve and discontinuity. Getting the discontinuity of a polycurve is great, as it returns points where it is not tangential. These points can then be used to generate a polycurve by points. But Dynamo doesn’t seem to have anything similar. Springs has a Curve.LoopSimplify butI can’t get it to work.

Any thoughts?

3 Likes

Have you tried creating a joined curve (a PolyCurve) then interpolate it using a defined number of points (interpolation might depend on the input curve being nurbs or bspline however - incidentally I suggested curve and surface utility nodes, including rebuilding/resampling nodes, need adding as they are fundamental actions oddly lacking in Dynamo!)

@Thomas_Mahon

To interpolate you need the discontinuous points which is the whole problem isn’t?

Depends. If it simply resamples the input curve it shouldn’t matter but I’ve not tested it in Dynamo on PolyCurves. My hunch is, is probably won’t work which means your probably right.

Have you looked into the CurveLoop.Simplify from spring nodes?

I saw a video of someone doing this at AU last year. Maybe Paul Aubin? I think it basically got the vertices from his polyline and connected each to the one two indexes later, and then checked if the one between was on the same line.

IE:
Index 0 to index 2, check if index 1 Intersects. If so return null, if not return index 1.
Index index 1 to index 3, check if index 2 Intersects. If so return null, if not return index 2.
Index 2 - index 4, check index 3 for intersection. If so null, if not index 3.

3 Likes

This question is 6 years old. During this time, has anyone found the best method to achieve this? I find that CurveLoop.Simplify is not very reliable…

1 Like

Guys, I succeeded. This is my solution. I’m uploading the graph. Maybe this graph could become a new node? Could someone explain how can I create a node?

Simplify Polycurve.dyn (74.4 KB)

2 Likes

Hi,

Shapely you can simplify all geometries in the tolerance range you want.
Here is an example:
sımply

5 Likes

or this one here from Sparrow…

6 Likes

@Durmus_Cesur @sovitek its so nice to see you.:smile:

2 Likes

Hello Andrej,

last week did have something similar case like you and managed to do on this way. Of course with a help from guys. Here is the topic:

Maybe helps a bit…

1 Like