note detect rollback
This commit is contained in:
@@ -516,10 +516,10 @@ namespace DwgExtractorManual.Models
|
||||
var notePos = noteText.Position;
|
||||
var noteHeight = noteText.Height;
|
||||
|
||||
// Note position에서 height * 2 만큼 아래로 수평선 정의 (더 넓은 범위로 검색)
|
||||
// Note position에서 height * 2 만큼 아래로 수평선 정의
|
||||
double searchY = notePos.Y - (noteHeight * 2);
|
||||
var searchLineStart = new Point3d(notePos.X - noteHeight * 20, searchY, 0);
|
||||
var searchLineEnd = new Point3d(notePos.X + noteHeight * 100, searchY, 0);
|
||||
var searchLineStart = new Point3d(notePos.X - noteHeight * 10, searchY, 0);
|
||||
var searchLineEnd = new Point3d(notePos.X + noteHeight * 50, searchY, 0);
|
||||
|
||||
Debug.WriteLine($"[DEBUG] 교차 검색선: ({searchLineStart.X}, {searchLineStart.Y}) to ({searchLineEnd.X}, {searchLineEnd.Y})");
|
||||
|
||||
@@ -568,6 +568,7 @@ namespace DwgExtractorManual.Models
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 수평선이 Polyline과 교차하는지 확인합니다.
|
||||
/// </summary>
|
||||
@@ -667,16 +668,11 @@ namespace DwgExtractorManual.Models
|
||||
if (boxWidth < noteHeight || boxHeight < noteHeight) return false;
|
||||
if (boxWidth > noteHeight * 100 || boxHeight > noteHeight * 100) return false;
|
||||
|
||||
// Note 위치와 적절한 거리에 있는지 확인 (더 유연한 검증)
|
||||
// Note 위치와 적절한 거리에 있는지 확인
|
||||
double distanceX = Math.Abs(box.minPoint.X - notePos.X);
|
||||
double distanceY = Math.Abs(box.maxPoint.Y - notePos.Y);
|
||||
|
||||
// Y 거리만 확인 (X 거리는 제거 - 오른쪽에 있는 note box도 허용)
|
||||
if (distanceY > noteHeight * 15) return false;
|
||||
|
||||
// Note가 박스의 일정 범위 내에 있는지 확인 (X 범위를 더 넓게)
|
||||
bool isWithinXRange = (notePos.X >= box.minPoint.X - noteHeight * 100) &&
|
||||
(notePos.X <= box.maxPoint.X + noteHeight * 20);
|
||||
if (!isWithinXRange) return false;
|
||||
|
||||
if (distanceX > noteHeight * 50 || distanceY > noteHeight * 10) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
2382
Models/ExportExcel_old.cs
Normal file
2382
Models/ExportExcel_old.cs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user