From d58d506af8ecc22efed4e085cb1ebba89140ea20 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 19:13:44 +0000 Subject: [PATCH] Changes Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com> --- src/components/three/SmartMeasure.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/three/SmartMeasure.ts b/src/components/three/SmartMeasure.ts index fda52d5..0e87746 100644 --- a/src/components/three/SmartMeasure.ts +++ b/src/components/three/SmartMeasure.ts @@ -270,7 +270,7 @@ export function findNearestEdgeSegment( const hitX = (hitScreen.x * 0.5 + 0.5) * canvasSize.width; const hitY = (-hitScreen.y * 0.5 + 0.5) * canvasSize.height; - const matrix = edgeLines ? edgeLines.matrixWorld.clone().premultiply(mesh.matrixWorld) : mesh.matrixWorld; + const matrix = edgeLines ? edgeLines.matrixWorld : mesh.matrixWorld; let bestDist = Infinity; let bestMid: THREE.Vector3 | null = null; @@ -340,7 +340,7 @@ export function detectCircularEdgeAtPoint( const posAttr = geo.attributes.position; if (!posAttr) return null; - const matrix = edgeLines ? edgeLines.matrixWorld.clone().premultiply(mesh.matrixWorld) : mesh.matrixWorld; + const matrix = edgeLines ? edgeLines.matrixWorld : mesh.matrixWorld; const hitScreen = worldPoint.clone().project(camera); const hitX = (hitScreen.x * 0.5 + 0.5) * canvasSize.width; @@ -523,7 +523,7 @@ export function findNearestEdgeSegment3D( const posAttr = geo.attributes.position; if (!posAttr) return null; - const matrix = edgeLines ? edgeLines.matrixWorld.clone().premultiply(mesh.matrixWorld) : mesh.matrixWorld; + const matrix = edgeLines ? edgeLines.matrixWorld : mesh.matrixWorld; const invMatrix = new THREE.Matrix4().copy(matrix).invert(); const localPoint = worldPoint.clone().applyMatrix4(invMatrix); @@ -579,7 +579,7 @@ export function detectCircularEdgeAtPoint3D( const posAttr = geo.attributes.position; if (!posAttr) return null; - const matrix = edgeLines ? edgeLines.matrixWorld.clone().premultiply(mesh.matrixWorld) : mesh.matrixWorld; + const matrix = edgeLines ? edgeLines.matrixWorld : mesh.matrixWorld; const invMatrix = new THREE.Matrix4().copy(matrix).invert(); const localPoint = worldPoint.clone().applyMatrix4(invMatrix);