Skip to content

Conversation

@jellespijker
Copy link
Member

This PR is made by jules.google.com, I did not review or test it, but according to Jules it should be a solution to #2193

The following changes were made:

A new setting combing_polygon_type was introduced that allows you to specify which polygons should be used for combing. The available options are:

  • OuterWall: Uses the original combing boundaries (default behavior).
  • Outline: Uses the general layer outlines for combing.
  • SecondWall: Uses the second wall polygons for combing.

The Comb::calc function has been modified to read this setting and select the appropriate polygons for combing. If the selected polygon type results in no usable polygons or if an invalid type is specified, the logic falls back to the default behavior.

google-labs-jules bot and others added 2 commits May 23, 2025 14:53
A new setting `combing_polygon_type` was introduced that allows you to specify which polygons should be used for combing. The available options are:

- `OuterWall`: Uses the original combing boundaries (default behavior).
- `Outline`: Uses the general layer outlines for combing.
- `SecondWall`: Uses the second wall polygons for combing.

The `Comb::calc` function has been modified to read this setting and select the appropriate polygons for combing. If the selected polygon type results in no usable polygons or if an invalid type is specified, the logic falls back to the default behavior.
@jellespijker jellespijker requested a review from Copilot May 23, 2025 14:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new combing_polygon_type setting to let users choose between outer wall, outline, second wall, or plugin boundaries for combing paths.
Key changes:

  • Added CombingPolygonType enum and its mapping in settings.
  • Updated Comb::calc to branch on the selected polygon type and fall back to outer wall if unavailable.
  • Added unit tests covering the new combing polygon options (outer wall, outline, second wall, and fallback).

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
include/settings/EnumSettings.h Added CombingPolygonType enum.
src/settings/Settings.cpp Specialization of Settings::get<CombingPolygonType> for parsing.
src/pathPlanning/Comb.cpp Read new setting, select appropriate boundary shapes, and adjust comb logic.
tests/src/pathPlanning/CombTest.cpp New tests for each combing polygon type and fallback behavior.
Comments suppressed due to low confidence (1)

tests/src/pathPlanning/CombTest.cpp:234

  • There are no tests covering the PLUGIN polygon type or invalid setting values. Adding at least one test for the PLUGIN case (and an invalid-string fallback) would ensure full coverage of the new branches.
}

bool use_original_boundaries = true;

// Determine if alternative boundaries are needed based on the setting
switch (combing_polygon_type)
Copy link

Copilot AI May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The switch block for selecting boundaries is fairly large and duplicated for optimal/minimum handling. Refactoring into a helper function or strategy pattern could reduce duplication and improve readability.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2025

Test Results

0 tests   - 27   0 ✅  - 27   0s ⏱️ -5s
0 suites  -  1   0 💤 ± 0 
0 files    -  1   0 ❌ ± 0 

Results for commit b78b254. ± Comparison against base commit ae38e60.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants