2024-11-30 New preform outlines

For instance there is the Double-truncated Rectangle to get smooth corners. A double-truncated rectangle starts as a rectangle with all four corners truncated, forming an octagon. This octagon is then truncated again at its corners, resulting in a 16-sided polygon with smoothed edges, featuring four original sides shortened by truncations and 12 additional edges created through the two stages of corner cuts All outlines.

2024-10-31 Bug fixes

Fixed a number of bugs

2024-10-26 Reference page

A new page listing all functions with descriptions and examples: Reference.

2024-10-25 Truncated Triangles

Added CAM support for the creation of truncated triangles. If you are interested in how this works, below is the code. Getting the correct angle for PF2 took a bit of thinking…

function createTruncatedTriangle(c, angle) {
    let d = 0.7 // closest distance of the girdle to the center
    let e = d * Math.sqrt(3) // half the base
    let h = Math.tan(deg2rad(angle)) * d
    let f = Math.sqrt(e * e + d * d) // Pythagoras
    let beta = rad2deg(Math.atan(h / ((1.0 - c / 2) * f)))
    let n = getIndexGear()
    cut("PF1", range(0, n / 3), angle, centerPoint())
    cut("PF2", range(n / 6, n / 3), beta, centerPoint())
    cut("G1", range(0, n / 3), 90, d)
    cut("G2", range(n / 6, n / 3), 90, level())
}