Hello!
I am using QCAD Professional 3.29.3 on Linux and running nesting via the command-line tool dwgnest. While testing different nesting configurations for the same sheet, I noticed an unexpected behavior related to margin and tolerance. For margins greater than 40 mm, dwgnest is not able to find a solution with the default tolerance value of 0.01. In some cases, increasing the value helps to find a solution, but not always.
For example, I have several pieces of 140x140 that I want to place into an area of 1100x750 . Therefore, easily could be place at least 6 pieces inside the area with a margin of 40 mm. But dwgnest is only able to place all of them if the tolerance is increase to 12 instead of 0.01 (default value)
This is the full comand used for tolerance -t 0.01:
'~/opt/qcadcam-3.29.3-pro-linux-x86_64/dwgnest -f -sheets=bandeja -parts=PieceMaxAgujero_0,PieceMaxAgujero_1,PieceMaxAgujero_2,PieceMaxAgujero_3,PieceMaxAgujero_4,PieceMaxAgujero_5 -n 1 -m 40 -a 0 -e 0 -no-align -i 400 -r 4 -o /home/lis-devs/packtecserver/nesting/output/out_3mm_6.dxf /home/lis-devs/packtecserver/nesting/output/merged_3.0mm.dxf -platform offscreen'
This for tolerance -t 12:
~/opt/qcadcam-3.29.3-pro-linux-x86_64/dwgnest -f -sheets=bandeja -parts=PieceMaxAgujero_0,PieceMaxAgujero_1,PieceMaxAgujero_2,PieceMaxAgujero_3,PieceMaxAgujero_4,PieceMaxAgujero_5 -n 1 -m 40 -a 0 -e 0 -no-align -i 400 -r 4 -t 12 -o /home/lis-devs/packtecserver/nesting/output/out_3mm_6.dxf /home/lis-devs/packtecserver/nesting/output/merged_3.0mm.dxf -platform offscreen
This happens with any piece that wants to be placed with margin value greater than 40mm. And with some margins, increasing the tolerance does not solve the problem.
Why does dwgnest fail to find solutions for larger margins when using a small tolerance, even though a solution clearly exists?
Is this behavior expected due to how tolerance is applied during geometry simplification and offsetting, or is there another constraint or heuristic at play?
Any clarification would be appreciated.
Best regards
dwgnest is not able to find solution with margin 40 mm
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
estibalizEchevarria
- Newbie Member
- Posts: 7
- Joined: Fri Feb 23, 2024 9:27 am
dwgnest is not able to find solution with margin 40 mm
- Attachments
-
- out_3mm_6.dxf
- (148.92 KiB) Downloaded 59 times
-
CVH
- Premier Member
- Posts: 5098
- Joined: Wed Sep 27, 2017 4:17 pm
Re: dwgnest is not able to find solution with margin 40 mm
Hi,
Also noticed that in out_3mm_6.dxf the two pieces at the bottom are within 37 and 31 units of the piece above them.
There are also a few things wrong with the top left.
About units.
Is it correct that the substrate is 1100 by 750 meters?
Never encountered such a CNC table but is there a practical limit?
Here it won't matter because QCAD works in plain units.
Regards,
CVH
Also noticed that in out_3mm_6.dxf the two pieces at the bottom are within 37 and 31 units of the piece above them.
There are also a few things wrong with the top left.
About units.
Is it correct that the substrate is 1100 by 750 meters?
Never encountered such a CNC table but is there a practical limit?
Here it won't matter because QCAD works in plain units.
Regards,
CVH
- andrew
- Site Admin
- Posts: 8847
- Joined: Fri Mar 30, 2007 6:07 am
Re: dwgnest is not able to find solution with margin 40 mm
Thanks for your report.
Bug report added at:
https://www.qcad.org/bugtracker/index.p ... sk_id=2698
This problem should be fixed for the next release.
Bug report added at:
https://www.qcad.org/bugtracker/index.p ... sk_id=2698
This problem should be fixed for the next release.
-
estibalizEchevarria
- Newbie Member
- Posts: 7
- Joined: Fri Feb 23, 2024 9:27 am
Re: dwgnest is not able to find solution with margin 40 mm
Hi CVH,
Thanks for the reply.
You're absolutely right about the distances. In out_3mm_6.dxf, some parts end up closer than the requested 40 units (ranging from approximately 31–37 mm), and even the piece in the top corner isn't correctly positioned.
This happens because the contour simplification due to tolerance, combined with sheet-margin set to 0, means the real spacing between pieces—and between pieces and the sheet edge—is no longer guaranteed.
The sheet is a simple 1100 × 750 mm rectangle. You mentioned a CNC table, and you're right that dwgnest is designed for cutting operations.
Since dwgnest is designed for CNC cutting with maximum packing efficiency, could it be rejecting the >39 mm margin as unrealistic for this area, treating it as an error rather than a valid constraint?
Thanks for the reply.
You're absolutely right about the distances. In out_3mm_6.dxf, some parts end up closer than the requested 40 units (ranging from approximately 31–37 mm), and even the piece in the top corner isn't correctly positioned.
This happens because the contour simplification due to tolerance, combined with sheet-margin set to 0, means the real spacing between pieces—and between pieces and the sheet edge—is no longer guaranteed.
The sheet is a simple 1100 × 750 mm rectangle. You mentioned a CNC table, and you're right that dwgnest is designed for cutting operations.
Since dwgnest is designed for CNC cutting with maximum packing efficiency, could it be rejecting the >39 mm margin as unrealistic for this area, treating it as an error rather than a valid constraint?