cad

command
v1.16.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: BSD-3-Clause Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command cad shows the 3D work of Glutter 1.10 together (SPEC §27): a part in a viewport3d.View that the mouse and the touch orbit, pan and zoom, with a grid, the axes and the view cube; the four display modes (shaded, shaded with edges, wireframe and hidden line); a section plane that a slider moves, with its cap and the outline of the cut; a pick that shows the item, the triangle, the point of the world and the normal in a side panel; and a distance measured between two picks, drawn as a dimension line with an Anchored label. The part is made by code (a bracket of four pieces); "Sample" loads a gear from an STL file that is built into the program, and "Open" asks for an STL or OBJ file with the file dialog of package desktop (not on the web, where a page has no file dialog yet: there the sample is what opens).

Run it with: go run ./examples/cad

It needs a GPU renderer (Vulkan, Direct3D 12 or WebGPU); with another one the view shows its fallback, a line of text.

On Windows: go run ./cmd/glutter-windows run ./examples/cad. On the web: go run ./cmd/glutter-web serve ./examples/cad. On Android: go run ./cmd/glutter-android run ./examples/cad.

Environment: GLUTTER_BACKEND=x11|wayland (Linux) or win32 (Windows), GLUTTER_RENDERER=vulkan|d3d12|webgpu, GLUTTER_SCREENSHOT=<file.png>, GLUTTER_SCREENSHOT_AFTER=<duration>. In debug builds GLUTTER_DEV_CAD=proof starts with the bracket cut by a plane through its middle, drawn with its edges, and the top of a post picked (the state of the proof pictures).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL