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
Solid2NodeandOpenScadNodeparts and renders the fixed-pose snapshots ofmachinome snapshot, which also need theopenscadextra below. A project whose parts all have B-rep geometry (CadQueryNode,Build123dNode,StepNodeand 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 thatmachinome newwrites is aSolid2Nodewhere SolidPython is installed (machinome[solid2],machinome[all]), and aCadQueryNodewhere CadQuery is and SolidPython is not; with neither,machinome newrefuses 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 developopens 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, forCadQueryNode.Needed by Put digits and labels on a part, Your first machine and the tutorial.
machinome[build123d]Installs
machinome-node-build123d, forBuild123dNode,Build123dSheetNodeand 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, forStepNode,StepAssemblyandmachinome import-step.Needed by Reuse a vendor STEP or an STL.
machinome[molejo]Installs
machinome-node-molejo, forMolejoNode, with molejo.Needed by Model springs, belts and cables.
machinome[openscad]Installs
machinome-node-openscadandmachinome-viewer-openscad, forOpenScadNodeand the OpenSCAD viewer ofmachinome snapshot. Outside pip: the OpenSCAD executable.machinome[viewer-openscad]Installs
machinome-viewer-openscad, for the OpenSCAD viewer ofmachinome snapshotalone, a still of a model of any parts. Outside pip: the OpenSCAD executable.machinome[solid2]Installs
machinome-node-solid2andmachinome-viewer-openscad, forSolid2Node, with theopenscadextra’s package. Outside pip: the OpenSCAD executable.machinome[jscad]Installs
machinome-node-jscad, forJScadNode, compared on its mesh by the mesh engine. Outside pip: thejscadcommand from npm.machinome[stl]Installs
machinome-node-stl, forStlNode, compared on its mesh by the mesh engine.Needed by Reuse a vendor STEP or an STL.
machinome[freecad]Installs
machinome-node-freecad, forFreeCADAssemblyNodeandFreeCADJoint. Outside pip: FreeCAD 1.1.4, extracted, its root named byMACHINOME_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,brepandmesh, for every node type and both engines. Outside pip: the OpenSCAD executable; thejscadcommand from npm; FreeCAD 1.1.4, extracted, its root named byMACHINOME_FREECAD_ROOT.machinome[web-snapshot]Installs
machinome-viewerwith itssnapshotextra, 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 commandmachinome skills.Needed by Give your assistant the machinome skills.
machinome[movie]Installs
machinome-movie, for the films of a machine,machinome.movieand the commandmachinome movie, with the viewer they draw with. Outside pip: Node 22 or newer, thenmachinome movie setup; the Chromium thatmachinome movie setupnames; 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 commandmachinome 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.