catenary_path() renamed to catenary()

This commit is contained in:
Revar Desmera 2023-11-02 19:39:22 -07:00
parent 74c96eec79
commit 19e064fea3
2 changed files with 15 additions and 22 deletions

View File

@ -5,19 +5,12 @@ jobs:
VersionCheck: VersionCheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Check Version
uses: actions/checkout@v3 uses: JJ/github-pr-contains-action@releases/v11
with:
- name: Fetch Origin github-token: ${{github.token}}
run: | diffContains: '^BOSL_VERSION'
cd $GITHUB_WORKSPACE waivedUsers: ["dependabot[bot]"]
git fetch origin master
- name: Verify Version Change
run: |
cd $GITHUB_WORKSPACE
verstr=$(git diff --summary FETCH_HEAD version.scad | grep '^BOSL_VERSION')
[ "$verstr" != "" ]
Regressions: Regressions:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -863,13 +863,13 @@ module arc(n, r, angle, d, cp, points, corner, width, thickness, start, wedge=fa
} }
// Function: catenary_path() // Function: catenary()
// Synopsis: Returns a 2D Catenary chain or arch path. // Synopsis: Returns a 2D Catenary chain or arch path.
// SynTags: Path // SynTags: Path
// Topics: Paths // Topics: Paths
// See Also: circle(), stroke() // See Also: circle(), stroke()
// Usage: // Usage:
// path = catenary_path(width, droop=|angle=, n=); // path = catenary(width, droop=|angle=, n=);
// Description: // Description:
// Returns a 2D Catenary path, which is the path a chain held at both ends will take. // Returns a 2D Catenary path, which is the path a chain held at both ends will take.
// The path will have the endpoints at `[±width/2, 0]`, and the middle of the path will droop // The path will have the endpoints at `[±width/2, 0]`, and the middle of the path will droop
@ -882,19 +882,19 @@ module arc(n, r, angle, d, cp, points, corner, width, thickness, start, wedge=fa
// --- // ---
// angle = If given, specifies the angle that the path will droop by at the endpoints. If given a negative value, returns an arch *above* the Y axis. // angle = If given, specifies the angle that the path will droop by at the endpoints. If given a negative value, returns an arch *above* the Y axis.
// Example(2D): By Droop // Example(2D): By Droop
// stroke(catenary_path(100, droop=30)); // stroke(catenary(100, droop=30));
// Example(2D): By Angle // Example(2D): By Angle
// stroke(catenary_path(100, angle=30)); // stroke(catenary(100, angle=30));
// Example(2D): Upwards Arch by Angle // Example(2D): Upwards Arch by Angle
// stroke(catenary_path(100, angle=30)); // stroke(catenary(100, angle=30));
// Example(2D): Upwards Arch by Height Delta // Example(2D): Upwards Arch by Height Delta
// stroke(catenary_path(100, droop=-30)); // stroke(catenary(100, droop=-30));
// Example(2D): Specifying Vertex Count // Example(2D): Specifying Vertex Count
// stroke(catenary_path(100, angle=-85, n=11), dots="dot"); // stroke(catenary(100, angle=-85, n=11), dots="dot");
// Example: Sweeping a Catenary Path // Example: Sweeping a Catenary Path
// path = xrot(90, p=path3d(catenary_path(100, droop=20, n=41))); // path = xrot(90, p=path3d(catenary(100, droop=20, n=41)));
// path_sweep(circle(r=1.5, $fn=24), path); // path_sweep(circle(r=1.5, $fn=24), path);
function catenary_path(width, droop, n=100, angle) = function catenary(width, droop, n=100, angle) =
assert(one_defined([droop, angle],"droop,angle")) assert(one_defined([droop, angle],"droop,angle"))
let( let(
sgn = is_undef(droop)? sign(angle) : sign(droop), sgn = is_undef(droop)? sign(angle) : sign(droop),