Get Ordered Intersection Points Along a direction (AutoCAD .net API) - Part 2

_config.yml

This is part II of a two part post. Part 1 can be found here.

This is the task at hand:

  1. To draw a line.
  2. To get all the points where the drawn line intersects with all the other lines.
  3. To offset them by a set amount (in this case by 75) from the drawn line
  4. To stagger them alternately.
  5. Lastly, if the current layer is red, then the first line drawn should be red, otherwise it should be blue. This is best illustrated by the picture above.

The code to do so is as below:

Written on May 9, 2019