Compare commits

...

12 Commits

Author SHA1 Message Date
Yeicor
22ea0617e2 Automatically update version to 0.9.0 2024-10-11 18:20:00 +00:00
Yeicor
09c0994a34 Also color edges and vertices, add examples and minor improvements 2024-10-11 20:18:49 +02:00
Chaser Huang
0939e25da2 fix: typo 2024-10-11 20:18:49 +02:00
Chaser Huang
712e0a06e6 support bd cad objects with color tagged 2024-10-11 20:18:49 +02:00
dependabot[bot]
e73f745800 Bump @gltf-transform/functions from 4.0.8 to 4.0.10 (#183)
Bumps [@gltf-transform/functions](https://github.com/donmccurdy/glTF-Transform) from 4.0.8 to 4.0.10.
- [Changelog](https://github.com/donmccurdy/glTF-Transform/blob/main/CHANGELOG.md)
- [Commits](https://github.com/donmccurdy/glTF-Transform/compare/v4.0.8...v4.0.10)

---
updated-dependencies:
- dependency-name: "@gltf-transform/functions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-05 09:41:37 +00:00
dependabot[bot]
773ea797a1 Bump three-mesh-bvh from 0.8.0 to 0.8.2 (#182)
Bumps [three-mesh-bvh](https://github.com/gkjohnson/three-mesh-bvh) from 0.8.0 to 0.8.2.
- [Release notes](https://github.com/gkjohnson/three-mesh-bvh/releases)
- [Changelog](https://github.com/gkjohnson/three-mesh-bvh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gkjohnson/three-mesh-bvh/compare/v0.8.0...v0.8.2)

---
updated-dependencies:
- dependency-name: three-mesh-bvh
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-05 09:39:54 +00:00
dependabot[bot]
aae20aeedf Bump @gltf-transform/extensions from 4.0.8 to 4.0.10 (#180)
Bumps [@gltf-transform/extensions](https://github.com/donmccurdy/glTF-Transform) from 4.0.8 to 4.0.10.
- [Changelog](https://github.com/donmccurdy/glTF-Transform/blob/main/CHANGELOG.md)
- [Commits](https://github.com/donmccurdy/glTF-Transform/compare/v4.0.8...v4.0.10)

---
updated-dependencies:
- dependency-name: "@gltf-transform/extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-05 09:39:43 +00:00
dependabot[bot]
a3004e59fb Bump vue from 3.5.10 to 3.5.11 (#179)
Bumps [vue](https://github.com/vuejs/core) from 3.5.10 to 3.5.11.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.5.10...v3.5.11)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-05 09:39:30 +00:00
dependabot[bot]
5e76193f43 Bump vite from 5.4.7 to 5.4.8 (#178)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.7 to 5.4.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-28 09:30:38 +00:00
dependabot[bot]
50a2627b55 Bump vue from 3.5.7 to 3.5.10 (#177)
Bumps [vue](https://github.com/vuejs/core) from 3.5.7 to 3.5.10.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.5.7...v3.5.10)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-28 09:30:26 +00:00
dependabot[bot]
cbddacb7b8 Bump terser from 5.33.0 to 5.34.1 (#176)
Bumps [terser](https://github.com/terser/terser) from 5.33.0 to 5.34.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.33.0...v5.34.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-28 09:30:16 +00:00
dependabot[bot]
887e71b7b2 Bump @types/node from 22.5.5 to 22.7.4 (#175)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.5 to 22.7.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-28 09:30:03 +00:00
9 changed files with 194 additions and 150 deletions

View File

@@ -3,6 +3,7 @@ import logging
import os import os
from build123d import * # Also works with cadquery objects! from build123d import * # Also works with cadquery objects!
from build123d import Compound
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
@@ -15,9 +16,14 @@ with BuildPart() as example:
Box(10, 10, 5) Box(10, 10, 5)
Cylinder(4, 5, mode=Mode.SUBTRACT) Cylinder(4, 5, mode=Mode.SUBTRACT)
# Show it in the frontend with hot-reloading # Custom colors (optional)
show(example) example.color = (0.1, 0.3, 0.1, 1) # RGBA
to_highlight = example.edges().group_by(Axis.Z)[-1]
example_hl = Compound(to_highlight).translate((0, 0, 1e-3)) # To avoid z-fighting
example_hl.color = (1, 1, .0, 1)
# Show it in the frontend with hot-reloading
show(example, example_hl)
# %% # %%

View File

@@ -1,6 +1,6 @@
{ {
"name": "yet-another-cad-viewer", "name": "yet-another-cad-viewer",
"version": "0.8.11", "version": "0.9.0",
"description": "", "description": "",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
@@ -16,21 +16,21 @@
}, },
"dependencies": { "dependencies": {
"@gltf-transform/core": "^4.0.4", "@gltf-transform/core": "^4.0.4",
"@gltf-transform/extensions": "^4.0.8", "@gltf-transform/extensions": "^4.0.10",
"@gltf-transform/functions": "^4.0.8", "@gltf-transform/functions": "^4.0.10",
"@google/model-viewer": "^3.5.0", "@google/model-viewer": "^3.5.0",
"@jamescoyle/vue-icon": "^0.1.2", "@jamescoyle/vue-icon": "^0.1.2",
"@mdi/js": "^7.4.47", "@mdi/js": "^7.4.47",
"@mdi/svg": "^7.4.47", "@mdi/svg": "^7.4.47",
"three": "^0.163.0", "three": "^0.163.0",
"three-mesh-bvh": "^0.8.0", "three-mesh-bvh": "^0.8.2",
"three-orientation-gizmo": "https://github.com/jrj2211/three-orientation-gizmo", "three-orientation-gizmo": "https://github.com/jrj2211/three-orientation-gizmo",
"vue": "^3.5.7", "vue": "^3.5.11",
"vuetify": "^3.7.2" "vuetify": "^3.7.2"
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/node20": "^20.1.4", "@tsconfig/node20": "^20.1.4",
"@types/node": "^22.5.5", "@types/node": "^22.7.4",
"@types/three": "^0.163.0", "@types/three": "^0.163.0",
"@vitejs/plugin-vue": "^5.1.4", "@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1", "@vitejs/plugin-vue-jsx": "^4.0.1",
@@ -39,9 +39,9 @@
"commander": "^12.0.0", "commander": "^12.0.0",
"generate-license-file": "^3.5.1", "generate-license-file": "^3.5.1",
"npm-run-all2": "^6.2.3", "npm-run-all2": "^6.2.3",
"terser": "^5.33.0", "terser": "^5.34.1",
"typescript": "~5.6.2", "typescript": "~5.6.2",
"vite": "^5.4.7", "vite": "^5.4.8",
"vue-tsc": "^2.1.6" "vue-tsc": "^2.1.6"
} }
} }

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "yacv-server" name = "yacv-server"
version = "0.8.11" version = "0.9.0"
description = "Yet Another CAD Viewer (server)" description = "Yet Another CAD Viewer (server)"
authors = ["Yeicor <4929005+Yeicor@users.noreply.github.com>"] authors = ["Yeicor <4929005+Yeicor@users.noreply.github.com>"]
license = "MIT" license = "MIT"

View File

@@ -10,12 +10,29 @@ from OCP.TopExp import TopExp
from OCP.TopLoc import TopLoc_Location from OCP.TopLoc import TopLoc_Location
from OCP.TopTools import TopTools_IndexedMapOfShape from OCP.TopTools import TopTools_IndexedMapOfShape
from OCP.TopoDS import TopoDS_Shape from OCP.TopoDS import TopoDS_Shape
from build123d import Compound, Shape from build123d import Compound, Shape, Color
from yacv_server.gltf import GLTFMgr from yacv_server.gltf import GLTFMgr
CADCoreLike = Union[TopoDS_Shape, TopLoc_Location] # Faces, Edges, Vertices and Locations for now CADCoreLike = Union[TopoDS_Shape, TopLoc_Location] # Faces, Edges, Vertices and Locations for now
CADLike = Union[CADCoreLike, any] # build123d and cadquery types CADLike = Union[CADCoreLike, any] # build123d and cadquery types
ColorTuple = Tuple[float, float, float, float]
def get_color(obj: CADLike) -> Optional[ColorTuple]:
"""Get color from a CAD Object"""
if 'color' in dir(obj):
if isinstance(obj.color, tuple):
c = None
if len(obj.color) == 3:
c = obj.color + (1,)
elif len(obj.color) == 4:
c = obj.color
# noinspection PyTypeChecker
return [min(max(float(x), 0), 1) for x in c]
if isinstance(obj.color, Color):
return obj.color.to_tuple()
return None
def get_shape(obj: CADLike, error: bool = True) -> Optional[CADCoreLike]: def get_shape(obj: CADLike, error: bool = True) -> Optional[CADCoreLike]:
@@ -164,7 +181,7 @@ def image_to_gltf(source: str | bytes, center: any, width: Optional[float] = Non
return b''.join(mgr.build().save_to_bytes()), name return b''.join(mgr.build().save_to_bytes()), name
def _hashcode(obj: Union[bytes, CADCoreLike], **extras) -> str: def _hashcode(obj: Union[bytes, CADCoreLike], color: Optional[ColorTuple], **extras) -> str:
"""Utility to compute the STABLE hash code of a shape""" """Utility to compute the STABLE hash code of a shape"""
# NOTE: obj.HashCode(MAX_HASH_CODE) is not stable across different runs of the same program # NOTE: obj.HashCode(MAX_HASH_CODE) is not stable across different runs of the same program
# This is best-effort and not guaranteed to be unique # This is best-effort and not guaranteed to be unique
@@ -172,6 +189,8 @@ def _hashcode(obj: Union[bytes, CADCoreLike], **extras) -> str:
for k, v in extras.items(): for k, v in extras.items():
hasher.update(str(k).encode()) hasher.update(str(k).encode())
hasher.update(str(v).encode()) hasher.update(str(v).encode())
if color:
hasher.update(str(color).encode())
if isinstance(obj, bytes): if isinstance(obj, bytes):
hasher.update(obj) hasher.update(obj)
elif isinstance(obj, TopLoc_Location): elif isinstance(obj, TopLoc_Location):

View File

@@ -8,6 +8,12 @@ _checkerboard_image_bytes = base64.decodebytes(
b'iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAF0lEQVQI12N49OjR////Gf' b'iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAF0lEQVQI12N49OjR////Gf'
b'/////48WMATwULS8tcyj8AAAAASUVORK5CYII=') b'/////48WMATwULS8tcyj8AAAAASUVORK5CYII=')
def get_version() -> str:
try:
return importlib.metadata.version("yacv_server")
except importlib.metadata.PackageNotFoundError:
return "unknown"
class GLTFMgr: class GLTFMgr:
"""A utility class to build our GLTF2 objects easily and incrementally""" """A utility class to build our GLTF2 objects easily and incrementally"""
@@ -32,7 +38,7 @@ class GLTFMgr:
def __init__(self, image: Optional[Tuple[bytes, str]] = (_checkerboard_image_bytes, 'image/png')): def __init__(self, image: Optional[Tuple[bytes, str]] = (_checkerboard_image_bytes, 'image/png')):
self.gltf = GLTF2( self.gltf = GLTF2(
asset=Asset(generator=f"yacv_server@{importlib.metadata.version('yacv_server')}"), asset=Asset(generator=f"yacv_server@{get_version()}"),
scene=0, scene=0,
scenes=[Scene(nodes=[0])], scenes=[Scene(nodes=[0])],
nodes=[Node(mesh=0)], # TODO: Server-side detection of shallow copies --> nodes nodes=[Node(mesh=0)], # TODO: Server-side detection of shallow copies --> nodes
@@ -71,9 +77,9 @@ class GLTFMgr:
return [p for p in self.gltf.meshes[0].primitives if p.mode == POINTS][0] return [p for p in self.gltf.meshes[0].primitives if p.mode == POINTS][0]
def add_face(self, vertices_raw: List[Vector], indices_raw: List[Tuple[int, int, int]], def add_face(self, vertices_raw: List[Vector], indices_raw: List[Tuple[int, int, int]],
tex_coord_raw: List[Tuple[float, float]], tex_coord_raw: List[Tuple[float, float]], color: Optional[Tuple[float, float, float, float]] = None):
color: Tuple[float, float, float, float] = (1.0, 0.75, 0.0, 1.0)):
"""Add a face to the GLTF mesh""" """Add a face to the GLTF mesh"""
if color is None: color = (1.0, 0.75, 0.0, 1.0)
# assert len(vertices_raw) == len(tex_coord_raw), f"Vertices and texture coordinates have different lengths" # assert len(vertices_raw) == len(tex_coord_raw), f"Vertices and texture coordinates have different lengths"
# assert min([i for t in indices_raw for i in t]) == 0, f"Face indices start at {min(indices_raw)}" # assert min([i for t in indices_raw for i in t]) == 0, f"Face indices start at {min(indices_raw)}"
# assert max([e for t in indices_raw for e in t]) < len(vertices_raw), f"Indices have non-existing vertices" # assert max([e for t in indices_raw for e in t]) < len(vertices_raw), f"Indices have non-existing vertices"
@@ -85,8 +91,9 @@ class GLTFMgr:
self._faces_primitive.extras["face_triangles_end"].append(len(self.face_indices)) self._faces_primitive.extras["face_triangles_end"].append(len(self.face_indices))
def add_edge(self, vertices_raw: List[Tuple[Tuple[float, float, float], Tuple[float, float, float]]], def add_edge(self, vertices_raw: List[Tuple[Tuple[float, float, float], Tuple[float, float, float]]],
color: Tuple[float, float, float, float] = (0.1, 0.1, 1.0, 1.0)): color: Optional[Tuple[float, float, float, float]] = None):
"""Add an edge to the GLTF mesh""" """Add an edge to the GLTF mesh"""
if color is None: color = (0.1, 0.1, 1.0, 1.0)
vertices_flat = [v for t in vertices_raw for v in t] # Line from 0 to 1, 2 to 3, 4 to 5, etc. vertices_flat = [v for t in vertices_raw for v in t] # Line from 0 to 1, 2 to 3, 4 to 5, etc.
base_index = len(self.edge_positions) // 3 base_index = len(self.edge_positions) // 3
self.edge_indices.extend([base_index + i for i in range(len(vertices_flat))]) self.edge_indices.extend([base_index + i for i in range(len(vertices_flat))])
@@ -94,9 +101,9 @@ class GLTFMgr:
self.edge_colors.extend([col for _ in range(len(vertices_flat)) for col in color]) self.edge_colors.extend([col for _ in range(len(vertices_flat)) for col in color])
self._edges_primitive.extras["edge_points_end"].append(len(self.edge_indices)) self._edges_primitive.extras["edge_points_end"].append(len(self.edge_indices))
def add_vertex(self, vertex: Tuple[float, float, float], def add_vertex(self, vertex: Tuple[float, float, float], color: Optional[Tuple[float, float, float, float]] = None):
color: Tuple[float, float, float, float] = (0.1, 0.1, 0.1, 1.0)):
"""Add a vertex to the GLTF mesh""" """Add a vertex to the GLTF mesh"""
if color is None: color = (0.1, 0.1, 0.1, 1.0)
base_index = len(self.vertex_positions) // 3 base_index = len(self.vertex_positions) // 3
self.vertex_indices.append(base_index) self.vertex_indices.append(base_index)
self.vertex_positions.extend(vertex) self.vertex_positions.extend(vertex)

View File

@@ -16,18 +16,25 @@ def build_logo(text: bool = True) -> Dict[str, Union[Part, Location, str]]:
text_at_plane = Plane.YZ text_at_plane = Plane.YZ
text_at_plane.origin = faces().group_by(Axis.X)[-1].face().center() text_at_plane.origin = faces().group_by(Axis.X)[-1].face().center()
with BuildSketch(text_at_plane.location): with BuildSketch(text_at_plane.location):
Text('Yet Another\nCAD Viewer', 7, font_path='/usr/share/fonts/TTF/OpenSans-Regular.ttf') Text('Yet Another\nCAD Viewer', 6, font_path='/usr/share/fonts/TTF/Hack-Regular.ttf')
extrude(amount=1) extrude(amount=1)
logo_obj.color = (0.7, 0.4, 0.1, 1) # Custom color for faces
# Highlight text edges with a custom color
to_highlight = logo_obj.edges().group_by(Axis.X)[-1]
logo_obj_hl = Compound(to_highlight).translate((1e-3, 0, 0)) # To avoid z-fighting
logo_obj_hl.color = (0, 0.3, 0.3, 1)
# Add a logo image to the CAD part
logo_img_location = logo_obj.faces().group_by(Axis.X)[0].face().center_location logo_img_location = logo_obj.faces().group_by(Axis.X)[0].face().center_location
logo_img_location *= Location((0, 0, 4e-2), (0, 0, 90)) # Avoid overlapping and adjust placement logo_img_location *= Location((0, 0, 4e-2), (0, 0, 90)) # Avoid overlapping and adjust placement
logo_img_path = os.path.join(ASSETS_DIR, 'img.jpg') logo_img_path = os.path.join(ASSETS_DIR, 'img.jpg')
img_glb_bytes, img_name = image_to_gltf(logo_img_path, logo_img_location, height=18) img_glb_bytes, img_name = image_to_gltf(logo_img_path, logo_img_location, height=18)
# Add an animated fox to the CAD part
fox_glb_bytes = open(os.path.join(ASSETS_DIR, 'fox.glb'), 'rb').read() fox_glb_bytes = open(os.path.join(ASSETS_DIR, 'fox.glb'), 'rb').read()
return {'fox': fox_glb_bytes, 'logo': logo_obj, 'location': logo_img_location, img_name: img_glb_bytes} return {'fox': fox_glb_bytes, 'logo': logo_obj, 'logo_hl': logo_obj_hl, 'location': logo_img_location, img_name: img_glb_bytes}
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -1,4 +1,4 @@
from typing import List, Dict, Tuple from typing import List, Dict, Tuple, Optional
from OCP.BRep import BRep_Tool from OCP.BRep import BRep_Tool
from OCP.BRepAdaptor import BRepAdaptor_Curve from OCP.BRepAdaptor import BRepAdaptor_Curve
@@ -8,7 +8,7 @@ from OCP.TopoDS import TopoDS_Face, TopoDS_Edge, TopoDS_Shape, TopoDS_Vertex
from build123d import Shape, Vertex, Face, Location from build123d import Shape, Vertex, Face, Location
from pygltflib import GLTF2 from pygltflib import GLTF2
from yacv_server.cad import CADCoreLike from yacv_server.cad import CADCoreLike, ColorTuple
from yacv_server.gltf import GLTFMgr from yacv_server.gltf import GLTFMgr
from yacv_server.mylogger import logger from yacv_server.mylogger import logger
@@ -20,6 +20,7 @@ def tessellate(
faces: bool = True, faces: bool = True,
edges: bool = True, edges: bool = True,
vertices: bool = True, vertices: bool = True,
obj_color: Optional[ColorTuple] = None,
) -> GLTF2: ) -> GLTF2:
"""Tessellate a whole shape into a list of triangle vertices and a list of triangle indices.""" """Tessellate a whole shape into a list of triangle vertices and a list of triangle indices."""
mgr = GLTFMgr() mgr = GLTFMgr()
@@ -34,21 +35,25 @@ def tessellate(
edge_to_faces: Dict[str, List[TopoDS_Face]] = {} edge_to_faces: Dict[str, List[TopoDS_Face]] = {}
vertex_to_faces: Dict[str, List[TopoDS_Face]] = {} vertex_to_faces: Dict[str, List[TopoDS_Face]] = {}
if faces: if faces:
for face in shape.faces(): shape_faces = shape.faces()
_tessellate_face(mgr, face.wrapped, tolerance, angular_tolerance) for face in shape_faces:
_tessellate_face(mgr, face.wrapped, tolerance, angular_tolerance, obj_color)
if edges: if edges:
for edge in face.edges(): for edge in face.edges():
edge_to_faces[edge.wrapped] = edge_to_faces.get(edge.wrapped, []) + [face.wrapped] edge_to_faces[edge.wrapped] = edge_to_faces.get(edge.wrapped, []) + [face.wrapped]
if vertices: if vertices:
for vertex in face.vertices(): for vertex in face.vertices():
vertex_to_faces[vertex.wrapped] = vertex_to_faces.get(vertex.wrapped, []) + [face.wrapped] vertex_to_faces[vertex.wrapped] = vertex_to_faces.get(vertex.wrapped, []) + [face.wrapped]
if len(shape_faces) > 0: obj_color = None # Don't color edges/vertices if faces are colored
if edges: if edges:
for edge in shape.edges(): shape_edges = shape.edges()
for edge in shape_edges:
_tessellate_edge(mgr, edge.wrapped, edge_to_faces.get(edge.wrapped, []), angular_tolerance, _tessellate_edge(mgr, edge.wrapped, edge_to_faces.get(edge.wrapped, []), angular_tolerance,
angular_tolerance) angular_tolerance, obj_color)
if len(shape_edges) > 0: obj_color = None # Don't color vertices if edges are colored
if vertices: if vertices:
for vertex in shape.vertices(): for vertex in shape.vertices():
_tessellate_vertex(mgr, vertex.wrapped, vertex_to_faces.get(vertex.wrapped, [])) _tessellate_vertex(mgr, vertex.wrapped, vertex_to_faces.get(vertex.wrapped, []), obj_color)
return mgr.build() return mgr.build()
@@ -57,7 +62,8 @@ def _tessellate_face(
mgr: GLTFMgr, mgr: GLTFMgr,
ocp_face: TopoDS_Face, ocp_face: TopoDS_Face,
tolerance: float = 1e-3, tolerance: float = 1e-3,
angular_tolerance: float = 0.1 angular_tolerance: float = 0.1,
color: Optional[ColorTuple] = None,
): ):
face = Shape(ocp_face) face = Shape(ocp_face)
# face.mesh(tolerance, angular_tolerance) # face.mesh(tolerance, angular_tolerance)
@@ -75,7 +81,7 @@ def _tessellate_face(
vertices = tri_mesh[0] vertices = tri_mesh[0]
indices = tri_mesh[1] indices = tri_mesh[1]
mgr.add_face(vertices, indices, uv) mgr.add_face(vertices, indices, uv, color)
def _push_point(v: Tuple[float, float, float], faces: List[TopoDS_Face]) -> Tuple[float, float, float]: def _push_point(v: Tuple[float, float, float], faces: List[TopoDS_Face]) -> Tuple[float, float, float]:
@@ -100,6 +106,7 @@ def _tessellate_edge(
faces: List[TopoDS_Face], faces: List[TopoDS_Face],
angular_deflection: float = 0.1, angular_deflection: float = 0.1,
curvature_deflection: float = 0.1, curvature_deflection: float = 0.1,
color: Optional[ColorTuple] = None,
): ):
# Use a curve discretizer to get the vertices # Use a curve discretizer to get the vertices
curve = BRepAdaptor_Curve(ocp_edge) curve = BRepAdaptor_Curve(ocp_edge)
@@ -117,11 +124,12 @@ def _tessellate_edge(
# Convert strip of vertices to a list of pairs of vertices # Convert strip of vertices to a list of pairs of vertices
vertices = [(vertices[i], vertices[i + 1]) for i in range(len(vertices) - 1)] vertices = [(vertices[i], vertices[i + 1]) for i in range(len(vertices) - 1)]
mgr.add_edge(vertices) mgr.add_edge(vertices, color)
def _tessellate_vertex(mgr: GLTFMgr, ocp_vertex: TopoDS_Vertex, faces: List[TopoDS_Face]): def _tessellate_vertex(mgr: GLTFMgr, ocp_vertex: TopoDS_Vertex, faces: List[TopoDS_Face],
color: Optional[ColorTuple] = None):
c = Vertex(ocp_vertex).center() c = Vertex(ocp_vertex).center()
mgr.add_vertex(_push_point((c.X, c.Y, c.Z), faces)) mgr.add_vertex(_push_point((c.X, c.Y, c.Z), faces), color)

View File

@@ -8,7 +8,6 @@ import threading
import time import time
from dataclasses import dataclass from dataclasses import dataclass
from http.server import ThreadingHTTPServer from http.server import ThreadingHTTPServer
from importlib.metadata import version
from threading import Thread from threading import Thread
from typing import Optional, Dict, Union, Callable, List, Tuple from typing import Optional, Dict, Union, Callable, List, Tuple
@@ -18,13 +17,14 @@ from OCP.TopoDS import TopoDS_Shape
from build123d import Shape, Axis, Location, Vector from build123d import Shape, Axis, Location, Vector
from dataclasses_json import dataclass_json from dataclasses_json import dataclass_json
from yacv_server.cad import _hashcode, ColorTuple, get_color
from yacv_server.cad import get_shape, grab_all_cad, CADCoreLike, CADLike from yacv_server.cad import get_shape, grab_all_cad, CADCoreLike, CADLike
from yacv_server.gltf import get_version
from yacv_server.myhttp import HTTPHandler from yacv_server.myhttp import HTTPHandler
from yacv_server.mylogger import logger from yacv_server.mylogger import logger
from yacv_server.pubsub import BufferedPubSub from yacv_server.pubsub import BufferedPubSub
from yacv_server.rwlock import RWLock from yacv_server.rwlock import RWLock
from yacv_server.tessellate import tessellate from yacv_server.tessellate import tessellate
from yacv_server.cad import _hashcode
@dataclass_json @dataclass_json
@@ -44,16 +44,20 @@ YACVSupported = Union[bytes, CADCoreLike]
class UpdatesApiFullData(UpdatesApiData): class UpdatesApiFullData(UpdatesApiData):
obj: YACVSupported obj: YACVSupported
"""The OCCT object, if any (not serialized)""" """The OCCT object (not serialized)"""
color: Optional[ColorTuple]
"""The color of the object, if any (not serialized)"""
kwargs: Optional[Dict[str, any]] kwargs: Optional[Dict[str, any]]
"""The show_object options, if any (not serialized)""" """The show_object options, if any (not serialized)"""
def __init__(self, obj: YACVSupported, name: str, _hash: str, is_remove: Optional[bool] = False, def __init__(self, obj: YACVSupported, name: str, _hash: str, is_remove: Optional[bool] = False,
color: Optional[ColorTuple] = None,
kwargs: Optional[Dict[str, any]] = None): kwargs: Optional[Dict[str, any]] = None):
self.name = name self.name = name
self.hash = _hash self.hash = _hash
self.is_remove = is_remove self.is_remove = is_remove
self.obj = obj self.obj = obj
self.color = color
self.kwargs = kwargs self.kwargs = kwargs
def to_json(self) -> str: def to_json(self) -> str:
@@ -98,7 +102,7 @@ class YACV:
self.at_least_one_client = threading.Event() self.at_least_one_client = threading.Event()
self.shutting_down = threading.Event() self.shutting_down = threading.Event()
self.frontend_lock = RWLock() self.frontend_lock = RWLock()
logger.info('Using yacv-server v%s', version('yacv-server')) logger.info('Using yacv-server v%s', get_version())
def start(self): def start(self):
"""Starts the web server in the background""" """Starts the web server in the background"""
@@ -185,10 +189,11 @@ class YACV:
# Publish the show event # Publish the show event
for obj, name in zip(objs, names): for obj, name in zip(objs, names):
color = get_color(obj)
if not isinstance(obj, bytes): if not isinstance(obj, bytes):
obj = _preprocess_cad(obj, **kwargs) obj = _preprocess_cad(obj, **kwargs)
_hash = _hashcode(obj, **kwargs) _hash = _hashcode(obj, color, **kwargs)
event = UpdatesApiFullData(name=name, _hash=_hash, obj=obj, kwargs=kwargs or {}) event = UpdatesApiFullData(name=name, _hash=_hash, obj=obj, color=color, kwargs=kwargs or {})
self.show_events.publish(event) self.show_events.publish(event)
logger.info('show %s took %.3f seconds', names, time.time() - start) logger.info('show %s took %.3f seconds', names, time.time() - start)
@@ -277,7 +282,8 @@ class YACV:
angular_tolerance=event.kwargs.get('angular_tolerance', 0.1), angular_tolerance=event.kwargs.get('angular_tolerance', 0.1),
faces=event.kwargs.get('faces', True), faces=event.kwargs.get('faces', True),
edges=event.kwargs.get('edges', True), edges=event.kwargs.get('edges', True),
vertices=event.kwargs.get('vertices', True)) vertices=event.kwargs.get('vertices', True),
obj_color=event.color)
glb_list_of_bytes = gltf.save_to_bytes() glb_list_of_bytes = gltf.save_to_bytes()
glb_bytes = b''.join(glb_list_of_bytes) glb_bytes = b''.join(glb_list_of_bytes)
publish_to.publish(glb_bytes) publish_to.publish(glb_bytes)

209
yarn.lock
View File

@@ -523,29 +523,29 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c"
integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==
"@gltf-transform/core@^4.0.4", "@gltf-transform/core@^4.0.8": "@gltf-transform/core@^4.0.10", "@gltf-transform/core@^4.0.4":
version "4.0.8" version "4.0.10"
resolved "https://registry.yarnpkg.com/@gltf-transform/core/-/core-4.0.8.tgz#cf5699cb05e62a33bb68dbf9e1438186f992cac5" resolved "https://registry.yarnpkg.com/@gltf-transform/core/-/core-4.0.10.tgz#94121cd6a05d15051fc19d4730f13ad324505245"
integrity sha512-8oSLSw+t+wxPvKC2qm0n3EOoR6Ql2DMuagimjWjGz8sC4MtCqbo6kS6dCeissYrkgP2fj/k8dzRWiWQZRatGMg== integrity sha512-d1nOk2iO4YtBHI8k2+oEIPxxLs8AmgPYxITc2DFYXGlb550RBicG3TrAOqzbHM6U5w0eYE+bgitsePt6ygWNxA==
dependencies: dependencies:
property-graph "^2.0.0" property-graph "^2.0.0"
"@gltf-transform/extensions@^4.0.8": "@gltf-transform/extensions@^4.0.10":
version "4.0.8" version "4.0.10"
resolved "https://registry.yarnpkg.com/@gltf-transform/extensions/-/extensions-4.0.8.tgz#4f099841df3b2f28a7974e048c7a65f9abb03618" resolved "https://registry.yarnpkg.com/@gltf-transform/extensions/-/extensions-4.0.10.tgz#c8b8dff029a1c7afb5b63ac588b201a8a3cebf49"
integrity sha512-ZbpSV+tHIIYZySwkt5/GLiTvfhvO/4ff7frSmdAG8nE3xRsLyxd2cuYcYHSqN7PP3Ch8NxLSBxvd9/MHNQmMYw== integrity sha512-Il0K5DH5UBAdHBFr8SEQ2H5x5e2BaHgSl74NyxTdsGYOKr9eAuJCMsmdvdf+5VrNIOOZJwr192ZtZa9ylbgPvg==
dependencies: dependencies:
"@gltf-transform/core" "^4.0.8" "@gltf-transform/core" "^4.0.10"
ktx-parse "^0.7.0" ktx-parse "^0.7.1"
"@gltf-transform/functions@^4.0.8": "@gltf-transform/functions@^4.0.10":
version "4.0.8" version "4.0.10"
resolved "https://registry.yarnpkg.com/@gltf-transform/functions/-/functions-4.0.8.tgz#2b5d653e327d6c27c4011774561d4828b14f3956" resolved "https://registry.yarnpkg.com/@gltf-transform/functions/-/functions-4.0.10.tgz#a47101b4b99c3f81840c11de9fbc8f460a0d6d43"
integrity sha512-v6yVtqh82iBoIz4PiEX9SWu9GEsrCyMclhzBMh6A6X2ezb823QBg1jOWdP+tB7KgetWZna4hALppwpsMQwS1ZQ== integrity sha512-1+k7Yvzwf2IgHQkITMW+u/Bkelc5/ZI8m1W7njaLtKTZsW8H5p671qdjbhN98sgy/+Wi0vzLFBJvy0wW1YfwKA==
dependencies: dependencies:
"@gltf-transform/core" "^4.0.8" "@gltf-transform/core" "^4.0.10"
"@gltf-transform/extensions" "^4.0.8" "@gltf-transform/extensions" "^4.0.10"
ktx-parse "^0.7.0" ktx-parse "^0.7.1"
ndarray "^1.0.19" ndarray "^1.0.19"
ndarray-lanczos "^0.3.0" ndarray-lanczos "^0.3.0"
ndarray-pixels "^4.1.0" ndarray-pixels "^4.1.0"
@@ -1076,10 +1076,10 @@
resolved "https://registry.yarnpkg.com/@types/ndarray/-/ndarray-1.0.14.tgz#96b28c09a3587a76de380243f87bb7a2d63b4b23" resolved "https://registry.yarnpkg.com/@types/ndarray/-/ndarray-1.0.14.tgz#96b28c09a3587a76de380243f87bb7a2d63b4b23"
integrity sha512-oANmFZMnFQvb219SSBIhI1Ih/r4CvHDOzkWyJS/XRqkMrGH5/kaPSA1hQhdIBzouaE+5KpE/f5ylI9cujmckQg== integrity sha512-oANmFZMnFQvb219SSBIhI1Ih/r4CvHDOzkWyJS/XRqkMrGH5/kaPSA1hQhdIBzouaE+5KpE/f5ylI9cujmckQg==
"@types/node@^22.5.5": "@types/node@^22.7.4":
version "22.5.5" version "22.7.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc"
integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== integrity sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==
dependencies: dependencies:
undici-types "~6.19.2" undici-types "~6.19.2"
@@ -1177,47 +1177,47 @@
"@babel/parser" "^7.23.9" "@babel/parser" "^7.23.9"
"@vue/compiler-sfc" "^3.4.15" "@vue/compiler-sfc" "^3.4.15"
"@vue/compiler-core@3.5.7": "@vue/compiler-core@3.5.11":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.7.tgz#04300bdc9fb52f89e6f250bbac16e03f0e0ed914" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.11.tgz#3dcd0c1bab10732f44ab1790735afb03a4b69edc"
integrity sha512-A0gay3lK71MddsSnGlBxRPOugIVdACze9L/rCo5X5srCyjQfZOfYtSFMJc3aOZCM+xN55EQpb4R97rYn/iEbSw== integrity sha512-PwAdxs7/9Hc3ieBO12tXzmTD+Ln4qhT/56S+8DvrrZ4kLDn4Z/AMUr8tXJD0axiJBS0RKIoNaR0yMuQB9v9Udg==
dependencies: dependencies:
"@babel/parser" "^7.25.3" "@babel/parser" "^7.25.3"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
entities "^4.5.0" entities "^4.5.0"
estree-walker "^2.0.2" estree-walker "^2.0.2"
source-map-js "^1.2.0" source-map-js "^1.2.0"
"@vue/compiler-dom@3.5.7", "@vue/compiler-dom@^3.4.0": "@vue/compiler-dom@3.5.11", "@vue/compiler-dom@^3.4.0":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.7.tgz#604ced082189b66cb811068332a45dcc11ae0af3" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.11.tgz#950f8fc610e26326fed008b8d102cc8ee78a6ce5"
integrity sha512-GYWl3+gO8/g0ZdYaJ18fYHdI/WVic2VuuUd1NsPp60DWXKy+XjdhFsDW7FbUto8siYYZcosBGn9yVBkjhq1M8Q== integrity sha512-pyGf8zdbDDRkBrEzf8p7BQlMKNNF5Fk/Cf/fQ6PiUz9at4OaUfyXW0dGJTo2Vl1f5U9jSLCNf0EZJEogLXoeew==
dependencies: dependencies:
"@vue/compiler-core" "3.5.7" "@vue/compiler-core" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
"@vue/compiler-sfc@3.5.7", "@vue/compiler-sfc@^3.4.15": "@vue/compiler-sfc@3.5.11", "@vue/compiler-sfc@^3.4.15":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.7.tgz#1150c49c0e3b39d40b2cf0f7de9edfcba98fa3e9" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.11.tgz#68ba7bc6fed4fec6892aed118cb3ee8e4b180d06"
integrity sha512-EjOJtCWJrC7HqoCEzOwpIYHm+JH7YmkxC1hG6VkqIukYRqj8KFUlTLK6hcT4nGgtVov2+ZfrdrRlcaqS78HnBA== integrity sha512-gsbBtT4N9ANXXepprle+X9YLg2htQk1sqH/qGJ/EApl+dgpUBdTv3yP7YlR535uHZY3n6XaR0/bKo0BgwwDniw==
dependencies: dependencies:
"@babel/parser" "^7.25.3" "@babel/parser" "^7.25.3"
"@vue/compiler-core" "3.5.7" "@vue/compiler-core" "3.5.11"
"@vue/compiler-dom" "3.5.7" "@vue/compiler-dom" "3.5.11"
"@vue/compiler-ssr" "3.5.7" "@vue/compiler-ssr" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
estree-walker "^2.0.2" estree-walker "^2.0.2"
magic-string "^0.30.11" magic-string "^0.30.11"
postcss "^8.4.47" postcss "^8.4.47"
source-map-js "^1.2.0" source-map-js "^1.2.0"
"@vue/compiler-ssr@3.5.7": "@vue/compiler-ssr@3.5.11":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.5.7.tgz#042144dfd574a1f64b685e87730b0196dc1846d2" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.5.11.tgz#02d9891c7a649bbf06490ecd8d24dd1575d53e60"
integrity sha512-oZx+jXP2k5arV/8Ly3TpQbfFyimMw2ANrRqvHJoKjPqtEzazxQGZjCLOfq8TnZ3wy2TOXdqfmVp4q7FyYeHV4g== integrity sha512-P4+GPjOuC2aFTk1Z4WANvEhyOykcvEd5bIj2KVNGKGfM745LaXGr++5njpdBTzVz5pZifdlR1kpYSJJpIlSePA==
dependencies: dependencies:
"@vue/compiler-dom" "3.5.7" "@vue/compiler-dom" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
"@vue/compiler-vue2@^2.7.16": "@vue/compiler-vue2@^2.7.16":
version "2.7.16" version "2.7.16"
@@ -1241,43 +1241,43 @@
muggle-string "^0.4.1" muggle-string "^0.4.1"
path-browserify "^1.0.1" path-browserify "^1.0.1"
"@vue/reactivity@3.5.7": "@vue/reactivity@3.5.11":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.5.7.tgz#a52237fce841d92fc861220a8f26b51f5c3245e2" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.5.11.tgz#d27df4fba10c2de1c7234701f18247a775b7a391"
integrity sha512-yF0EpokpOHRNXyn/h6abXc9JFIzfdAf0MJHIi92xxCWS0mqrXH6+2aZ+A6EbSrspGzX5MHTd5N8iBA28HnXu9g== integrity sha512-Nqo5VZEn8MJWlCce8XoyVqHZbd5P2NH+yuAaFzuNSR96I+y1cnuUiq7xfSG+kyvLSiWmaHTKP1r3OZY4mMD50w==
dependencies: dependencies:
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
"@vue/runtime-core@3.5.7": "@vue/runtime-core@3.5.11":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.5.7.tgz#4181b0a921d331f2efd5eda9aa35549ac97e6530" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.5.11.tgz#7beccd013efe5d33981ffd6b6e05d0a5b9058316"
integrity sha512-OzLpBpKbZEaZVSNfd+hQbfBrDKux+b7Yl5hYhhWWWhHD7fEpF+CdI3Brm5k5GsufHEfvMcjruPxwQZuBN6nFYQ== integrity sha512-7PsxFGqwfDhfhh0OcDWBG1DaIQIVOLgkwA5q6MtkPiDFjp5gohVnJEahSktwSFLq7R5PtxDKy6WKURVN1UDbzA==
dependencies: dependencies:
"@vue/reactivity" "3.5.7" "@vue/reactivity" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
"@vue/runtime-dom@3.5.7": "@vue/runtime-dom@3.5.11":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.5.7.tgz#646e006d403f2e6337f566fdf461fbe400e8487d" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.5.11.tgz#14a3181ab7057de41b345b4b3d37b744b3ff8ff5"
integrity sha512-fL7cETfE27U2jyTgqzE382IGFY6a6uyznErn27KbbEzNctzxxUWYDbaN3B55l9nXh0xW2LRWPuWKOvjtO2UewQ== integrity sha512-GNghjecT6IrGf0UhuYmpgaOlN7kxzQBhxWEn08c/SQDxv1yy4IXI1bn81JgEpQ4IXjRxWtPyI8x0/7TF5rPfYQ==
dependencies: dependencies:
"@vue/reactivity" "3.5.7" "@vue/reactivity" "3.5.11"
"@vue/runtime-core" "3.5.7" "@vue/runtime-core" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
csstype "^3.1.3" csstype "^3.1.3"
"@vue/server-renderer@3.5.7": "@vue/server-renderer@3.5.11":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.5.7.tgz#65ba8b60c0ee9e791619c0f8b2b6209a258484e5" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.5.11.tgz#74f558371dfc39f3b0f26f95d089a1a4d1676027"
integrity sha512-peRypij815eIDjpPpPXvYQGYqPH6QXwLJGWraJYPPn8JqWGl29A8QXnS7/Mh3TkMiOcdsJNhbFCoW2Agc2NgAQ== integrity sha512-cVOwYBxR7Wb1B1FoxYvtjJD8X/9E5nlH4VSkJy2uMA1MzYNdzAAB//l8nrmN9py/4aP+3NjWukf9PZ3TeWULaA==
dependencies: dependencies:
"@vue/compiler-ssr" "3.5.7" "@vue/compiler-ssr" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
"@vue/shared@3.5.7", "@vue/shared@^3.4.0": "@vue/shared@3.5.11", "@vue/shared@^3.4.0":
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.7.tgz#1eedd1ffbf804c488fe806a17ff26c22e0ddb72f" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.11.tgz#464b840afc89be9373addff9eeb9dfc98bf3fe2e"
integrity sha512-NBE1PBIvzIedxIc2RZiKXvGbJkrZ2/hLf3h8GlS4/sP9xcXEZMFWOazFkNd6aGeUCMaproe5MHVYB3/4AW9q9g== integrity sha512-W8GgysJVnFo81FthhzurdRAWP/byq3q2qIw70e0JWblzVhjgOMiC2GyovXrZTFQJnFVryYaKGP3Tc9vYzYm6PQ==
"@vue/tsconfig@^0.5.1": "@vue/tsconfig@^0.5.1":
version "0.5.1" version "0.5.1"
@@ -2092,10 +2092,10 @@ just-diff@^6.0.0:
resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285" resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285"
integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA== integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==
ktx-parse@^0.7.0: ktx-parse@^0.7.1:
version "0.7.0" version "0.7.1"
resolved "https://registry.yarnpkg.com/ktx-parse/-/ktx-parse-0.7.0.tgz#65788a43a1a1c19c795ff26299e9318c16b436b2" resolved "https://registry.yarnpkg.com/ktx-parse/-/ktx-parse-0.7.1.tgz#d41514256d7d63acb8ef6ae62dc66f16efc1c39c"
integrity sha512-naezun/2iiWrantwoRI9mw6E4iN41ggYzJSR9XAZzf6+rv+2Tb1yYN8VJhGsA0uptBexE0m4GDh+iiQhYpW+Qw== integrity sha512-FeA3g56ksdFNwjXJJsc1CCc7co+AJYDp6ipIp878zZ2bU8kWROatLYf39TQEd4/XRSUvBXovQ8gaVKWPXsCLEQ==
lie@^3.0.2: lie@^3.0.2:
version "3.3.0" version "3.3.0"
@@ -2575,16 +2575,7 @@ postcss-selector-parser@^6.0.10:
cssesc "^3.0.0" cssesc "^3.0.0"
util-deprecate "^1.0.2" util-deprecate "^1.0.2"
postcss@^8.4.43: postcss@^8.4.43, postcss@^8.4.47:
version "8.4.45"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.45.tgz#538d13d89a16ef71edbf75d895284ae06b79e603"
integrity sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.1"
source-map-js "^1.2.0"
postcss@^8.4.47:
version "8.4.47" version "8.4.47"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365"
integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==
@@ -2978,20 +2969,20 @@ tar@^6.1.11, tar@^6.1.2:
mkdirp "^1.0.3" mkdirp "^1.0.3"
yallist "^4.0.0" yallist "^4.0.0"
terser@^5.33.0: terser@^5.34.1:
version "5.33.0" version "5.34.1"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6"
integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==
dependencies: dependencies:
"@jridgewell/source-map" "^0.3.3" "@jridgewell/source-map" "^0.3.3"
acorn "^8.8.2" acorn "^8.8.2"
commander "^2.20.0" commander "^2.20.0"
source-map-support "~0.5.20" source-map-support "~0.5.20"
three-mesh-bvh@^0.8.0: three-mesh-bvh@^0.8.2:
version "0.8.0" version "0.8.2"
resolved "https://registry.yarnpkg.com/three-mesh-bvh/-/three-mesh-bvh-0.8.0.tgz#4b07d4655e350ab02e67fd1d8fffd8a0cd173920" resolved "https://registry.yarnpkg.com/three-mesh-bvh/-/three-mesh-bvh-0.8.2.tgz#9c38df07a3e35b63c64aa48e861b4cb06119c5df"
integrity sha512-Q3Rx3Ja2d/sqNW965wcoqr9NbRGbolk8jrKvSVu1zO5+Vv15vwLfwiTes+jssrd1Odq2+HQhq99Nknwp0JfISg== integrity sha512-AgzhAicMVLOJKU7i7ERzLT7A27vqnWThenOm8elljOh9tyz+yffOVzlZReYBtL3G/of3W2mPbsaDA2B7UzZR5g==
"three-orientation-gizmo@https://github.com/jrj2211/three-orientation-gizmo": "three-orientation-gizmo@https://github.com/jrj2211/three-orientation-gizmo":
version "1.1.0" version "1.1.0"
@@ -3090,10 +3081,10 @@ validate-npm-package-name@^5.0.0:
dependencies: dependencies:
builtins "^5.0.0" builtins "^5.0.0"
vite@^5.4.7: vite@^5.4.8:
version "5.4.7" version "5.4.8"
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.7.tgz#d226f57c08b61379e955f3836253ed3efb2dcf00" resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.8.tgz#af548ce1c211b2785478d3ba3e8da51e39a287e8"
integrity sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ== integrity sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==
dependencies: dependencies:
esbuild "^0.21.3" esbuild "^0.21.3"
postcss "^8.4.43" postcss "^8.4.43"
@@ -3115,16 +3106,16 @@ vue-tsc@^2.1.6:
"@vue/language-core" "2.1.6" "@vue/language-core" "2.1.6"
semver "^7.5.4" semver "^7.5.4"
vue@^3.5.7: vue@^3.5.11:
version "3.5.7" version "3.5.11"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.5.7.tgz#511df1fab33a4c20cfe6b59659d6f601f0c26625" resolved "https://registry.yarnpkg.com/vue/-/vue-3.5.11.tgz#3e307183797629f701e303a0a008f517ae031483"
integrity sha512-JcFm0f5j8DQO9E07pZRxqZ/ZsNopMVzHYXpKvnfqXFcA4JTi+4YcrikRn9wkzWsdj0YsLzlLIsR0zzGxA2P6Wg== integrity sha512-/8Wurrd9J3lb72FTQS7gRMNQD4nztTtKPmuDuPuhqXmmpD6+skVjAeahNpVzsuky6Sy9gy7wn8UadqPtt9SQIg==
dependencies: dependencies:
"@vue/compiler-dom" "3.5.7" "@vue/compiler-dom" "3.5.11"
"@vue/compiler-sfc" "3.5.7" "@vue/compiler-sfc" "3.5.11"
"@vue/runtime-dom" "3.5.7" "@vue/runtime-dom" "3.5.11"
"@vue/server-renderer" "3.5.7" "@vue/server-renderer" "3.5.11"
"@vue/shared" "3.5.7" "@vue/shared" "3.5.11"
vuetify@^3.7.2: vuetify@^3.7.2:
version "3.7.2" version "3.7.2"