OpenJSCAD.org
                                
                                
                                
                                    OpenJSCAD.org copied to clipboard
                            
                            
                            
                        Idea: functions to generate the stroke of a path or geom2
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.
Options for stroking a path, from the svg spec:
widthcap: butt | round | squarejoin: arcs | bevel |miter | miter-clip | roundmiterlimit
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.