Skip to content

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

@garywill

Description

@garywill

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

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:

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions