[OpenSCAD] DXF for cut and engrave

Revar Desmera revarbat at gmail.com
Tue Oct 29 18:28:12 EDT 2019

In the BOSL2 library, the `stroke()` module can let you draw lines of a given
width along a 2D polyline path, with optional arrows and/or endcaps for either
end. The code for it relies on a lot of other features of the BOSL2 library, though
so it'd be a bit of work to extract that module out.

https://github.com/revarbat/BOSL2/wiki/shapes2d.scad#stroke <https://github.com/revarbat/BOSL2/wiki/shapes2d.scad#stroke>
https://github.com/revarbat/BOSL2/ <https://github.com/revarbat/BOSL2/>

- Revar

> On Oct 27, 2019, at 2:44 AM, Parkinbot <rudolf at digitaldocument.de> wrote:
> Doug, 
> introducing layers (or colored output) into OpenSCAD is for sure a good
> idea, as it would serve many purposes, e.g. producing output for
> multi-extruder machines. While it wouldn't solve the "living hinge problem"
> without a CAM stage, it would bring severe changes into OpenSCAD. 
> But isn't it clumsy to describe cuts as solid 2D objects? I imagine this as
> a 2D sweep - you input a path as 2D point list and a width and get a polygon
> that kind of cycles around the path. So far so good, but what happens with
> the union of several cuts, say a cross? Through the union operation start
> and end points will probably get lost. Which path will the machine take?  
> My proposal was: 
> - use solid 2D objects like polygon() to describe engravements.
> - use 1D objects like the *new* polyline() primitive to describe cuts with
> zero-width path. 
> - make sure a closed polyline() path is distingished from a polygon() in the
> DXF and SVG output.
> To have a line()/polyline() primitive would also be helpful to do simple
> drawings. Implemented with a pathwidth parameter with a non-zero default, it
> could also be extruded to 3D. Its semantics could further be extended to let
> it live in 3D space, i.e. provide a 3D path and get a solid "pipe" with the
> given path width - remember the discussion we had about sweeping along
> arbitrary 3D paths. 
> Jordan, 
> its always up to the machine's preprocessor, how it interpretes things. As
> the thread originator notes, he currently uses two exports one for cutting,
> one for engraving. You could - in theory - also describe an engraving region
> with a closed polyline. 
> --
> Sent from: http://forum.openscad.org/
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191029/fde8e3c6/attachment.html>

More information about the Discuss mailing list