mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 14:14:13 +01:00
c14a823dc148b2ca6cbafcfee1065b977536998a
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>
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-serverpackage). - 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).
Related projects
- 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.
Languages
Vue
43.3%
Python
28.4%
TypeScript
28.2%
HTML
0.1%
