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.
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!)
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.
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.
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?