Thanks for the detailed feedback!
1) Looks like a functional bug, we might want to update the docs.
2) Good point
2') Might need to define a better grammar.
3) I cannot reproduce the issue. Are you sure you are on the latest CQ version? The following code works fine
b1 = cq.Workplane('XY').box(1,1.5,1.5)
b2 = cq.Workplane('XY').box(1,0.5,0.5)
a = (
cq.Assembly(name='a')
.add(b1, name="b1", color=cq.Color("red"))
.add(b2, name="b2", color=cq.Color("green"))
)
a.constrain("b2@faces@<X", "b1@faces@>X", "Plane").solve()
show_object(a)
And this does not (which is the intended behavior - you only need / to address sub-assemblies)
b1 = cq.Workplane('XY').box(1,1.5,1.5)
b2 = cq.Workplane('XY').box(1,0.5,0.5)
a = (
cq.Assembly(name="a")
.add(b1, name="b1", color=cq.Color("red"))
.add(b2, name="b2", color=cq.Color("green"))
)
print(a.objects.keys())
show_object(a.constrain("a/b2@faces@<X", "a/b1@faces@>X", "Plane").solve()
4) Currently not, but AFAIR there is an issue to implement tags for operation results. I would not count on it being implement soon though. You can use
combine=False and union manually, but this will not be a single fluent call. You can also use a different approach:
r = (
cq.Workplane()
.box(1,1.5,1.5)
.faces(">X").workplane()
.rect(0.5,0.5)
.extrude(0.5)
.edges('|X').edges('>X')
.fillet(0.1)
)
Tag saves a reference to the current workplane
- it does not contain "everything" in the generic case.