CadQuery / CadQuery/CQ-editor

Inconsistent behavior when displaying objects with show_object()

Open
#507 4 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

## Description
There appears to be inconsistent behavior when displaying a Sketch object directly with `show_object()`. The function seems to automatically assemble the Sketch before displaying it.

## Code to reproduce
```python
import cadquery as cq
line = cq.Sketch().segment((0,0),(0.25,1)).segment((1,2))
line_assemble = line.assemble()
show_object(line) # This shows the assembled version despite 'line' not being assembled
```

## Expected behavior
I would expect `show_object(line)` to either show the unassembled Sketch object or require explicit assembly before displaying.

## Actual behavior
When calling `show_object(line)`, it displays the Sketch as if `line_assemble = line.assemble()` had been called first. This automatic conversion happens behind the scenes.

## Environment
- CQ-Editor version: 0.5.dev0

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.