Check if Path is Closed

● ARCHIVED · READ-ONLY
Started by wrigty12 3 posts View original ↗
  1. I am looking for a way to check if a drawn path becomes closed, when the path is being drawn by lines created when a cursor is moved with the arrow keys (Imagine drawing lines to make a circle using the arrow keys). I can get the lines to draw, but I can't figure out how to check when the path makes a closed "shape"/area.


    If anyone has a good idea of how I can check when a path becomes closed, please let me know!
  2. Do you have a way to record the start and end locations of the shape? If so, check that they are at the same location.
  3. I don't think I can make that comparison, since the "end point" of the shape can be any part of the line, not just the start point. Imagine drawing a "6", where the end of the tail is the start point, the cursor draws the rest, then closes in the middle, making a closed circle. I need to detect when that circle becomes closed.