Compare commits

...

7 Commits

Author SHA1 Message Date
Yeicor
9e70a3998d Automatically update version to 0.10.0-rc.4 2025-07-25 23:14:16 +00:00
Yeicor
c7c4adc250 Merge remote-tracking branch 'origin/master' 2025-07-26 01:13:19 +02:00
Yeicor
393decd876 playground: fix async code usage in startup.py 2025-07-26 01:13:03 +02:00
Yeicor
111f417905 Automatically update version to 0.10.0-rc.3 2025-07-25 23:07:00 +00:00
Yeicor
7296b15a67 Merge remote-tracking branch 'origin/master' 2025-07-26 01:05:57 +02:00
Yeicor
88190b0d1e Automatically update version to 0.10.0-rc.2 2025-07-25 23:04:16 +00:00
Yeicor
f2a607bb00 playground: better readme and prerelease yacv-server 2025-07-26 01:03:14 +02:00
4 changed files with 11 additions and 9 deletions

View File

@@ -15,6 +15,8 @@ in a web browser.
- 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.
- Build123d playground! code and build your model fully inside the
browser: [demo](https://yeicor-3d.github.io/yet-another-cad-viewer/#pg_code_url=https://raw.githubusercontent.com/gumyr/build123d/refs/heads/dev/examples/toy_truck.py).
## Usage
@@ -32,4 +34,5 @@ demo [here](https://yeicor-3d.github.io/yet-another-cad-viewer/?preload=logo.glb
- [cq-studio](https://github.com/ccazabon/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](https://github.com/derhuerst/build123d-docker/pkgs/container/build123d) provides docker images for Yet Another CAD Viewer and other projects, with automatic updates.
- [build123d-docker](https://github.com/derhuerst/build123d-docker/pkgs/container/build123d) provides docker images for
Yet Another CAD Viewer and other projects, with automatic updates.

View File

@@ -8,7 +8,7 @@ await micropip.install("lib3mf")
micropip.add_mock_package("py-lib3mf", "2.4.1", modules={"py_lib3mf": 'from lib3mf import *'})
# Install the yacv_server package, which is the main server for the OCP.wasm playground; and also preinstalls build123d.
await micropip.install("yacv_server")
await micropip.install("yacv_server", pre=True)
# Preimport the yacv_server package to ensure it is available in the global scope, and mock the ocp_vscode package.
from yacv_server import *
@@ -16,7 +16,7 @@ micropip.add_mock_package("ocp-vscode", "2.8.9", modules={"ocp_vscode": 'from ya
show_object = show
# Preinstall a font to avoid issues with no font being available.
def install_font_to_ocp(font_url, font_name=None):
async def install_font_to_ocp(font_url, font_name=None):
# noinspection PyUnresolvedReferences
from pyodide.http import pyfetch
from OCP.Font import Font_FontMgr, Font_SystemFont, Font_FA_Regular
@@ -30,9 +30,8 @@ def install_font_to_ocp(font_url, font_name=None):
os.makedirs(os.path.dirname(font_path), exist_ok=True)
# Download the font using pyfetch
loop = asyncio.get_event_loop()
response = loop.run_until_complete(pyfetch(font_url))
font_data = loop.run_until_complete(response.bytes())
response = await pyfetch(font_url)
font_data = await response.bytes()
# Save it to the system-like folder
with open(font_path, "wb") as f:
@@ -47,4 +46,4 @@ def install_font_to_ocp(font_url, font_name=None):
# Make sure there is at least one font installed, so that the tests can run
install_font_to_ocp("https://raw.githubusercontent.com/xbmc/xbmc/d3a7f95f3f017b8e861d5d95cc4b33eef4286ce2/media/Fonts/arial.ttf")
await install_font_to_ocp("https://raw.githubusercontent.com/xbmc/xbmc/d3a7f95f3f017b8e861d5d95cc4b33eef4286ce2/media/Fonts/arial.ttf")

View File

@@ -1,6 +1,6 @@
{
"name": "yet-another-cad-viewer",
"version": "0.10.0-rc.1",
"version": "0.10.0-rc.4",
"description": "",
"license": "MIT",
"private": true,

View File

@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "yacv-server"
version = "0.10.0-rc.1"
version = "0.10.0-rc.4"
description = "Yet Another CAD Viewer (server)"
authors = ["Yeicor <4929005+Yeicor@users.noreply.github.com>"]
license = "MIT"