Update fillet+chamfer with new API options

This commit is contained in:
Adam Chalmers
2025-05-07 12:13:16 -05:00
parent 43d5a72514
commit 2eeffe92ba
11 changed files with 155 additions and 85 deletions

View File

@ -0,0 +1,9 @@
@no_std
@settings(defaultLengthUnit = mm, kclVersion = 1.0)
/// Try the fast but simple Basic strategy, and if that fails, try the slow and complex CSG strategy.
export automatic = "automatic"
/// The basic strategy is fastest, but it can't handle complicated cases (like chamfering two edges that touch).
export basic = "basic"
/// The CSG strategy is slowest, but it can handle complex cases (like chamfering two edges that touch).
export csg = "csg"

View File

@ -16,6 +16,7 @@ export import * from "std::sketch"
export import * from "std::solid"
export import * from "std::transform"
export import "std::turns"
export import "std::cutStrategy"
export XY = {
origin = { x = 0, y = 0, z = 0 },

View File

@ -71,6 +71,8 @@ export fn fillet(
tolerance?: number(Length),
/// Create a new tag which refers to this fillet
tag?: tag,
/// Which strategy should be used to perform this chamfer?
strategy?: string,
): Solid {}
/// Cut a straight transitional edge along a tagged path.
@ -146,6 +148,8 @@ export fn chamfer(
tags: [Edge; 1+],
/// Create a new tag which refers to this chamfer
tag?: tag,
/// Which strategy should be used to perform this chamfer?
strategy?: string,
): Solid {}
/// Remove volume from a 3-dimensional shape such that a wall of the