Open
Description
The following code does not work, but there is no reason why it shouldn't.
import cadquery as cq
piece=(cq.Workplane("XZ")
.sketch()
.trapezoid(10,5,60)
.finalize()
.extrude(1)
)
combi=(cq.Assembly()
.add(piece, name="top")
.add(piece, name="bottom")
.constrain("top@faces@<Z","bottom@faces@<Z","Plane")
.solve()
)
base=(cq.Workplane("XY")
.rect(15,80)
.extrude(1)
)
assembly=(cq.Assembly()
.add(base, name="base")
.add(combi,
name="combi_left",
loc=cq.Location(cq.Vector(0,20,10))
)
.add(combi,
name="combi_right",
loc=cq.Location(cq.Vector(0,-20,10))
)
.constrain("combi_left", "Fixed")
)
show_object(assembly)