markfink / nest2D

Nest2D is a 2D bin packaging tool for python.
GNU Lesser General Public License v3.0
109 stars 39 forks source link

Question about more complex geometry #3

Open vmario89 opened 4 years ago

vmario89 commented 4 years ago

Hi, this repo looks really interesting. I am thinking about some inkscape extension to make off. Is it possible to handle complex geometries which are wrapped in a group or which were combined in a regular SVG path with "d" attribute? In a real life szenario you are going to nest finalized parts but not their outlines only.

Example of more complex part would be the job to nest some living hinge objects which include a lot of inner lines: grafik

regards and thanks for your efforts ! =)

markfink commented 3 years ago

this sounds interesting. Honestly I have no idea what you are trying to do. What I would do is check if sth. like this can be done using clipper. If yes then it can be done in Nest2D. Maybe you can compute some "outer-shape" from your data and compute the placement for these

vmario89 commented 3 years ago

Hi. Thanks for your reply! :-)

I am working a lot with production stuff in open source hardware means and looking a lot for nesting tools and libraries to work on nesting parts to build machines, models, items, artwork, etc.

Basically the idea of nesting is clear. But imagine you want to nest more complex shapes for producing things with a laser cutter, vinyl cutter, origami/papercraft. There you always have 2D parts which have an outer contour but also some data on their surfaces, like differently colored engraving lines, images/textures (coming from UV mapping of a 3D STL/OBJ file for example) or inner contours. While nesting you will lose all those data except the outer contours.

Some example from https://bilder.pcwelt.de/3974361_950x475.jpg grafik

It shows an unfolded paper model with textures.

markfink commented 3 years ago

great! Looks like you are uniquely skilled to solve this. Please report back. I am already curious what you come up with.

vmario89 commented 3 years ago

Sadly not. I am not the deepest skilled math/physics/programmer to solve the ideas with code. I am kind of maker person. I am working a lot on documenting technologies like nesting. If you are interested have a look at

regards, Mario

fitnr commented 3 years ago

I think one solution would be to add attributes to the Item object to allow the extraction of its new position, or (even better) the affine transformation that was applied by the nester. Then the user could apply the same transformation to the image or textures that match with each object.