Andy Ross c14a823dc1 Update visual defaults
Somewhat more conventional visual presentation:

+ Use a neutral gray background a-la most other CAD/modelling software
  for better contrast with the geometry (which defaults to a bright
  yellow).  This is done with the "skybox-environment" image in
  model-viewer, so add a new setting value in settings.ts for this (it
  can be overriden in the URL just like other settings)

+ But using a skybox will cause that image to be used for lighting
  too, which is clearly not desired.  So fetch a nice professional
  HDRI image from Polyhaven for lighting.  This is much better (more
  directional, higher contrast) than the default light environment
  anyway.

+ The checkerboard texture isn't really a good default.  Use a 1x1
  white pixel instead, essentially presenting the model materials
  unchanged.

Also collect the default color in gltf.py out of the code and put it
next to the texture for clarity.  This should probably be wired
through to a setting at some point.

Signed-off-by: Andy Ross <andy@plausible.org>
2025-07-15 15:24:09 -07:00
2025-05-11 09:34:23 +02:00
2025-07-15 15:24:09 -07:00
2025-07-15 15:24:09 -07:00
2024-03-03 13:16:51 +01:00
2024-03-09 11:47:23 +01:00
2024-02-24 11:44:53 +01:00
2025-07-06 02:42:33 +00:00
2025-07-13 10:04:14 +00:00

Yet Another CAD Viewer

A CAD viewer capable of displaying OCP models (CadQuery/Build123d/...) in a web browser.

Features

  • Cross-platform: works on any modern web browser.
  • All GLTF 2.0 features (textures, PBR materials, animations...).
  • All model-viewer features (smooth controls, augmented reality...).
  • Load multiple models at once, load external models and even images as quads.
  • Control clipping planes and transparency of each model.
  • View and interact with topological entities: faces, edges, vertices and locations.
  • Select any entity and measure bounding box size and distances.
  • Hot reloading while editing the CAD model (using the yacv-server package).
  • Fully-featured static deployment: just upload the viewer and models to your server.

Usage

The example is a fully working project that shows how to use the viewer.

You can play with the latest demo here (or without animation).

Demo

  • cq-studio provides an alternative workflow that detects file changes instead of relying on an interactive environment like Jupyter for hot-reloading. Uses the same backend and frontend behind the scenes.
  • build123d-docker provides docker images for Yet Another CAD Viewer and other projects, with automatic updates.
Description
A CAD viewer capable of displaying OCP models (CadQuery/Build123d) in a web browser.
Readme MIT 61 MiB
Languages
Vue 43.3%
Python 28.4%
TypeScript 28.2%
HTML 0.1%