From 88d2f7e87904790d0b9cd00218e11eebf2138bd2 Mon Sep 17 00:00:00 2001 From: jdegenstein Date: Tue, 7 Mar 2023 13:18:47 -0600 Subject: [PATCH] add name param to show_object doc in README.md (#390) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a97356b4..10e3849d 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ dnf install -y mesa-libGLU mesa-libGL mesa-libGLU-devel ### Showing Objects -By default, CQ-editor will display a 3D representation of all `Workplane` objects in a script with a default color and alpha (transparency). To have more control over what is shown, and what the color and alpha settings are, the `show_object` method can be used. `show_object` tells CQ-editor to explicity display an object, and accepts the `options` parameter. The `options` parameter is a dictionary of rendering options named `alpha` and `color`. `alpha` is scaled between 0.0 and 1.0, with 0.0 being completely opaque and 1.0 being completely transparent. The color is set using R (red), G (green) and B (blue) values, and each one is scaled from 0 to 255. Either option or both can be omitted. +By default, CQ-editor will display a 3D representation of all `Workplane` objects in a script with a default color and alpha (transparency). To have more control over what is shown, and what the color and alpha settings are, the `show_object` method can be used. `show_object` tells CQ-editor to explicity display an object, and accepts the `options` parameter. The `options` parameter is a dictionary of rendering options named `alpha` and `color`. `alpha` is scaled between 0.0 and 1.0, with 0.0 being completely opaque and 1.0 being completely transparent. The color is set using R (red), G (green) and B (blue) values, and each one is scaled from 0 to 255. Either option or both can be omitted. The `name` parameter can assign a custom name which will appear in the objects pane of CQ-editor. ```python -show_object(result, options={"alpha":0.5, "color": (64, 164, 223)}) +show_object(result, name="somename", options={"alpha":0.5, "color": (64, 164, 223)}) ``` Note that `show_object` works for `Shape` and `TopoDS_Shape` objects too. In order to display objects from the embedded Python console use `show`.