Comments (19)
Yeah, turning Simplify ON/OFF gets me to the same as you've screenied with the 6 5's and a 6 - but somethings not right. With Simplify ON parts are butting correctly up to the material edge and to each other,
but with it OFF I still get the gap noted in the first screenie when a flat edge is against the material edge. That can't be right.
Just 6 5's DeepNestPort comes back with:
but the original DeepNest comes back with:
Maybe not end of the world with these demo pieces but with my real world nest the impact is ~15% more material.
Appreciate the pointers and feedback. I'll keep looking in to it; and if you can shed any more light it would be most welcome.
from deepnestport.
I've done quite a bit of work on this and have pushed code that'll improve the situation fir for my purposes. I appreciate you were reluctant to take on StyleCop type changes but the codes there if you want to have a look. I've cherry picked your commits over too.
This is all exposed through the UI so when the Curve Tolerance setting or Use Hull Approximation settings change the user can see the approximations that will get used in the nestings.
Note that almost invariably the approximation is much improved but still has less points than the original approximation; there is more inertia building the approximations before starting the nest but once the nest is off and running it's actually faster so you catch up pretty quickly.
Happy to close the issue; I have an answer. Thanks for the pointers.
from deepnestport.
Ooh, forgot:
Can match the original DeepNest but still have to take Curve Tolerance lower than in the original so start up time is borderline unacceptable, but a very small compromise and it's back to little more than the kerf I'd get on the laser anyhow; can live with that :)
from deepnestport.
Hope you consider breaking away from the legacy code base because it's getting really hard to merge.
I think we shouldn't entangle our repositories too much
Putting ClipToHull on the UI wouldn't make sense in my code because of the caching mechanism I put in (which you didn't copy over) but the caching mechanism helped massively keeping the UI responsive.
Cache is good, but simpification contour draw is just auxiliary debug feature. In normal mode it doesn't affect UI response. Besides your cache based on HashCode.Combine which is not available in my framework.
from deepnestport.
Hi, Could you please provide your input data (e.g. dxf files) so that I can reproduce your gaps problem
A screenshot will also be useful
from deepnestport.
With Debug rectangles everything's nice and tight:
But with some real complex shapes I get random gaps in between:
Run nesting on two of these parts and note during optimisation sometimes they nest tight but they ultimately settle on a nest with a gap per screenie above:
SideWall.zip
from deepnestport.
Actually I'm seeing the same behaviour just with some of the sample dxfs you've included in the repo. 4.dxf won't load at all; kills the application completely.
from deepnestport.
4.dxf won't load at all; kills the application completely.
'closing threshold' in settings.xml was too small by default. 4.dxf should load fine now.
I'll try to fix the gaps issue ASAP
from deepnestport.
With the commit you've already done I'm seeing big improvements.
Load one of the 6.dxf and 6 of the 5.dxfs and nest. The 5's don't fill the space in the 6.
from deepnestport.
...ooh and 4 loads now; can nest. The preview doesn't show on the Debug tab though.
from deepnestport.
I've rebased on top of your commits today and pushed my develop branch. It does a bit of tidying up (nothing controversial but sorry, I'm a bit OCD on standards) and adds persisted settings and export to dxf (shamelessly plagiarised from @Daniel-t-1 but it seems to be working so far for my samples).
Would merge or consider a PullRequest?
from deepnestport.
I think a better way is to create separate PRs for dxf export, persisted settings and tidying up. Because I'm not sure about stylecop stuff.
Also I can add dxf export myself, no problem.
from deepnestport.
from deepnestport.
You really should consider adding the analysers: saves you a load of effort and time.
I'll try, but it is important to keep compatibility with the original code, That's why the code is such a mess right now.
Found the Simplify setting which has helped with concave/void filling a lot but doesn't seem quite right yet. If you have time to look in to it would be great. I've been playing with the rectangle with 1 wavy face to try understand why it doesn't nest two wavy sides together.
Simplify method does interesting stuff:
It increases the area of the original polygon during simplification. I thing this is the reason for your issue with two wavy sides.
from deepnestport.
Load one of the 6.dxf and 6 of the 5.dxfs and nest. The 5's don't fill the space in the 6.
My results:
Result 1 | Result 2 |
---|---|
from deepnestport.
SvgNestConfig:CurveTolerance = 0.1; (down from 0.72)
A little more investigation to do but i've also got the original DepNest debuggable now too so i can step through side by side with your port; see where it deviates...
Got the original DeepNest down to:
from deepnestport.
A little more investigation to do but i've also got the original DepNest debuggable now too so i can step through side by side with your port; see where it deviates...
It would be great. Thank you for digging this up. Apparently, there is a bug somewhere in my code
from deepnestport.
I really like your idea about nfp clipping using a convex hull in order to reduce simplification artifacts. I've integrated it into my code as an option.
BTW, It's strange that you have too many points after simplifying in the picture above.
from deepnestport.
Hmm... yeah. Maybe I took too early a commit to do the comparison. The simplifications may then be up a few points but still much improved. Saw you've cherry picked over; happy to have added value. Hope you consider breaking away from the legacy code base because it's getting really hard to merge. Have a look at the commit following on from the reverse cherry picks of your adaption of mine on yours. Putting ClipToHull on the UI wouldn't make sense in my code because of the caching mechanism I put in (which you didn't copy over) but the caching mechanism helped massively keeping the UI responsive.
from deepnestport.
Related Issues (20)
- Accepting DXF as input HOT 11
- 'minkowski.cc': No such file or directory HOT 4
- 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
- Best fitness result NaN HOT 6
- 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.