Jack000 / SVGnest

An open source vector nesting tool
MIT License
2.3k stars 383 forks source link

Labels for svg 'pieces' #18

Open servant74 opened 8 years ago

servant74 commented 8 years ago

If cutting some items, even if they are drawn out, some might be very similar. It would be nice to attach a label to each piece (possibly a number, with an optional text field - think 20 to 30 characters or so).

This 'legend' could be separate from the parts, but would need to be associated with each part both before and after optimization, so the parts can be identified for use later.

Sorry if this is to wordy. This should be a long term enhancement, not something I expect could be quickly done.

Thanks for your consideration.

schrade commented 8 years ago

I believe the SVG specification has ability to add name/description to the nodes. I'm not sure if this is theoretical at this point though - I've not seen SVG software that provided for adding the info.

groyk commented 8 years ago

In most laser cutting software, each part is assigned a specific color and number.

ahaufstop commented 7 years ago

I have found if you set the ID property in the initial software it is preserved through the nesting process. In inkscape set under (Objects-> Object Properties...) Ctrl-Shift-O . I have been using this to add ids and text info that i can then deal with in the output nested svg. I use it to automatically add label markers in a document. ( NB screenshot_20161129_104730 screenshot_20161129_104547

i am using the code to make a quiz sheet for building/places :) )

cptX commented 5 years ago

I need this functionality too. I suggest to manipulate every group in the svg as a separate object instead of using only it's shape. Then inside the group we could include also a tag