Engineering 3D Viewer

unlisted

by Abdulrahman S. Al-Batati

View STL, OBJ, PLY, 3MF, glTF and DAE meshes, PCL point clouds, URDF and xacro robots with their joints, and STEP and IGES CAD parts, in a tab or in a note.

Updated 22d agoMIT
View on GitHub

Engineering 3D Viewer

Parts, scans and robots inside Obsidian: view a 3D file in a tab, embed it in a note like an image, or draw it in a ```3d block with its own options. Meshes from CAD and 3D printing, point clouds from PCL, URDF and xacro robots with a slider for every joint, and STEP, IGES and BREP parts through OpenCascade, whose engine the plugin fetches on a click the first time a part needs it.

Four models in light theme: a STEP plate through OpenCascade, a URDF arm with its joint sliders, a PCD scan in its own colours, and the same plate as STL

What it opens

KindExtensionsRead as
Meshes.stl .obj .ply .3mf .glb .gltf .daethree.js's own loaders. STL and 3MF in millimetres with Z up, as 3D printing writes them; OBJ, glTF and Collada in metres with Y up. A file's own colours are kept.
Point clouds.pcd .xyzPCL's PCD (ASCII, binary and compressed binary) and plain XYZ, with or without colours.
Robots.urdf .xacroThe links, the joints and their limits. Meshes named package://<pkg>/… or by a relative path are found for you (see Robots).
CAD parts.step .stp .iges .igs .brepOpenCascade, compiled to WebAssembly by occt-import-js: the exact geometry, tessellated in the viewer, with the colours the file gives its faces.

Sizes are shown in the file's unit (millimetres for CAD and STL, metres otherwise) unless a setting or the block names another; Z points up for CAD, printing and ROS files and Y for glTF and its kin, unless you say otherwise.

Three ways to see a model

Open the file. A click on bracket.step in the file explorer opens it in a tab of its own.

Embed it, the way you embed an image: ![[bracket.step]]. Options go after #, joined by &:

![[arm.urdf#height=500&joints=shoulder=30,elbow=-45]]

Draw it in a block, with as many options as you like, one per line:

```3d
file: robots/arm_description/urdf/arm.urdf
height: 520
joints: shoulder=35, elbow=40, wrist=-30
collision: off
```

The block may also be called ```engineering-3d, the same in every way. Use that name when another plugin, such as 3D Codeblocks, also draws ```3d blocks: Obsidian gives a block's name to one plugin only, and loads plugins in the order they were turned on. When the other plugin loads first, this one leaves 3d to it and says so in its settings; when this one loads first, it takes 3d. Turn off Draw 3d blocks in the settings to leave 3d to the other plugin either way, from the next time Obsidian starts.

The file may be a vault path, a [[wikilink]], a name Obsidian can resolve, or on a computer a path outside the vault: C:\Parts\bracket.step or file:///home/me/scans/room.pcd. The command Open a 3D file from this computer opens one in a tab without copying it into the vault.

OptionValues
filea path, a link or a nameThe first line may be the path alone.
height120 to 2000In pixels.
backgroundtheme, transparent, #rrggbb or a colour name
upy or zThe axis that points up.
unitsmm, m or inThe unit sizes are shown in.
grid, axes, edges, wireframe, collisionon or off
color#rrggbb or a colour nameFor a model whose file gives it no colour.
points1 to 10Point size, in pixels.
color byauto, rgb, height or solidHow a point cloud is coloured.
jointsname=degrees, …A robot's pose. Prismatic joints take metres.

An option it cannot read is named under the model, and the rest still apply.

In the viewer

Drag to turn the model, drag with the right button to move it, and scroll to zoom; on a touch screen, one finger turns and two fingers zoom and move. The buttons in the corner fit the view, show the grid and the axes, draw the edges or the wireframe, change a cloud's point size and colouring, and open a robot's joints and frames. The line under the model says what it is: the format, its joints, points or triangles, and its size.

A model draws only once it is on screen, at most six at a time (a setting), and gives its graphics context back when its note closes, so a long note full of parts stays light.

Robots

A URDF's meshes are looked for in this order: beside the URDF and in the folders above it (a ROS package keeps urdf/ and meshes/ side by side), in the package folders the settings name, and then anywhere in the vault, the folder nearest to the URDF first. A xacro file is expanded before it is drawn: its properties, arguments with their defaults, macros, conditions, includes and $(find <pkg>).

Every movable joint gets a slider within its limits; a continuous joint turns all the way round. Link frames puts each link's axes on the robot (X red, Y green, Z blue), drawn over the geometry so a frame inside a link still shows. A robot whose links have collision shapes gets a Collision geometry button, which shows what the robot collides with instead of what it looks like. The shapes are read with the robot, and a missing collision mesh is named under it like any other.

CAD parts and the engine file

STEP, IGES and BREP need OpenCascade, which comes as a separate file, occt-import-js.wasm (about 7.6 MB), beside the plugin's main.js. Obsidian's installer downloads only main.js, manifest.json and styles.css, so the first CAD part you view without it asks, once for the vault, whether to download it. Every CAD part without it shows a Download the CAD engine button, and so does the settings tab. The download is one request, to the file of the same name in this version's own release, and the file is kept only when its SHA-256 is the one this version pins (src/engine.ts); otherwise nothing is written and the part says why. You may instead put the file from the release in <your vault>/.obsidian/plugins/engineering-3d-viewer/ yourself: a copy there is used when its SHA-256 is that one too, and another version's file or a broken copy offers the download again. It is read once, when the first CAD part opens, and kept while Obsidian runs. Everything else works without it.

OpenCascade reads a part on Obsidian's own thread, and Obsidian does not respond meanwhile: about 1.3 to 1.8 s per MB on a desktop computer, longer on a phone. So a part larger than 5 MB (a setting) first says its size and the pause to expect, and is read on a click; a part you opened is not asked about again until Obsidian restarts. SolidWorks, Inventor and Fusion keep their own formats, which OpenCascade does not read: export a STEP file.

Live figures

A ```figure block shows a self-contained HTML page, such as the interactive figures the Anatomy skill builds, live inside a note:

