Fill page with patterns while minimizing wasted space

Post about using Inkscape with cutters or plotters.
babycody
Posts: 2
Joined: Sat Nov 17, 2012 9:32 am

Fill page with patterns while minimizing wasted space

Postby babycody » Sun Nov 18, 2012 5:47 am

I have seen people use Inkscape to produce patterns for die cutting and CNC machines. I would like to do the same thing. Is there a way within Inkscape, or with an extension, to fill a page completely with different patterns? I want to minimize the amount of material wasted during the cutting. Some sort of algorithm that can flip and rotate groups leaving a minimum spacing between them would be nice. If this function does not exist, is there a site where I can request that functionality? I have seen it referred to as nesting shapes on the web. These shapes would differ from each other.
Last edited by babycody on Mon Nov 19, 2012 5:38 am, edited 1 time in total.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Fill page with patterns while minimizing wasted space

Postby brynn » Sun Nov 18, 2012 10:00 pm

Image
Welcome to InkscapeForum!

It seems like I've heard of an extension that might do this. Here's the Extension Repository, although I don't know if that extension is listed there. http://wiki.inkscape.org/wiki/index.php ... Repository If it's not, maybe someone else will know where it is.

Launchpad (https://launchpad.net/inkscape) is where you will find any potentially existing feature request, and also where you should make new requests. If there's no existing request, you'd be welcome to submit one. (Search bugs and/or submit a bug report. New feature requests are made using bug reports (for some reason which I don't know)). If there is already an existing request, you can add your support ("this affects me too" button) (or something like that).

But before you do that, check out Inkscape's Tiled Clones (Edit menu > Clone). That's one way to get the same image repeated many times. In order to prevent wasted material, you'd have to be creative with the tile symmetry (Symmetry tab) and/or tile rotation (Rotation tab), depending on the shape of the object. However, it might not work for your purpose. I don't know if your machines will recognize an Inkscape clone. If they won't, then before you save and submit the file (to the machine) you'll need to break the clones' links to the original (Select All, then Unlink Clones button on command bar or Edit menu > Clones > Unlink clones).

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Fill page with patterns while minimizing wasted space

Postby druban » Mon Nov 19, 2012 2:52 pm

There isn't a feature that does this as efficiently as you have envisioned -rotate and flip?!..., but there is a remove overlaps section in the align dialog in upcoming or maybe already released versions of Inkscape. The same for a randamize centers feature - that one is newer. You can just stack everything and let Inkscape rearrange them so they are as close as possible without actually overlapping. You can even specify how much space there should be in between.

A packing algorithm (that's what you are describing) is quite difficult in terms of math. There are good solutions for circles and rectangles and i am sure someone is working on adapting them to objects of any shape. I believe as far as Inkscape is cocerned the best we can hope for is an efficient packing of bounding boxes. Incidentally, this whole class of computation is considered NP-Hard, or,
Wikipedia wrote: ...The complexity class NP, on the other hand, contains many problems that people would like to solve efficiently, but for which no efficient algorithm is known...


i guess what this boils down to in practical terms is that if you stack all your objects in one spot (by using align centers, vertically and horizontally) and then use the remove overlaps and still don't get what you want, the most efficient way to do it would be - manually. Using your own neuron based sugar powered analog computer. :D
Your mind is what you think it is.

xalky
Posts: 1
Joined: Fri Dec 21, 2012 10:53 am

Re: Fill page with patterns while minimizing wasted space

Postby xalky » Fri Dec 21, 2012 11:03 am

Hello, This is my first post. I am learning Inkscape to design shapes to be exported and cut on a cnc plasma cutter. I too am interested in a nesting program that could be run in Inkscape to nest a variety of shapes or many of the same shape onto a sheet of metal (in my case). There is an add-on for Corel draw that is called Ecut that can do this and it seems to do it very well. I would post a link to the Ecut video on YouTube but i think its prohibited.

I was hoping that maybe someone in the vinyl sign business could point me towards a similar solution for InkScape.

User avatar
Inkspots
Posts: 232
Joined: Sat Dec 03, 2011 3:16 am

Re: Fill page with patterns while minimizing wasted space

Postby Inkspots » Fri Dec 28, 2012 9:03 pm

You could try asking in http://www.inkscapecuttingdesign.com/index.php but I think you'll get the best results with manually placing your objects, and then saving the layout
You've made to re-use again.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Fill page with patterns while minimizing wasted space

Postby brynn » Sat Dec 29, 2012 10:58 am

Welcome xalky,
We've had some requests for this in the past. To my knowledge, there isn't any way to do it automatically. But it would be a nice thing to have. Maybe someone will make an extension for this purpose?

Or you could submit a new feature request, if you like: viewtopic.php?f=28&t=286

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Fill page with patterns while minimizing wasted space

Postby brynn » Sat Dec 29, 2012 11:43 pm

Hey folks!
I'm always forgetting about Inkscape's Rows and Columns feature (Objects menu near the bottom). If your objects are all the same width and/or height, or very close, then Rows and Columns will be better than nothing. You can set spacing to zero, if you want.

If you have different sizes/shapes, you could set up pairs of columns, where you have the left column aligned to the right side, and the right column aligned to the left side. Then you'd only have to "manually" align the 3 pairs of columns. (Or whatever reasonable scenario is needed for your situation.)

I am surprised about druban's comments as to the non-existence of an algorithm to perform such a task! While it may well be not possible (because I trust druban's knowledge about math and geometry) it seems like it shouldn't be so difficult (because my own common sense is usually pretty reliable). But having read druban's comments, and made my own, I do seem to recall someone asking if Inkscape has such a tool, because another popular graphics app does have one -- might have been Corel or Illustrator. I wish I could remember more, because I don't have enough to go on, to search out that topic. But some program does apparently have something like that :D

Edit -- From what I recall, it was a printing option, rather than a drawing option. Maybe that's the difference between what's possible and what's not?

jgasal
Posts: 1
Joined: Thu Nov 20, 2014 4:57 am

Re: Fill page with patterns while minimizing wasted space

Postby jgasal » Thu Nov 20, 2014 5:10 am

This problem has been solved for a long time, at least in other software. It is usually called "nesting" and has long been used for various CNC machines, such as waterjet, plasma, laser, and vinyl cutters. Those machines have specialized CAM software to do the nesting. It's probably expensive software--isn't everything for industry? :roll:

That said, I also would love to have an extension for Inkscape to implement nesting. Thanks!


Return to “Inkscape & Cutters/Plotters”