microsoft / maker.js

📐⚙ 2D vector line drawing and shape modeling for CNC and laser cutters.
http://maker.js.org
Apache License 2.0
1.74k stars 264 forks source link

[suggestion] Expand $() functions abilities #389

Open vespakoen opened 5 years ago

vespakoen commented 5 years ago

Happy new year!

I was looking at cadquery (https://dcowden.github.io/cadquery/apireference.html#d-operations) and thought their API is quite nice, I'd like to suggest extending it's functionality to include things like fillet, dogbone and the drawing functions that remember the "current position", like moveTo, lineTo, lineH, lineV etc.

vespakoen commented 5 years ago

Here is my hacky attempt at it (only has some basics at the moment): https://github.com/makercam/makercam/blob/master/src/drawing.ts

danmarshall commented 5 years ago

Hey @vespakoen Happy new year to you! That is a pretty cool API. Would be cool to make it a standalone project outside of MakerCam so that it can be used in other projects.

danmarshall commented 5 years ago

@vespakoen some of these commands such as moveTo, lineTo etc. might be good for a new ChainBuilder class. But that idea would only be a subset of what your example contains.