Author Topic: Nesting  (Read 1599 times)

February 13, 2019, 07:02:14 PM
Read 1599 times

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
Hello people.

I need a function to nest the objects, to make them occupy as little space as possible.
How do I do that?
I can not find a simple solution for either Inkscape or Corel.

Thank you very much.

February 13, 2019, 11:28:16 PM
Reply #1

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

You can group objects (Ctrl+G) and with that you are able to create nested groups -groups containing more groups-.
Yet that won't save you space as those are just for an organised structure.

Can use cloning (Alt+D) to use multiple instances of a group if you like to save space, yet a smaller sized svg (which itself is quite small compared to raster images) may not always solve performance issues. The rendering speed is related to the number of object and detail/filters used on screen, a clone won't help much with that. It can be useful though to cut the attribute definitions drastically some cases.

Please clarify what you are after.

February 14, 2019, 05:41:46 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Yes, if you could clarify what you mean, it would help.  I wonder if you're doing some kind of cutting, and you want everything close together, to minimize waste of whatever material you're using?

Someone else was asking about that, a year or so ago, but I don't think Inkscape has any way to do that automatically.  You'd just have to manually drag everything close together.

Actually I think that person wanted Inkscape to rotate objects and rearrange them so as to minimize the waste.  But there's no Inkscape tool for either thing.  You'd have to drag them with Selection tool.  Possibly snapping would help make it go faster?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 14, 2019, 07:34:24 AM
Reply #3

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
Welcome to the forum!

Yes, if you could clarify what you mean, it would help.  I wonder if you're doing some kind of cutting, and you want everything close together, to minimize waste of whatever material you're using?

Someone else was asking about that, a year or so ago, but I don't think Inkscape has any way to do that automatically.  You'd just have to manually drag everything close together.

Actually I think that person wanted Inkscape to rotate objects and rearrange them so as to minimize the waste.  But there's no Inkscape tool for either thing.  You'd have to drag them with Selection tool.  Possibly snapping would help make it go faster?

It is exactly that, Brynn.
I need to cut objects wasting little material as possible, but I need an automatic tool for that, it is kinda 200 objects with complex geometry.
I have found https://svgnest.com but it is not very practical also very slow.

Thanks for your answer.

February 14, 2019, 09:07:07 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh that's interesting! 

It doesn't seem slow to me.  Well at least not their demo -- it just took about 30 seconds.  But I didn't try my own file.

Since that SVGNest is open source, I guess you could use it to make an extension.  Well, not specifically you, but someone could.  Maybe it would go faster as an extension because you'd be bypassing uploading the file and the browser and servers and all that?

I wish I had skills to make extensions, because I would if I could.  But maybe someone else would be interested?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 14, 2019, 09:24:06 AM
Reply #5

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
Oh that's interesting! 

It doesn't seem slow to me.  Well at least not their demo -- it just took about 30 seconds.  But I didn't try my own file.

Since that SVGNest is open source, I guess you could use it to make an extension.  Well, not specifically you, but someone could.  Maybe it would go faster as an extension because you'd be bypassing uploading the file and the browser and servers and all that?

I wish I had skills to make extensions, because I would if I could.  But maybe someone else would be interested?

My file is running for one hour and it says 3 hours remaining, so yes, it is slow!
I wish that skills too! hahahah

