optimise svg and dxf exports
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
Here is a basic script that produce a rounded box:
```py
import cadquery as cq
from cadquery import exporters
result = ( cq
.Workplane('XY')
.box(50, 50, 1)
.edges('|Z')
.fillet(10)
)
exporters.export(result, 'test.svg', opt={
'width': 300,
'height': 300,
'marginLeft': 10,
'marginTop': 10,
'showAxes': False,
'projectionDir': (0, 0, 1),
'strokeWidth': 0.1,
'strokeColor': (0, 0, 0),
'hiddenColor': (0, 0, 255),
'showHidden': False
})
```
Only one path is necessary for 2d export, but if we look at the source, we can see that many paths are created:
```xml
```
This can be very annoying when using a cnc or laser cutter, because the tool will make a lot of additional useless movements and wille take much more time to cut the piece.
Here is a simulation of what a machine will do on the exported svg (svg moves are replaced with lines):

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.