mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-20 06:27:04 +01:00
Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b58b00231 | ||
|
|
05a159ac6c | ||
|
|
458f81f51d | ||
|
|
f3545bebb8 | ||
|
|
90d05f08c4 | ||
|
|
5b4865978f | ||
|
|
9ec2de8e4a | ||
|
|
0c98c273b8 | ||
|
|
014a68c33d | ||
|
|
16bf550f75 | ||
|
|
f4a74c2f1c | ||
|
|
1fddd984aa | ||
|
|
5809b88cee | ||
|
|
5cd7fb5d9d | ||
|
|
dbfc72c03b | ||
|
|
437e8eb4ad | ||
|
|
7051a71710 | ||
|
|
28282f4b06 | ||
|
|
7f43367459 | ||
|
|
ba64f70300 | ||
|
|
05963d58f2 | ||
|
|
405c061f93 | ||
|
|
e0a00b2d32 | ||
|
|
90f4611ee8 | ||
|
|
ee954622bb | ||
|
|
f5be0618ad | ||
|
|
f92701a969 | ||
|
|
949f92a28f | ||
|
|
7618581ef5 | ||
|
|
5460d19fdb | ||
|
|
f84292e4b7 | ||
|
|
b597223228 | ||
|
|
8ec9a3f507 | ||
|
|
0ec339283e | ||
|
|
1d50dc20ba | ||
|
|
35331746b1 | ||
|
|
287f76c0ad | ||
|
|
dadb2b7a39 | ||
|
|
722432dfb0 | ||
|
|
a9184b224f | ||
|
|
3c732d7c85 | ||
|
|
d8fa1f1e0b | ||
|
|
1b03699677 | ||
|
|
7f6f777b47 | ||
|
|
68fb3b1a67 | ||
|
|
cd4a1d523b | ||
|
|
84cd6ba710 | ||
|
|
aa8492cd3d | ||
|
|
6f8710bd7a | ||
|
|
8b175b369a | ||
|
|
0be05967ca | ||
|
|
51f6165290 | ||
|
|
f147c83604 | ||
|
|
881de107c7 | ||
|
|
6b533dfbe1 | ||
|
|
2e3fb8beae | ||
|
|
e8baf5cd52 | ||
|
|
6c0289208f | ||
|
|
496f90fb56 | ||
|
|
696333e105 | ||
|
|
099a7aa972 | ||
|
|
b2aa568eb2 | ||
|
|
e685c8adcf | ||
|
|
19ddb670db | ||
|
|
8f1cd3e203 | ||
|
|
6b0fcd743f | ||
|
|
1d275936a4 | ||
|
|
f7c28a42c0 | ||
|
|
fa54829328 | ||
|
|
c8a7a3ac67 | ||
|
|
791b2608c5 | ||
|
|
ba8e40bc48 | ||
|
|
712626e791 | ||
|
|
734387a866 | ||
|
|
0988db9269 | ||
|
|
97d620b982 | ||
|
|
857d0a602f | ||
|
|
23f8aa8bdd | ||
|
|
03a04bd3fd | ||
|
|
57f91d046f | ||
|
|
758bc9b874 | ||
|
|
490a86796c | ||
|
|
f44270d913 | ||
|
|
4eed1b063e | ||
|
|
e3fe562d53 | ||
|
|
84ba81a5e5 | ||
|
|
d469f5da40 | ||
|
|
98e8de75dd | ||
|
|
e8d7985dba |
8
.github/renovate.json5
vendored
8
.github/renovate.json5
vendored
@@ -6,13 +6,9 @@
|
|||||||
],
|
],
|
||||||
"automerge": true,
|
"automerge": true,
|
||||||
"automergeType": "branch",
|
"automergeType": "branch",
|
||||||
"schedule": [
|
"schedule": [ "* * * * 0,6" ],
|
||||||
"before 3am on Saturday"
|
|
||||||
],
|
|
||||||
"lockFileMaintenance": {
|
"lockFileMaintenance": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"schedule": [
|
"schedule": [ "* * * * 0,6" ]
|
||||||
"before 3am on Saturday"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
package.json
18
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yet-another-cad-viewer",
|
"name": "yet-another-cad-viewer",
|
||||||
"version": "0.9.5",
|
"version": "0.9.7",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
"@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.175.0",
|
"three": "^0.178.0",
|
||||||
"three-mesh-bvh": "^0.9.0",
|
"three-mesh-bvh": "^0.9.0",
|
||||||
"three-orientation-gizmo": "https://github.com/jrj2211/three-orientation-gizmo",
|
"three-orientation-gizmo": "https://github.com/jrj2211/three-orientation-gizmo",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
@@ -31,17 +31,17 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node20": "^20.1.4",
|
"@tsconfig/node20": "^20.1.4",
|
||||||
"@types/node": "^22.9.3",
|
"@types/node": "^22.9.3",
|
||||||
"@types/three": "^0.175.0",
|
"@types/three": "^0.178.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.0",
|
"@vitejs/plugin-vue": "^6.0.0",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.1.0",
|
"@vitejs/plugin-vue-jsx": "^5.0.0",
|
||||||
"@vue/tsconfig": "^0.7.0",
|
"@vue/tsconfig": "^0.7.0",
|
||||||
"buffer": "^5.5.0||^6.0.0",
|
"buffer": "^5.5.0||^6.0.0",
|
||||||
"commander": "^13.0.0",
|
"commander": "^14.0.0",
|
||||||
"generate-license-file": "^4.0.0",
|
"generate-license-file": "^4.0.0",
|
||||||
"npm-run-all2": "^7.0.1",
|
"npm-run-all2": "^8.0.0",
|
||||||
"terser": "^5.36.0",
|
"terser": "^5.36.0",
|
||||||
"typescript": "~5.8.0",
|
"typescript": "~5.8.0",
|
||||||
"vite": "^6.0.0",
|
"vite": "^7.0.0",
|
||||||
"vue-tsc": "^2.1.10"
|
"vue-tsc": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
838
poetry.lock
generated
838
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "yacv-server"
|
name = "yacv-server"
|
||||||
version = "0.9.5"
|
version = "0.9.7"
|
||||||
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"
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ def get_shape(obj: CADLike, error: bool = True) -> Optional[CADCoreLike]:
|
|||||||
if len(shapes_raw_filtered) > 0: # Continue if we found at least one shape
|
if len(shapes_raw_filtered) > 0: # Continue if we found at least one shape
|
||||||
# Sorting is required to improve hashcode consistency
|
# Sorting is required to improve hashcode consistency
|
||||||
shapes_raw_filtered_sorted = sorted(shapes_raw_filtered, key=lambda x: _hashcode(x))
|
shapes_raw_filtered_sorted = sorted(shapes_raw_filtered, key=lambda x: _hashcode(x))
|
||||||
# Build a single compound shape
|
# Build a single compound shape (skip locations/axes here, they can't be in a Compound)
|
||||||
shapes_bd = [Compound(shape) for shape in shapes_raw_filtered_sorted if shape is not None]
|
shapes_bd = [Compound(shape) for shape in shapes_raw_filtered_sorted if shape is not None and not isinstance(shape, TopLoc_Location)]
|
||||||
return get_shape(Compound(shapes_bd), error)
|
return get_shape(Compound(shapes_bd), error)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -382,19 +382,30 @@ def _preprocess_cad(obj: CADLike, **kwargs) -> CADCoreLike:
|
|||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
||||||
_find_var_name_count = 0
|
_obj_name_counts = {}
|
||||||
|
|
||||||
|
|
||||||
def _find_var_name(obj: any, avoid_levels: int = 2) -> str:
|
def _find_var_name(obj: any, avoid_levels: int = 2) -> str:
|
||||||
"""A hacky way to get a stable name for an object that may change over time"""
|
"""A hacky way to get a stable name for an object that may change over time"""
|
||||||
global _find_var_name_count
|
|
||||||
|
# Build123d objects have a "label" property, CadQuery Assembly's have "name"
|
||||||
|
for f in ('label', 'name'):
|
||||||
|
if hasattr(obj, f):
|
||||||
|
v = getattr(obj, f)
|
||||||
|
if v != '':
|
||||||
|
return v;
|
||||||
|
|
||||||
|
# Otherwise walk up our stack to see if there's a local variable that points to it
|
||||||
obj_shape = get_shape(obj, error=False) or obj
|
obj_shape = get_shape(obj, error=False) or obj
|
||||||
for frame in inspect.stack()[avoid_levels:]:
|
for frame in inspect.stack()[avoid_levels:]:
|
||||||
for key, value in frame.frame.f_locals.items():
|
for key, value in frame.frame.f_locals.items():
|
||||||
if get_shape(value, error=False) is obj_shape:
|
if get_shape(value, error=False) is obj_shape:
|
||||||
return key
|
return key
|
||||||
_find_var_name_count += 1
|
|
||||||
return 'unknown_var_' + str(_find_var_name_count)
|
# Last resort, name it for its type with a disambiguating number
|
||||||
|
global _obj_name_counts
|
||||||
|
t = obj.__class__.__name__
|
||||||
|
_obj_name_counts[t] = 1 if t not in _obj_name_counts else _obj_name_counts[t] + 1
|
||||||
|
return t + str(_obj_name_counts[t])
|
||||||
|
|
||||||
|
|
||||||
def sizeof_fmt(num, suffix="B"):
|
def sizeof_fmt(num, suffix="B"):
|
||||||
|
|||||||
Reference in New Issue
Block a user