mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
add support for programmatically and efficiently removing objects, better API and more CI automation
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Optional: enable logging to see what's happening
|
||||
import logging
|
||||
import os
|
||||
|
||||
from build123d import * # Also works with cadquery objects!
|
||||
|
||||
# Optional: enable logging to see what's happening
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
from yacv_server import show_object, export_all # Check out all show_* methods for more features!
|
||||
from yacv_server import show, export_all # Check out other exported methods for more features!
|
||||
|
||||
# %%
|
||||
|
||||
@@ -15,11 +15,11 @@ with BuildPart() as obj:
|
||||
Box(10, 10, 5)
|
||||
Cylinder(4, 5, mode=Mode.SUBTRACT)
|
||||
|
||||
# Show it in the frontend
|
||||
show_object(obj, 'object')
|
||||
# Show it in the frontend with hot-reloading
|
||||
show(obj)
|
||||
|
||||
# %%
|
||||
|
||||
# If running on CI, export the object to a .glb file compatible with the frontend
|
||||
# If running on CI, export the objects to .glb files for a static deployment
|
||||
if 'CI' in os.environ:
|
||||
export_all('export')
|
||||
|
||||
Reference in New Issue
Block a user