|
Need a little help. I need to use splitcurves to break lines, polylines, and arcs but I need the breaks to occur in order from start of line to end of line. The routine I have now randomly breaks them creating segments longer than they should be. It's hard for me to explain but hopefully the attached picture will help.
Any idea how I can break my polyline segments in order from start to end at my point locations?
[ol] Entity myent = (Entity)myid.GetObject(OpenMode.ForWrite);
Curve curve = myent as Curve;
Point3dCollection newpointcoll = new Point3dCollection();
foreach (Point3d mypnt in breakpoints)
{
Point3d nearpoint = curve.GetClosestPointTo(mypnt, false);
if (nearpoint.DistanceTo(mypnt)
{
newpointcoll.Add(nearpoint);
}
}
newCurves = curve.GetSplitCurves(newpointcoll);[/ol] |
|