From c6c5fabbf207436a9af54c2ded4914690232b76c Mon Sep 17 00:00:00 2001 From: yscha Date: Sat, 6 Dec 2025 00:24:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=EC=A0=95=EB=A6=AC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/skeleton-utils.js | 44 +------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/src/util/skeleton-utils.js b/src/util/skeleton-utils.js index 4932439c..20218428 100644 --- a/src/util/skeleton-utils.js +++ b/src/util/skeleton-utils.js @@ -2387,49 +2387,7 @@ function getLineDirection(p1, p2) { -/** - * 점이 선분 위에 있는지 확인하는 헬퍼 함수 - * @param {Object} point - 확인할 점 {x, y} - * @param {Object} lineStart - 선분의 시작점 {x, y} - * @param {Object} lineEnd - 선분의 끝점 {x, y} - * @param {number} epsilon - 허용 오차 - * @returns {boolean} - */ -// function isPointOnLineSegment(point, lineStart, lineEnd, epsilon = 0.1) { -// const dx = lineEnd.x - lineStart.x; -// const dy = lineEnd.y - lineStart.y; -// const length = Math.sqrt(dx * dx + dy * dy); -// -// if (length === 0) { -// // 선분의 길이가 0이면 시작점과의 거리만 확인 -// return Math.abs(point.x - lineStart.x) < epsilon && Math.abs(point.y - lineStart.y) < epsilon; -// } -// -// // 점에서 선분의 시작점까지의 벡터 -// const toPoint = { x: point.x - lineStart.x, y: point.y - lineStart.y }; -// -// // 선분 방향으로의 투영 길이 -// const t = (toPoint.x * dx + toPoint.y * dy) / (length * length); -// -// // t가 0과 1 사이에 있어야 선분 위에 있음 -// if (t < 0 || t > 1) { -// return false; -// } -// -// // 선분 위의 가장 가까운 점 -// const closestPoint = { -// x: lineStart.x + t * dx, -// y: lineStart.y + t * dy -// }; -// -// // 점과 가장 가까운 점 사이의 거리 -// const dist = Math.sqrt( -// Math.pow(point.x - closestPoint.x, 2) + -// Math.pow(point.y - closestPoint.y, 2) -// ); -// -// return dist < epsilon; -// } + // selectLine과 baseLines 비교하여 방향 찾기 function findLineDirection(selectLine, baseLines) {