blendquery
blendquery copied to clipboard
Relative locations of objects in an assembly are not respected
Consider this:
import cadquery as cq
def makeBox():
return (
cq.Solid.makeBox(1, 1, 1)
)
def makeCylinder():
return (
cq.Solid.makeCylinder(height=5, radius=0.2)
)
result = (
cq.Assembly()
.add(makeBox(), name="b")
.add(makeCylinder(), name="c", loc=cq.Location((0, 0, 3)))
)
When you put this into Blender, the relative locations of these two objects are not respected.
I think we can get this solved along with introducing per member material for each object in an assembly. If the author is fine with this I can write a patch.
Thank you for writing up on this issue.
We could address it by reverting to an internal Assembly -> Compound method, such as assembly.toCompound() or cadquery.exporters.utils.toCompound(assembly). However, this would flatten the assembly into a single shape, reducing flexibility and preventing changes like assigning materials to individual members, as you mentioned.
I’d be happy for you to explore an approach that extends the current system, where each child of the assembly is parsed like any other object 👍