MCPcopy Create free account
hub / github.com/ecto/muni / rectangular_coverage

Function rectangular_coverage

depot/dispatch/src/coverage.rs:256–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254
255 #[test]
256 fn rectangular_coverage() {
257 let polygon = rect_polygon(10.0, 8.0);
258 let config = CoverageConfig {
259 tool_width: 1.0,
260 overlap_pct: 0.0,
261 swath_angle: Some(0.0), // Sweep along X axis
262 };
263 let result = generate(&polygon, &config).unwrap();
264
265 // With 1m tool width and 8m height, expect 8 sweeps
266 assert_eq!(result.num_sweeps, 8);
267 // Each sweep should produce 2 points (start + end), so 16 total
268 assert_eq!(result.waypoints.len(), 16);
269 // Path length should be > 0
270 assert!(result.path_length > 0.0);
271 }
272
273 #[test]
274 fn overlap_reduces_spacing() {

Callers

nothing calls this directly

Calls 2

rect_polygonFunction · 0.85
generateFunction · 0.85

Tested by

no test coverage detected