deepnest-io / Deepnest

An open source nesting application for laser cutters, plasma cutters and other CNC machines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command Line Interface for Deepnest

bosd opened this issue · comments

commented

Requested in: Jack000/Deepnest#101

Would it be possible to use deepnest with a CLI (or API) in order to automate the process ?

Found this in @odemakov 's fork..
Start cli development

odemakov/Deepnest@94e72f7

Can someone look into this? Is this ready for an PR??

commented

Adding a cli itself is likely not too difficult (to start nesting given a set of files), but the code is structured such that it runs in a worker and never ends. Likely the first effort would be logic, or at least policy (maximum number of runs, maximum time, something like that) to stop the runs so that the job could complete and save the resulting best SVG(s).

commented

but the code is structured such that it runs in a worker and never ends.

In one of the forks, I did see a stop implemented..

Well, there are bigger challenges for now :)

commented

If you find that fork again, post a reference to it here. That would at least be a piece of the puzzle.

commented

I think i did see two implementations, for now I can only find some sort of timeout implementation.
In the fork of @mfussi

https://github.com/mfussi/Deepnest

Quite a commit:
mfussi/Deepnest@f8b7b3c

commented

@progand seems to be working recently on a CLI. https://github.com/progand/Deepnest

I tried to get rid of Electron, but SVG processing strongly depends on the browser. JSDom has poor SVG support and doesn't help much. So I decided to hide the Electron window to be able to run deepnest as a console script.
The script stops executing once first solution is found.