CadQuery / CadQuery/CQ-editor

Use `show_object()` in the code sample

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

Description

This is the default code sample when a user opens CQ-Editor for the first time:

```python
import cadquery as cq
result = cq.Workplane("XY" ).box(3, 3, 0.5).edges("|Z").fillet(0.125)
```

`show_object()` is not used here so the fallback behavior is to render all object declared in variables. This can be a source of confusion for a beginner, who may think that there is no such function and the model to render must have to be declared as the `result` variable.

I suggest this (or similar):

```python
import cadquery as cq

box = cq.Workplane("XY" ).box(3, 3, 0.5)
show_object(box.edges("|Z").fillet(0.125))
```

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.