Install

Requirements

Always needed:

  • Linux. Other platforms are untested.

  • Python 3.11 or newer.

Needed only for OpenSCAD-family parts and OpenSCAD snapshots:

  • OpenSCAD, the executable. It builds the STL files of Solid2Node and OpenScadNode parts and renders the fixed-pose snapshots of machinome snapshot, which also need the openscad extra below. A project whose parts all have B-rep geometry (CadQueryNode, Build123dNode, StepNode and the sheet leaves) builds, tests and exports without it. The tutorial’s machine is one of those, so you can follow it without OpenSCAD. The starter part that machinome new writes is a Solid2Node where SolidPython is installed (machinome[solid2], machinome[all]), and a CadQueryNode where CadQuery is and SolidPython is not; with neither, machinome new refuses naming both extras.

The package itself brings trimesh. Its node types, the CAD kernels, SolidPython and the engines are extras, so a project installs only the ones its parts use.

The extras

Every package of the set beyond the framework is installed by an extra, and every page of this manual says at its top which extras it needs. A node type lives in one module, machinome.node.<name>, installed by the extra of the same name: the extra is the last component of the module’s address.

machinome[viewer]

Installs machinome-viewer, for the browser viewer: machinome develop opens it, and every export carries its page.

Needed by Inspect and operate a machine in the viewer, Embed the viewer in a page, Sphinx directive, Browser viewer, Your first machine and the tutorial.

machinome[cadquery]

Installs machinome-node-cadquery, for CadQueryNode.

Needed by Put digits and labels on a part, Your first machine and the tutorial.

machinome[build123d]

Installs machinome-node-build123d, for Build123dNode, Build123dSheetNode and the SVG artwork of markings.

Needed by Put digits and labels on a part, Cut parts from sheet and the tutorial.

machinome[step]

Installs machinome-node-step, for StepNode, StepAssembly and machinome import-step.

Needed by Reuse a vendor STEP or an STL.

machinome[molejo]

Installs machinome-node-molejo, for MolejoNode, with molejo.

Needed by Model springs, belts and cables.

machinome[openscad]

Installs machinome-node-openscad and machinome-viewer-openscad, for OpenScadNode and the OpenSCAD viewer of machinome snapshot. Outside pip: the OpenSCAD executable.

machinome[viewer-openscad]

Installs machinome-viewer-openscad, for the OpenSCAD viewer of machinome snapshot alone, a still of a model of any parts. Outside pip: the OpenSCAD executable.

machinome[solid2]

Installs machinome-node-solid2 and machinome-viewer-openscad, for Solid2Node, with the openscad extra’s package. Outside pip: the OpenSCAD executable.

machinome[jscad]

Installs machinome-node-jscad, for JScadNode, compared on its mesh by the mesh engine. Outside pip: the jscad command from npm.

machinome[stl]

Installs machinome-node-stl, for StlNode, compared on its mesh by the mesh engine.

Needed by Reuse a vendor STEP or an STL.

machinome[freecad]

Installs machinome-node-freecad, for FreeCADAssemblyNode and FreeCADJoint. Outside pip: FreeCAD 1.1.4, extracted, its root named by MACHINOME_FREECAD_ROOT.

Needed by Simulate a native FreeCAD assembly.

machinome[brep]

Installs machinome-engine-brep, for the B-rep engine, which every node type over it installs too.

machinome[mesh]

Installs machinome-engine-mesh, for the mesh engine, for every comparison on meshes.

Needed by Run tests fast.

machinome[all]

Installs the extras cadquery, build123d, step, molejo, openscad, solid2, jscad, stl, freecad, brep and mesh, for every node type and both engines. Outside pip: the OpenSCAD executable; the jscad command from npm; FreeCAD 1.1.4, extracted, its root named by MACHINOME_FREECAD_ROOT.

machinome[web-snapshot]

Installs machinome-viewer with its snapshot extra, for the viewer with its headless browser driver, for transparent photographs. Outside pip: Chromium for Playwright, playwright install chromium.

Needed by Share an export and take a still and the tutorial.

machinome[mechanics]

