| 13 | |
| 14 | #[derive(Debug, Clone, Copy, PartialEq)] |
| 15 | pub enum SnappingStrategy { |
| 16 | /// Snap to the closest point, modifying the point cloud as the algorithm progresses |
| 17 | /// |
| 18 | /// Sensitive to the order in which snapping is performed |
| 19 | // TODO: There could be lots of possible strategies. During the implementation, I experimented |
| 20 | // with ClosestInputPoint and ClosestOutputPoint variants, but it got complex enough that I |
| 21 | // abandoned them. Thinking I could make prune_duplicate_nodes() generic over the different |
| 22 | // strategies was incorrect. |
| 23 | ClosestPoint(f64), |
| 24 | /// Snap points to a regular grid, instead of themselves |
| 25 | RegularGrid(f64), |
| 26 | } |
| 27 | |
| 28 | pub fn snap_geoms( |
| 29 | geoms: impl Iterator<Item = Geometry>, |
nothing calls this directly
no outgoing calls
no test coverage detected