Skip to content

Add cross-section line digitization based on length

The graphics module includes a SimpleLineAnnotation class. Currently, this class allows digitizing a single line segment by clicking on the start and end vertex locations.

Add functionality so that if provided a line length in pixels, the user can click the start vertex location, and the line will be of the set user-supplied length, with the current location set by where the mouse is hovering. Thus, the user sets the line's direction/angle/slope by moving the mouse accordingly. Once satisfied, the user clicks to set the line. The end vertex is placed.

Include some helper functions so the line's vertex locations, angle, and direction can be queried.

Other Notes:

  1. The line length is in pixels, and will be supplied by AreaComp through the cross-section geometry tab (after conversion from real-world to pixel coord lengths).
  2. Eventually, I want to enable users to set the "grid" where image velocimetry will occur using the shape primitives (point, line, polygon and grid)