Installs machinome-mechanics, for the mechanics helpers, machinome.mechanics.

Needed by Use a mechanism formula in a machine and Mechanics helpers.

machinome[skills]

Installs machinome-skills, for the machinome skills and the command machinome skills.

Needed by Give your assistant the machinome skills.

machinome[movie]

Installs machinome-movie, for the films of a machine, machinome.movie and the command machinome movie, with the viewer they draw with. Outside pip: Node 22 or newer, then machinome movie setup; the Chromium that machinome movie setup names; FFmpeg with ffprobe.

Needed by Declare a movie, Draw a movie’s stage, Film a movie of your machine and Movies.

machinome[studio]

Installs machinome-studio, for Machinome Studio and the command machinome studio. Outside pip: Git; the OpenSCAD executable; the OpenSpec CLI; a logged-in agent backend; Chromium for Playwright, playwright install chromium.

Needed by Open a project in the studio, Choose and steer the studio’s agents, Work in a project’s workspace and Studio.

machinome[jscad] and machinome[stl] install their node types’ packages and no kernel; a bare install carries no node type. JScadNode and StlNode parts are compared on their meshes, by the mesh engine, so a project that tests them installs machinome[mesh]. Without its extra, importing a module refuses with the line that installs it, for example:

ModuleNotFoundError: the cadquery node type (CadQueryNode) needs
machinome.node.cadquery, which is not installed; install it with
'pip install "machinome[cadquery]"'

The same refusal answers from machinome.node.cadquery import CadQueryNode, the import every CadQueryNode part makes (each node class is imported from its module; the root of machinome.node exports nothing), and machinome import-step. A project that imports cadquery or build123d itself, in its own modules, needs the extra of that name, and one that imports manifold3d or calls trimesh.boolean needs machinome[mesh].

Without the mesh engine, each path that needs it refuses at its point of use naming pip install "machinome[mesh]", and machinome test on the mesh engine refuses at its start, before it builds anything. A project whose every compared part has B-rep geometry needs it only for assertAssemblySupported and for runs on the mesh engine.

Packages and licences

The framework is the package machinome, and every package its extras install, listed above, is licensed GPL-2.0-or-later or CERN-OHL-S-2.0-or-later, at the recipient’s choice. The framework reaches the browser viewer through its seam of viewers as the viewer named web, in its own process. The viewer extra installs it. Without it the framework builds, tests, exports with --no-widget, watches with machinome develop --no-web and takes OpenSCAD snapshots with the openscad or viewer-openscad extra; with it, machinome develop opens the interactive viewer (Inspect and operate a machine in the viewer), and every export carries the viewer page. A host that only serves or captures published documents installs machinome-viewer alone, which brings the framework it is numbered with.

Install

Create a virtual environment for your projects and install the framework with the viewer, CadQuery and build123d, which the tutorial models with (build123d draws the digits on its drums):

$ python -m venv machines
$ source machines/bin/activate
$ python -m pip install "machinome[viewer,cadquery,build123d]"

Name the extras your parts need instead, all for every kernel, or, for a project of STL parts, stl with mesh:

$ python -m pip install "machinome[viewer,all]"
$ python -m pip install "machinome[stl,mesh]"

If you will author OpenSCAD or SolidPython parts, install OpenSCAD too. On Debian-based systems:

$ sudo apt-get install openscad

Check the installation

$ machinome viewer

prints one line naming the installed viewer bundle, its apiVersion and the documentVersions it reads. This manual matches viewer 0.9.0, API 29, reading document versions 1 to 13. Without the viewer the command names the extra to install and exits 1.

Upgrading

Coming from Machinome 0.8? Read Upgrading from Machinome 0.8 to 0.9 first: 0.9 releases every package of the set together and moves the mechanics helpers and the viewer under machinome, with no aliases. Coming from 0.7, the same page lists the moves of 0.8: the kernels in extras, every name imported from its module and the engines’ flags renamed. Coming from solid-node 0.6 or earlier, it maps the names renamed for 0.7; a 0.5 environment must be recreated rather than upgraded in place.

Next: Your first machine.