Luban
Luban copied to clipboard
Bug: Wrong cutting order for laser
Wrong cutting order for laser
Affected Version
Luban 4.4.0
To Reproduce
Steps to reproduce the behavior:
- Load an object with an inner path and outer path.
- Laser cut it.
Expected behavior
The inner path is cut before the outer path so that the whole object does not falls down before all inner parts are cut.
🌍 Your Environment
Platform:
- Operating System: Windows 7 x64
- Printer: Snapmaker A350
Inside of an object, paths are not distinguished to be inner or outer path.
So if you want specific print order, you can design and separate the two objects, and specify their print order separately.
I am aware of that workaround. Nevertheless, if a human can distinguish both, a program is also able to do so. The easiest way is the scan line algorithm.
@daniel-starke you are right.
Here is scenarios to be considered,
- Nested path. We can have more than 2 path embracing each other, you will want to cut from the inner most to outer most path. This can be done by classic geometric algorithms.
- Overlapping path. If two paths overlap each other, we can not determine which one should be the first to cut; If two path overlap each other, and shaping a closed area, if we want the closed area to be the last to cut, it's a bit difficult to deal with.
- Open path. It's not a different scenario than 2, both open paths and closed paths can overlap.
To detect overlapping areas, we will need to calculate cross points over scan lines, and generate even more points. I think we can do simple no-overlapping path detection (like we did for CNC), and ignore overlapping ones.
I ran into the same problem where I cut many small parts from a single sheet. The pathplanner cut off large segments which needed further cutting up, which resulted in misalignments. Furthermore, as the cutting started at the edge, the clamps holding down the plywood didn't serve any purpose anymore.
To solve the scenario's above, one way of solving it would be:
- Add intersection points for crossing paths. (optional, crossing paths would be an edge case I assume?);
- Start cutting in the center of the work piece;
- Only cut off a part that doesn't need any further cutting.
- It should not cut anything that doesn't add to point 3, e.g. no random cuts on other parts.
This should create a sort of spiralling path outwards, and solve the problems of premature disconnects, nested paths and overlapping paths.
Attached a file I used.
Animated preview of how Luban routed the laser cut:
To have more control over the pathplanner would be highly beneficial. I've found some settings in Lightburn that would work in my case, by using the Order by Group as first priority:
Hope this helps.
I am adding my voice to this request. I cut lacy works in paper and when the outline is cut first of course the fan blows the pieces out of alignment. The animated preview that @mutatrum posted is ridiculous... the amount of time wasted on that pathing! Time is money when it comes to laser work, especially if you are cutting things for other people.
similar problem here. it seems to be impossible to cut this part properly.
When importing a DXF file, I would like the cut order to follow the sort order of the objects in the DXF file. Or add an option to specify this behavior. This alone will satisfy my needs.