JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
We should introduce functions to generate the stroke of a path.
Such functions could be useful for creating the exterior of a shape from a given path. There are cases where having only the path is not enough and one might need to add "thiccness". This could also be helpful for things like importing SVGs which can have both fill and stroke.
For paths, this functionality would essentially be offset. However, there is currently no straightforward way to compute the stroke of a geom2.
Maybe a little more primitive, the WebAPI provides both CanvasRenderingContext2D and Path2D interfaces for constructing 2D paths for rendering. Maybe some of these concepts could be adopted.
We should introduce functions to generate the
stroke
of a path.Such functions could be useful for creating the exterior of a shape from a given path. There are cases where having only the path is not enough and one might need to add "thiccness". This could also be helpful for things like importing SVGs which can have both fill and stroke.
For paths, this functionality would essentially be
offset
. However, there is currently no straightforward way to compute the stroke of ageom2
.Options for stroking a path, from the svg spec:
width
cap
: butt | round | squarejoin
: arcs | bevel |miter | miter-clip | roundmiterlimit