FS#2794Nesting: crash with certain parts at 45° on large sheets
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD/CAM
- Severity
- High
- Priority
- Normal
- Reported version
- 27.0.6
- Operating system
- All
- Reported
- 2026-12-02 by andrew
- Forum
- Discussion
QCAD/CAM terminates during the nesting calculation for certain parts with edges at exactly 45° when nesting on large sheets.
Steps to reproduce:
- Draw a closed 90° annular sector (two arcs with radii 497.5 and 410 from 45° to 135°, connected by two lines) and a rectangular sheet of 2540 x 3810.
- Select the part and start CAM > Nesting with 4 rotations, a margin of 5 and a sheet margin of 5.
- Choose the sheet and start nesting.
Expected result:
The part is nested onto the sheet.
Actual result:
QCAD/CAM crashes while computing the no-fit polygons. Slightly different radii or a part rotated by 44° instead of 45° nest fine.
Cause:
Intersection points between edges were computed with floating point arithmetic that is not precise enough for large coordinates (at least on Windows). Intersections that fall exactly onto a grid point (typical for 45° edges crossing horizontal or vertical edges) could be off by one unit. Intersection points are now computed with exact integer arithmetic.
Known workaround:
- Rotate the part by a small angle (e.g. 1°) before nesting.