Browse the docs
betti render
Draw meshes as a picture: PNG, PDF, EPS or SVG.
Usage
betti render [flags] mesh ... outDraws meshes as a picture, ray traced on the processor: faces shaded by the light of a sky and a lamp, with shadows, their edges drawn as lines: all, the features (creases, open edges, silhouettes and a CAD model's face boundaries), or, by default, all where the faces are large enough on the picture for them to read and the features where not. Seen orthographically and whole, the edges are found by hidden-line removal and kept as lines, so that PDF, EPS and SVG hold them as vectors. Each mesh is a panel; several make a sheet, side by side or in a grid, seen by one camera so that they compare (-fit each frames each on its own). With -overlay they are drawn together in one panel, each in its own colour.
A mesh is any surface mesh, a volume mesh (its cells' faces), or, with the cad module, a CAD model (its faces' boundaries as edges). -color colours faces by what they are or what they carry, with a legend: parts, the regions or tags a file gives its faces (as CAD faces from cad mesh), a measure of quality, or a value the file holds at its vertices or faces, such as the distance verify -map writes. -cut cuts through the meshes, taking away what is on the camera's side; a volume mesh is cut through whole cells, so that its cells show.
In a script this is render(…), its flags as keywords; for coding agents, the tool render.
Examples
betti render part.stl part.png
betti render -view top -color angle even.obj angles.png
betti render -color deviation -range -0.05,0.05 deviation.vtu deviation.png
betti render -fit each -columns 6 parts/*.stl sheet.png
betti render -cut z=10 -color jacobian part.msh cells.png
betti render -width 2100 -height 1500 -dpi 600 -color angle even.obj figure.pdf
betti run part.stl even.obj fix repair + mesh remesh -size 1% + render even.pngColours (-color)
| none | one colour; in an overlay, each mesh its own (the default) |
|---|---|
| parts | each connected part its own colour |
| regions | each region its own colour: a surface's face regions, as CAD faces from cad mesh, or a volume mesh's regions |
| tags | a volume mesh's boundary faces by their tags |
| faces, bodies | a CAD model's faces, or its bodies |
| angle | each face's smallest corner angle, in degrees |
| jacobian | each face's or cell's scaled Jacobian at its worst corner, 1 at best |
| non-orthogonality | each polyhedral cell's worst non-orthogonality, in degrees |
| NAME | a value the file holds at vertices or faces, by its name, as deviation or thickness |
Formats, by the extension of out
| .eps | Encapsulated PostScript, for LaTeX with dvips: the picture as an image laid over white, titles and legend as lines |
|---|---|
| a page for a paper: the picture as a lossless image, titles and legend as lines, sharp at any size | |
| .png | pixels, with their resolution (-dpi) |
| .svg | for the web and drawing programs: the picture as an image, titles and legend as lines |
Flags
| Flag | Takes | Default | Meaning |
|---|---|---|---|
-background | text | white | white, none (clear), or a colour as #rrggbb |
-box | length or number | none | fit the camera to this region instead, as minX,minY,minZ,maxX,maxY,maxZ |
-color | text | none | what colours faces: none, parts, regions, tags, faces, bodies, angle, jacobian, non-orthogonality, or the name of a value the file holds |
-columns | integer | up to four in a row, more in a grid near square | panels in a row |
-cut | length or number | none | cut by a plane, z=10, or a point and a normal as px,py,pz,nx,ny,nz, taking away what is on the camera's side |
-dpi | number | 300 | dots an inch: the size a page gives the picture, as a PDF, EPS or SVG page's or a PNG's |
-edges | text | auto | which edges are drawn: all, the faces' own; features, where faces meet at 30° or more, open edges, silhouettes and a CAD model's face boundaries; auto, all where the faces are large enough on the picture for them to read, else the features; none |
-fit | text | all | all: one camera for every panel, so that they compare; each: each panel framed on its own |
-height | integer | 900 | each panel's height, in pixels |
-legend | switch | true | draw what the colours mean under the picture |
-line | number | 1 | the width of edges, in pixels |
-overlay | switch | off | draw all the meshes together in one panel, each in its own colour |
-perspective | number | none | view in perspective, with this vertical field of view in degrees (0: orthographic) |
-range | length or number | the values' own, either side of zero alike when they straddle it | the range of values coloured, as min,max |
-samples | integer | 16 | samples a pixel averages: more for smoother shading and edges, fewer for speed |
-titles | switch | when there are several | write each panel's name above it |
-up | direction | +z | the direction up in the picture: +z, -y, or x,y,z |
-view | length or number | iso: front, right and above | where the camera looks from: iso, front, back, left, right, top, bottom, or a direction x,y,z toward the camera |
-width | integer | 1200 | each panel's width, in pixels |
-zoom | number | 1 | magnify beyond fitting the meshes |
Output flags
| Flag | Takes | Default | Meaning |
|---|---|---|---|
-json | switch | off | print the result as JSON |
-q | switch | off | print nothing but errors |
-skip | names | none | switch off steps of the work by their names, separated by commas, as the built-in help lists them |
-v | switch | off | also show the stages of each step, and their times |
This page is generated from betti help render. Lengths are absolute, or a percentage of the part's bounding-box diagonal, as in -size 1%.