-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Fillet Logic to Combine Multiple Tags Within the Same Fillet Expression #4058
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
let pathToFilletNodes: Array<PathToNode> = [] | ||
// Step 1: modify ast with tags and group them by extrude nodes (bodies) | ||
const extrudeToTagsMap: Map<PathToNode, string[]> = new Map() | ||
const lookupMap: Map<string, PathToNode> = new Map() // work around for Map key comparison |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this a little confusing, but I get what's going on here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…4039-group-all-fillet-tags
this issue is part of Fillet project: #2606
continues AST mod: #3680
closes: #4039
PR Description:
Overview:
This PR refactors the
modifyAstCloneWithFilletAndTag
logic to consolidate multiple edge selections into a single fillet expression per extrusion, combining tags for all selected edges into one operation. The changes streamline the handling of multiple selections and remove redundant code that was previously designed for single selections.Key Changes:
1. Two-Step Looping Logic:
extrudeKey
, ensuring that tags related to the same extrusion are grouped together.2. Removal of
addFillet
Function:The
addFillet
function, which was originally designed to handle single edge selections, became redundant after we refactored it's logic intomodifyAstCloneWithFilletAndTag
loops. With the refactor,addFillet
is no longer needed and has been removed.3. Test Suite Consolidation:
Previously, unit tests for single selections were separate from tests for multiple selections (which required mocking
kclManager.executeAst({ ast })
due to the use of the artifact graph). This PR consolidates the test suite, combining single and multiple selection tests into the same framework.Outstanding Issues (To Be Addressed in a Separate PR):
1. Support for Fillet in Sketch Pipes:
The current implementation does not handle cases where the
extrude
is part of the sketch pipe. This limitation will be addressed in a future update.2. Handling Already-Filleted Edges:
If an edge that has already been filleted is selected again, the current logic does not remove or modify existing fillets. A future PR will address this by checking for existing fillets and removing the tags from previous fillets before applying new ones.
related comments: