Jack000 / SVGnest

An open source vector nesting tool
MIT License
2.24k stars 367 forks source link

SVG nest and orientations (0 or 180) or (90 or 270) #57

Open HJuup opened 6 years ago

HJuup commented 6 years ago

Example.zip Interesting stuff this SVGnest.

I also commented in #15. That was about grain-direction in wood. I repeat my comments here:

In metal sheet industry the requirements are somewhat more complex compared to the wood-grain issue. Metal sheet proces is as follows: Sheet metal is cut (lasered or punched) Next step is bending on a press brake. For the press-brake it is important that the grain (molecular structure) is in the same direction for all identical parts in the nest. That is a prerequisition to have a consistent bend during the complete batch. In most cases it does not matter if grain is along or perpendicular to bending axis. Now back to nesting and rotations: Commercial nesting software often has an option to select allowable rotations of a part. Most of the time this is set per part to (0 or 180) or to (90 or 270). This will ensure grain directions for identical parts to be the same. However it does not always produce the best material utilisation. It can be the case that a part (which is set to 0 or 180) will fit better if it were set to (90 or 270) and would result in a better utilisation. I've not seen commercial nesting software that does provide the option per part: try (0 or 180) and try (90 or 270) Sadly SVGnest does not provide this option either. However, having taken a look at Jacks code there is a routine that places parts with the help of a genetic algorithm (GA). I think it is in this section that a code change should be made to accomodate the (0 or 180) or (90 or 270) rules. However I'm totally not into GA. Is there anyone who can help to get this done?

I have included a sample. Start with the "example.svg". Set part distance:10 and enable "explore concave areas". This wil result in a nest like "result.svg" (You might wonder where the 3 indentations in the bin are for: These are the reserved areas where the lasercutter places its clamps to move the metal sheet under the laserbeam) The goal would be to let have the same colored parts the same orientation.

Hopefully someone will be helpfull.

devrose04 commented 10 months ago

Hello, I can see your job post in upwork. I can do it. I want to discuss the project with you more details. This my gmail. vicacc207@gmail.com. If you don't mind, I hope you invite me to your slack workspace. How do you think?