mirror of
https://github.com/flash555588/ai-model-workbench.git
synced 2026-07-22 06:56:38 +00:00
Keep free measurement preview status
This commit is contained in:
parent
ddd8417c1c
commit
daadb83c23
4 changed files with 5 additions and 2 deletions
|
|
@ -9,6 +9,7 @@
|
|||
- UI: restrict normal measurement picks and hover previews to the locked measurement target so clicks on neighboring geometry no longer seed selected-object snap endpoints.
|
||||
- UI: require the locked measurement target to be the frontmost normal pick before snapping, preventing hidden target geometry behind another part from receiving ruler endpoints.
|
||||
- UI: clear stale measurement snap status after cancelling a pending endpoint so the selected-object ruler returns to a neutral ready state.
|
||||
- UI: keep the measurement strip in Free pick status while Alt/Option previewing the backup free ruler path, even when the pointer is over empty canvas space.
|
||||
- Performance: cache selected-target measurement snap candidates while measuring so hover previews do not repeatedly rebuild vertex and edge lists for the same object.
|
||||
- Performance: validate selected-target measurement snap caches against target mesh signatures so transformed or updated geometry rebuilds snap candidates instead of reusing stale vertex and edge lists.
|
||||
- UI: restyle distance measurements as orthographic drawing-style dimension callouts with extension lines, arrowheads, and compact drafting labels instead of thick freehand ruler lines.
|
||||
|
|
|
|||
4
main.js
4
main.js
File diff suppressed because one or more lines are too long
|
|
@ -2290,6 +2290,7 @@ export class BabylonModelPreview implements WorkbenchPreview {
|
|||
const y = this.lastPointerClient.y - rect.top;
|
||||
let endPoint: Vector3 | null = null;
|
||||
if (this.lastPointerClient.altKey) {
|
||||
this.setMeasurementSnapKind("free");
|
||||
const pickResult = this.scene.pick(x, y, (mesh) => mesh !== this.previewLine && !this.measurementMarkers.includes(mesh as Mesh));
|
||||
endPoint = pickResult.hit && pickResult.pickedPoint
|
||||
? this.resolveMeasurementPickPoint(pickResult.pickedPoint, true)
|
||||
|
|
|
|||
|
|
@ -3038,6 +3038,7 @@ export class ThreeModelPreview implements WorkbenchPreview {
|
|||
this.raycaster.setFromCamera(this.pointer, this.camera);
|
||||
let endPoint: Vector3 | null = null;
|
||||
if (this.lastPointerClient.altKey) {
|
||||
this.setMeasurementSnapKind("free");
|
||||
const hit = this.raycaster.intersectObjects(this.getRenderableObjects(this.rootObject), false)[0];
|
||||
endPoint = hit?.point
|
||||
? this.resolveMeasurementPickPoint(hit.point.clone(), true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue