-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random gaps between items #12
Comments
Hi, Could you please provide your input data (e.g. dxf files) so that I can reproduce your gaps problem |
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: |
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. |
...ooh and 4 loads now; can nest. The preview doesn't show on the Debug tab though. |
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? |
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. |
Sure. The stylecop is just fixing most of the warnings that come up in your Visual Studio. Mostly with white space and standardised code layout. It can help a lot further with best practice coding which i didn't do because that would need a lot more care to make sure it doesn't break any logic. You really should consider adding the analysers: saves you a load of effort and time.
No problem though if you would rather hold back. Really appreciate what you've done already!
With peristed settings and dxf export it's working much better for me. 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.
From: ***@***.***
Sent: 17 June 2021 18:08
To: ***@***.***
Reply to: ***@***.***
Cc: ***@***.***; ***@***.***
Subject: Re: [fel88/DeepNestPort] Random gaps between items (#12)
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#12 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAD7WLU7HVCY6BV3MUHGT5LTTITWFANCNFSM462WW4EQ>.
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#12 (comment)", "url": "#12 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
It would be great. Thank you for digging this up. Apparently, there is a bug somewhere in my code |
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. |
# Conflicts: # DeepNestLib/Background.cs # DeepNestLib/DeepNestLib.csproj # DeepNestLib/DxfParser.cs # DeepNestLib/NFP.cs # DeepNestLib/NestingContext.cs # DeepNestLib/RawDetail.cs # DeepNestLib/SvgNest.cs # DeepNestLib/SvgNestConfig.cs # DeepNestLib/SvgPoint.cs # DeepNestPort/Form1.Designer.cs # DeepNestPort/Form1.cs # DeepNestPort/Form1.resx
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. |
I think we shouldn't entangle our repositories too much
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. |
Hi.
First of all, great work. I'd fought with the original DeepNest repo but just wasn't getting a successful build then found this port. C# being my preferred language the port's really helpful.
I've already forked (https://github.com/9swampy/DeepNestPort/tree/develop - hopefully you'll be happy to take a PR in due course), applied some core standards and added persisted configuration settings (PlacementType, PopulatonSize etc) but am having problems nesting complex shapes without leaving gaps.
If I use the Demo table and load simple rectangles then no gaps are left, as expected. If I load up actual complex shapes I'm getting random gaps between some items; some no gaps, some with gaps - when there's very clearly no need for any of the gaps at all.
Could you point me in the direction of what I should look in to to see where the gaps are coming from?
Cheers
The text was updated successfully, but these errors were encountered: