exportSvg doesn't hide edges that are partially visible
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
This code generates two boxes, one of them crossing the other one. When exporting to SVG with `exportSvg`, edges that start in a visible area and then _intersect_ the other object are rendered incorrectly.
If they _go behind_ the other object, they are rendered correctly.
**Incorrect**
from cadquery import cq, Compound
nl = list()
nl.append(cq.Workplane("XY").box(.1, 2, .1, centered=(True, True, True)).val())
nl.append(cq.Workplane("XY").box(2, 1, 1, centered=(True, True, True)).val())
comp = Compound.makeCompound(nl)
cq.Workplane(comp).exportSvg("boxes.svg")

**Correct**
from cadquery import cq, Compound
nl = list()
nl.append(cq.Workplane("XY").box(.1, 2, .1, centered=(True , True, True)).**translate((0,0,-1)).val()**)
nl.append(cq.Workplane("XY").box(2, 1, 1, centered=(True, True, True)).val())
comp = Compound.makeCompound(nl)
cq.Workplane(comp).exportSvg("boxes2.svg")

Cadquery 2.0 - Python 3.7 - Windows,
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.