Trim or extend a curve by a distance or to a bounding entity.