Well, looks like there is no simple solution for that :(

February 14, 2019, 10:26:45 AM
Reply #6

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln

February 14, 2019, 10:48:32 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
My file is running for one hour and it says 3 hours remaining, so yes, it is slow!

Hhmm, well there's something odd about that demo.  All the pieces show up in that box in about 30 seconds.  But the progress bar just keeps going and going, it gets to the end and starts over.  And it's counting Iterations, for some reason which I don't understand.  So I don't know what it's still doing after it seems to have finished.

It looks like there are probably something around 100 items in the demo (with a very rough count/estimation).  So if your file has 200 objects, it doesn't seem like it would take much longer.

Hhmm, now I'm too curious.  I'm trying to think if I have any files with a lot of objects....  Well I do, but they aren't simple.  They have filters and gradients and stuff.  Hhmmmmm....  Still investigating....
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 14, 2019, 11:32:19 AM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh yeah, I see what you mean.  I found a file with a bunch objects (trees from the extension) which I could easily duplicate and made a file with 375 objects, somewhat complex objects.  So far (5 minutes) the progress bar still doesn't show anything, it's not telling me how long is left.  So it does seem to take a while!

I do see some settings under the gear icon.  It would seem you could speed it up with certain settings.  But I'm not really sure what a lot of them are or mean.  Oops - crash went the browser!  Yikes!

Ok.  I made a much simpler file, with only about 50, and much simpler objects, and it went in a couple seconds.  I'll bet the number of nodes per object has a lot to do with how long it takes.  Oh, or it could be the outer dimensions of the container shape have something to do with it too?  Or it could be that having closed shapes is the key.  My first file was all open paths.

Anyway, thanks for sharing.  I hope the Issue Moini referenced will be added sooner than later.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 15, 2019, 07:57:03 AM
Reply #9

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
Oh yeah, I see what you mean.  I found a file with a bunch objects (trees from the extension) which I could easily duplicate and made a file with 375 objects, somewhat complex objects.  So far (5 minutes) the progress bar still doesn't show anything, it's not telling me how long is left.  So it does seem to take a while!

I do see some settings under the gear icon.  It would seem you could speed it up with certain settings.  But I'm not really sure what a lot of them are or mean.  Oops - crash went the browser!  Yikes!

Ok.  I made a much simpler file, with only about 50, and much simpler objects, and it went in a couple seconds.  I'll bet the number of nodes per object has a lot to do with how long it takes.  Oh, or it could be the outer dimensions of the container shape have something to do with it too?  Or it could be that having closed shapes is the key.  My first file was all open paths.

Anyway, thanks for sharing.  I hope the Issue Moini referenced will be added sooner than later.

Firstly I tried with 300 objects, relatively simple, not even near a complexity of a tree.. went for 2 hous with always 2 hours of stimated time, when the progress was at 50% then screen got full white... OMG!
Then  I reduced to 90 objects, it completed at around 40 minutes.
This is so slow! :(

February 15, 2019, 03:57:55 PM
Reply #10

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Maybe try out the other version (linked from gitlab issue) if you need to do this frequently? You don't have to donate.

February 15, 2019, 04:14:04 PM
Reply #11

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
Maybe try out the other version (linked from gitlab issue) if you need to do this frequently? You don't have to donate.

I couldnt find that, can you point me?

Thank you.

PS: I have downloaded the GitHub local version but it looks the same, feel will take same time and does not have a progress bar :(

February 15, 2019, 07:34:00 PM
Reply #12

phiscribe

  • Jr. Member

  • Offline
  • ***

  • 43
The svgnest was very slow too when I tried it.  I don't know of any other open source nesting solution.

SignCutPro 2 has a nesting function.  Ecut plugin for CorelDraw has one.  Some of the Flexi series of cutting software have this.  There could be others.
 All are commercial though.
  • Latest Stable
  • Win 8.1

February 15, 2019, 08:22:25 PM
Reply #13

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
The svgnest was very slow too when I tried it.  I don't know of any other open source nesting solution.

SignCutPro 2 has a nesting function.  Ecut plugin for CorelDraw has one.  Some of the Flexi series of cutting software have this.  There could be others.
 All are commercial though.

I know about those solutions, but for my use it is WAY SO EXPENSIVE :(

February 16, 2019, 04:14:58 AM
Reply #14

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Chico, did you download the C++ version? (just verifying - I haven't tested it myself, I mean this one: https://deepnest.io/ - the author claims it's faster)

February 16, 2019, 12:50:12 PM
Reply #15

ChicoCyberGoth

  • Sr. Newbie

  • Offline
  • **

  • 7
Chico, did you download the C++ version? (just verifying - I haven't tested it myself, I mean this one: https://deepnest.io/ - the author claims it's faster)

WOW!
This one is MUCH better!
Thank you very much!