Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/GcodeGenerationViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ export class GcodeGenerationViewModel extends ViewModel {
if (tab.enabled()) {
// Bloat tab geometry by the cutter radius
const bloat = App.models.Tool.cutterDiameter.toUnits("integer") / 2;
const tg = tab.combinedGeometry.offset(bloat);
tabGeometry = tabGeometry.union(tg);
tabGeometry = tabGeometry.union(tab.getOffsetCombinedGeometry(bloat));
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/TabViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ export class TabViewModel extends ViewModel {
this.#combinedGeometry = new CutPaths();
}

/**
* Return combined geometry from this tab offset by the given value.
* Used in final gcode generation.
* @param {number} offset offset applied to tab geometry
*/
getOffsetCombinedGeometry(offset) {
return this.#combinedGeometry.offset(offset);
}

/**
* (Re)generate combinedGeometry from the paths associated with this
* operation (this.#tabPaths)
Expand Down