Feedback on technique for positioning a tab and slot on a sliced box #1933
-
Beta Was this translation helpful? Give feedback.
Answered by
lorenzncode
Nov 8, 2025
Replies: 1 comment 5 replies
-
|
Here is another way to create the box parts. I haven't tried the tab part yet.
import cadquery as cq
box1 = (
cq.Workplane()
.box(240, 140, 70)
.edges("|Z")
.fillet(20)
.faces("<Z")
.edges()
.fillet(20)
.faces(">Z")
.rect(200, 100)
.extrude(-50, "s") # cut ("s" is subtractive mode)
)
box1 = box1.faces("<X").workplane(offset=-60).split(True, True)
top = box1.solids(">X")
bottom = box1.solids("<X") |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

The vectors can be automatically computed from face normal and edge tangents to simplify the code.
The orgin can also be computed from the edge. See the example below with
positionAt(0.5)for edge midpoint.See example below to select a single edge:
Here is a rough experimental example of a function that might be reused for this purpose.