solid.Shape.show
solid.Shape: show (S)
solid.Shape: V = show (S)
Show a shape in a viewer of its own, redrawing in place.
show (S) shows the shape S in a
model.Viewer, a window drawn by Open CASCADE in a process of
its own. Every variable gets a viewer of its own, titled with its
name: the first show (part) opens the window for part,
and every later one redraws that window in place and keeps the camera
where it was, while show (tool) uses another. So a script that
ends by showing its parts can be run again and again, clear all
and all, and each part changes in its own window. A shape given as an
expression rather than a variable, such as show (fillet (part,
E, 3)), has no name, and all such shapes share one window.
Drag with the left mouse button to rotate, keeping z up, the
middle one to pan, and turn the wheel to zoom; F fits the part to
the window, 0, 1, 2 and 3 turn it to the
isometric, front, top and right views, and T lets it turn any way
or keeps z up again. Closing a window ends its viewer, and the
next
show of that variable opens a new one. Showing the empty shape
opens a variable’s window before there is anything to draw in it.
V = show (S) also returns the viewer. Assigning to
V.Model redraws it at once, and
model.Viewer.pick picks edges and faces with the mouse:
part = solid.box (80, 40, 12); V = show (part); E = pick (V, 'edge'); # click the edges, then press Enter V.Model = fillet (V.Model, E, 3); |
Calling show (S) is the same as assigning S to the
Model of the variable’s viewer. Nothing else redraws it:
changing the variable that was shown does not, until it is shown again.
The viewer is built with the package, and needs a display to run. It runs on Linux, FreeBSD, Windows and macOS.
See also: model.Viewer, model.Viewer.pick, polymesh.Mesh.show
Source Code: solid.Shape