Cutting or splitting assemblies/compounds produces wrong result
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
Sample code
```python
import cadquery as cq
space = 19.05
cherryCutOutSize=14.05
cherrySize=14.58
cols = 2
rows = 4
width = cols * space
depth = rows * space
lip=3
height = 10
plateThickness=3
bottom = (cq.Workplane("XY")
.box(width,depth,height)
.faces("+Z")
.shell(lip)
.faces(">Z")
.wires(cq.selectors.AreaNthSelector(-1))
.toPending()
.workplane()
.extrude(1)
.faces(">Z")
.wires()
.item(0)
.toPending()
.workplane()
.offset2D(-lip/2)
.cutBlind(-plateThickness)
)
cherryCut = (cq.Workplane()
.box(cherryCutOutSize, cherryCutOutSize, plateThickness+2)
# Side cuts
.faces(">Z")
.edges("|Y")
.rect(1,4)
.cutThruAll()
# Potrusions
.faces(">Y or Y or Z")
.chamfer(0.2,0.4)
)
plate = (cq.Workplane("XY")
.box(width,depth,plateThickness)
.faces(">Z")
.workplane()
.rarray(space,space,cols,rows,True)
.cutEach(lambda loc: cherryCut.val().moved(loc).translate((0,0,-2)))
)
top = (cq.Workplane("XY")
.box(width,depth,height/2)
.faces("-Z")
.shell(lip)
.faces(">Z")
.rect(width-lip,depth-lip)
.cutThruAll()
.faces("Y").vertices(">Z").tag("refpoint")
bottom.faces("Y[-4]").tag("yface")
(keyboard
.constrain("bottom@faces@>Z", "plate@faces@Z", "switches@faces@Z", "caps@faces@Z", "top@faces@
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.