```figure
id: shake-table
height: 660
```

The id names a page in the Figures folder of the settings, laid out as <id>/<id>.html, with <id>-dark.html taken in a dark theme when it is there to take (theme: light or theme: dark fixes one). file: <path> names a page directly. The page is read once and shown in a frame whose sandbox allows its scripts and nothing else, so it reaches nothing of Obsidian's or the vault's, and it needs no server: it works offline, and on a phone when the folder is in the vault. A folder on this computer works on a computer only.

Settings

SettingDefault
Height420Of an embed or a block, in pixels.
BackgroundthemeThe theme's own, transparent, or a colour.
Grid, Axes, Edgeson, off, offWhat is drawn with every model.
Up axisAutomaticEach format's own, or always Y, or always Z.
Sizes shown inAutomaticThe file's unit, or millimetres, metres or inches.
Model colourgreyFor a model whose file gives it no colour.
Point size, Colour points by2, AutomaticFor point clouds.
Package foldersnoneFolders that hold ROS packages, one per line: vault paths, or paths on this computer.
Figures foldernoneWhere a figure block's id finds its page: a vault folder, or one on this computer.
Models drawn at once6The others wait until they are scrolled to.
Ask before reading parts over5 MBA larger STEP, IGES or BREP part is read on a click. 0 never asks.
CAD engineWhether OpenCascade is installed and is the file this version pins, with a button to download it when not.
Draw 3d blockson```3d blocks as well as ```engineering-3d. Off leaves 3d to another plugin, from the next start.

A file type or a block name that another plugin already has when this one loads is left to that plugin; the settings tab lists any such.

What it reads, and network use

It reads only the files you show it: the vault's, and on a computer the files outside the vault you name in a block, in the command, or as package or figures folders. It writes two files of its own in its plugin folder: its settings, and the CAD engine when you download it.

It makes one network request, and only when you click to download the CAD engine: to https://github.com/asmbatati/engineering-3d-viewer/releases/download/<this version>/occt-import-js.wasm. GitHub answers it from its own file store. What arrives is kept only when its SHA-256 matches the one this version pins. It sends nothing about you or your vault, and asks for nothing else.

Known limits

  • A large CAD part holds Obsidian still while it is read: a 16 MB assembly took 30 s on a desktop computer and a 30 MB one 50 s, using about 1.4 GB of memory. A phone is slower, and may run out of memory on parts of that size. The size check above asks first.
  • No measuring. The info line gives a model's overall size; there is no tool to measure a distance on it.
  • Robots in URDF and xacro only: MuJoCo's MJCF and SDF are not read.
  • A file outside the vault opens only on a computer, and only from a path you give it.
  • It needs WebGL. Where the device has none, the model's info line still shows, with a note that it cannot draw.

Works with

  • SolidWorks' URDF exporter: its packages are named after the assembly, spaces and all, and are found.
  • ROS and ROS 2 description packages (urdf/ and meshes/ side by side), and xacro with $(find <pkg>).
  • 3D Codeblocks and any other plugin with a ```3d block: write ```engineering-3d for this one, and turn off Draw 3d blocks so that the other plugin keeps 3d.
  • The Anatomy skill's figures, in a ```figure block.

Installing

From Settings → Community plugins, once it is listed there; the first CAD part then offers to download the engine. Until then, download main.js, manifest.json and styles.css from the latest release into <your vault>/.obsidian/plugins/engineering-3d-viewer/, then turn it on under Settings → Community plugins. It needs Obsidian 1.13 or later, on a computer, a phone or a tablet. Files outside the vault open only on a computer.

Each release's main.js, styles.css and occt-import-js.wasm are built by the repository's own workflow, which attests where they came from: gh attestation verify main.js --repo asmbatati/engineering-3d-viewer checks a copy.

Developing

npm ci
npm test          # the formats, the options, the parsers (OpenCascade included), the engine's pin and the plugin, in Node
npm run lint      # eslint with eslint-plugin-obsidianmd
npm run build     # type-check, bundle main.js and copy the engine file beside it
npm run samples   # rewrite samples/: a plate as STEP and STL, a scan as PCD and XYZ, an arm as URDF and xacro
node docs/demo/build.mjs --shots   # the demo page and the two screenshots, with headless Edge or Chrome

The samples are written by scripts/, the STEP plate by a small writer of its own, so the repository holds no file from elsewhere.

Third-party code

The viewer is built on three.js (MIT), urdf-loader (Apache 2.0), xacro-parser (MIT) and occt-import-js, which carries Open CASCADE Technology (LGPL 2.1). All of them are bundled into main.js except the engine's WebAssembly, which stays a file of its own and may be replaced by another build of the same version. Every package in the bundle, with its licence text, is in THIRD-PARTY-NOTICES.md, which npm run notices writes and a test keeps current.

License

MIT © 2026 Abdulrahman S. Al-Batati, for this plugin's own code.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.