Could use a hand with this. I need to place circles on polyline segments at 5-ft increments between the vertices (parameters). Having a difficult time. Additionally, the circles can't be within 5-ft of any parameter. Here's a very bad start (basically junk) that doesn't do what I want. I keep fumbling around so thought I'd ask here for help (sorted is the number of parameters in the polyline):
for (int i = 0; i < sorted.Count - 1; i++) //minus 1 so it doesn't fail on last parameter
{
Point3d parampoint = temppoly.GetPointAtParameter(i);
Point3d afterpoint = temppoly.GetPointAtParameter(i + 1);
double distance = parampoint.DistanceTo(afterpoint);
if (distance > 5.1 && (distance + 5.1) < temppoly.GetDistanceAtParameter(i + 1))
{
Circle cr = new Circle(temppoly.GetPointAtDist(temppoly.GetDistanceAtParameter(i) + 5), Vector3d.ZAxis, 1.0);
acBlkTblRec.AppendEntity(cr);
MyTrans.AddNewlyCreatedDBObject(cr, true);
}
}
Thanks everyone, appreciate your help.