CadQuery / CadQuery/CQ-editor

[Feature Request] Change opacity/color in "Objects" subwindow. And some `show_object()` improvements

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

Description

Feature request:
1. UI allow to change opacity/color of showed objects, in "Objects" subwindow
2. Support default opacity setting
3. Support automatically give different color to objects, in a pre-set color list.

Currently we usually need to write
```python
show_object(xxx, options={'alpha': 0.5} )
```
for every object.

Having to write many `options={'alpha': 0.5}` is tedious.

I've tried this workaround:
```python
import cadquery as cq

box1 = cq.Workplane() .rect(10, 10) .extrude(10)

box2 = box1.val().moved((20, 0, 0))

def show(obj):
show_object(obj, options={'alpha': 0.5})

show(box1)
show(box2)
```
But resulting in only box2 is showed, due to have same name. `show_object()` used `obj` as object name,

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.