I am having trouble understanding assembly constraints.
The assembly that I want to create is below.
My experience is in Autodesk Inventor and this part is created by a mate, flush and flush with offset on each side plate.
With the same thinking I have created the following code and the failed result. It seems as though after I add a third constraint between two objects the original constraints are no longer valid.
import cadquery as cq
base_pl = cq.Workplane().box(600, 1000, 6)
side_pl = cq.Workplane().box(1000, 200, 6)
trough = (
cq.Assembly()
.add(base_pl, name='base_pl')
.add(side_pl, name='side_pl_lhs',color=cq.Color('blue'))
.add(side_pl, name='side_pl_rhs',color=cq.Color('red'))
.constrain('base_pl@faces@>Z','side_pl_lhs@faces@>Y','Axis')
.constrain('base_pl@faces@>X','side_pl_lhs@faces@>Z','Axis')
.constrain('base_pl@faces@>X','side_pl_lhs@faces@>X','Axis')
.constrain('base_pl@faces@>Z','side_pl_rhs@faces@>Y','Axis')
.constrain('base_pl@faces@>X','side_pl_rhs@faces@>Z','Axis')
.constrain('base_pl@faces@>X','side_pl_rhs@faces@<X','Axis')
.solve()
)
show_object(trough)
