Closed GaN-T closed 2 months ago
The edges can be projected to the slab, then added to the pending edges for extrude/cut.
import cadquery as cq
slab = cq.Workplane().box(5, 5, 2)
posts = (
slab.faces(">Z")
.workplane()
.rect(3, 3, forConstruction=True)
.vertices()
.circle(0.5)
.extrude(2, combine=False)
)
slab = slab.faces(">Z").tag("top")
edges = [
e.project(slab.faces(tag="top").val(), (0, 0, -1)) for e in posts.edges(">Z").vals()
]
slab = slab.workplaneFromTagged("top").add(edges).toPending()
slab = slab.extrude(-1, "s")
With changes for #1511, perhaps instead the post faces could be added to a sketch placed on the slab face for the cut.
Hi all,
Is it possible to use an existing face as a mask to perform operations on the created objects in cadquery?
In the simple example above, I would like to use the top face (the four circles) as a sketch to then extrude back down into the original object (slab_posts) to a given depth. How do I use the face geometry for further operations? In FreeCAD, we can use "project" to inherit features into a sketch to then perform a given operation. Is there a way to do something like this in Cadquery?