CadQuery / CadQuery/CQ-editor

[feature request] missing some good stuff about assemblies

Open
#249 7 comments 0 reactions 0 assignees View on GitHub
enhancement usability
Dominant language
Python
Stars
1.2k
Forks
210
PR merge metrics
No merged PRs in 30d

Description

Back when issue #218 was still open, I had a workaround so I could see assemblies in cq-editor and avoid that crash:
```python
for key, val in asy.traverse():
shapes = val.shapes
if shapes != []:
c = cq.Compound.makeCompound(shapes)
odict = {}
if val.color is not None:
co = val.color.wrapped.GetRGB()
rgb = (co.Red(), co.Green(), co.Blue())
odict['color'] = rgb
show_object(c.locate(val.loc), name=val.name, options=odict)
```
Now after #238 I can just do: `show_object(asy)` and my parts show up in the CQ-editor window with no crashes, yay!

However, with my workaround/hack to solve the problem, the subassembly pieces were individual parts in the CQ model/object tree so I could show/hide them independently and they knew the names I gave them in my code which was quite convenient:
![image](https://user-images.githubusercontent.com/16778174/110669870-b4185a00-81c4-11eb-8c7b-50c6c481d89a.png)

But after PR #238, the assembly seems to be combined into one object with a mysterious name:
![image](https://user-images.githubusercontent.com/16778174/110669584-613ea280-81c4-11eb-8b72-5e97929c6969.png)
I think combining things in the object tree hides some of the power of assemblies.

Ideally, I think the CQ object pane would be a hierarchical tree view where you could expand/collapse multilevel subassemblies (if that's even a thing) and hide/show whole assemblies or just one piece or subassembly with the check boxes as you wish, but I think that work isn't really worth it, and just flattening the tree and listing all the subassembly pieces with their names and would be 90% as good.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.