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);