Comments (6)
Only noticed after I replied that the question was 3 years old! Sorry for that, glad it helped. You're still using regularly?
I had a similar problem; some long thin parts that nest fairly well with each other leaving gaps that could be filled by small parts if they were fit later, after the long thin ones have placed already. I've attempted two routes;
- restricting rotation on a part by part basis to only vertical or horizontal (for the long thin parts) - which works well and on the original branch you can replicate by either
- reducing the number of Rotations from default 4 to 2 but then that applies to all parts.
- changing the code in the procreant GeneticAlgorithm constructor for the long thin parts - the notion of IsPriority - essentially forcing the long thin parts to get placed first which, especially in combination with the rotation restriction, works very well IF you can fit all parts on a single sheet. More than one sheet and the parts overlay and the nest is invalidated. Still debugging this one and isn't really easy to replicate in the code as it stands. If I fix the problem I'll publish the code :)
from deepnestport.
Hello, i think this is error somewhere. If you give me your input data, i'll try to reproduce this bug and try to fix it.
from deepnestport.
I cannot replicate NaN error anymore.
It seems that it happens only when an element cannot be placed withing a sheet i.e. a polygon bounding box diagonal is bigger than the sheet bounding box diagonal.
I noticed that scaling is highly important too. Here comes the tolerance issue. Below I do not display simplified polygons, as I do not know which property could give me the simplified polygon (Please advice which property I should search for).
Below I compare different tolerances. By tolerance. I mean that I scale polygons before outputting to nesting application and when nesting is finished I scale back to original scale. Random seed number stays the same in all examples.
Scaling 100 times results in some shapes not nested as they are probably average to integers and becomes bigger shapes than sheets. And then nested shapes overlap:
It is quite obvious why it happens because polygons gets simplified or rounded to integers (correct me if i am wrong) But ordinary user do not have clue about the scale and which tolerance to choose.
from deepnestport.
Thank you, for this report. I'll check it out.
from deepnestport.
The code uses float in parts of the nest which can result in overflows so in my branch I flipped to double, just kicks the can down the road though. If you keep scaling up then of course the issue could reappear, as you've found. You could get some mileage by reducing ClipperScale but if you go too far you'll very quickly lose precision in the nest.
from deepnestport.
Thank for the reply.
Other question: do you know how to nest long linear elements, they usually nest very poorly?
from deepnestport.
Related Issues (20)
- Accepting DXF as input HOT 11
- 'minkowski.cc': No such file or directory HOT 4
- Random gaps between items HOT 19
- System.badimageformatexception in minkowski DLL HOT 3
- Instructions on running / building DeepNestPort HOT 3
- Support of path elements HOT 1
- Stuffing _7.dxf with _12.dxf HOT 7
- Export to SVG flipped the paths, polygons, etc. Is there a reason? HOT 2
- Need to know steps to run this project HOT 7
- Exception from HRESULT: 0x8007000B HOT 4
- Save / load nest HOT 5
- Correct usage? HOT 2
- Problem nesting different shapes HOT 12
- SEH exception in Minkowski.dll while calling CalculateNFP() HOT 12
- Add a hole in NFP HOT 15
- Random with constant seed so that results stays the same HOT 12
- What work is still remaining? HOT 5
- Conversion of mergedLength to C# HOT 3
- Compiling boost for Mac HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepnestport.