solid.Shape

Methods

Method Reference: 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, the middle one to pan, and turn the wheel to zoom; F fits the part to the window and 0, 1, 2 and 3 turn it to the isometric, front, top and right views. 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.Shape 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.Shape = fillet (V.Shape, E, 3);

Calling show (S) is the same as assigning S to the Shape 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 when Open CASCADE and X11 are found, and needs a display to run. It runs on Linux.

See also: model.Viewer, model.Viewer.pick, polymesh.Mesh.show

Source Code: solid.Shape