Im finishing up this littel guy
but I have an issue in trying to reduce pointcount, after I get my polylines back I .Tonurbscurve, then rebuild. Id prefer to fitcrv with a tolerance, but my program shows nothing… no matter what tolerance I use.
CUrrent Code: (using iterations of dekink and rebuild)
if (get_rc == GetResult.Option)
{
List Smoothed = new List();
var Lines = Outlines(FileName,InvertImage.CurrentValue);
foreach(Polyline line in Lines)
{
for (int i = 0; i < KinkRemoval.CurrentValue; i++)
{
line.Smooth(1);
}
var Dekinked = line.ToNurbsCurve().Rebuild(line.Count/RebuildMultiple.CurrentValue, 3, false);
Dekinked.Scale(0.1);
Smoothed.Add(Dekinked);
}
PointsConduit.ConduitEdges = Smoothed;
doc.Views.Redraw();
continue;
}
and the code that does not work… any ideas where I am going wrong?
(FitTolerance being a double value in my command line.)
if (get_rc == GetResult.Option)
{
List<Curve> Smoothed = new List<Curve>();
var Lines = Outlines(FileName, InvertImage.CurrentValue);
foreach (Polyline line in Lines)
{
var Dekinked = line.ToNurbsCurve().Fit(3, fitTolerance.CurrentValue, 0);
Dekinked.Scale(0.1);
Smoothed.Add(Dekinked);
}
PointsConduit.ConduitEdges = Smoothed;
doc.Views.Redraw();
continue;
}