forked from HEL/circuiteria
Add the `zigzag-at` parameter to place the middle bend of a zigzag wire on the axis of a referenced anchor. It overrides `zigzag-ratio`, which now defaults to `auto` (resolving to 50%) so the two are mutually exclusive. Accepted forms are an anchor name, any CeTZ coordinate, or the scalar offset `(rel: <length>, to: <coord>)`. Add the generic helpers this relies on and that other wire styles reuse: - `normalize-scalar-offset(at, axis)` turns a scalar offset into an x or y offset; `normalize-zigzag-at` is a wrapper around it. - `detect-port-side(anchor, ctx)` deduces the cardinal side a port faces by comparing it with its element's `.center` anchor. Add the `zigzag-at` example.
545 KiB
545 KiB