Skip to content

Commit c093d9a

Browse files
committed
main
1 parent 79fa06a commit c093d9a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

cadastral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def draw_beacons(self):
6262
return
6363

6464
for coord in self.coordinates:
65-
self._drawer.draw_beacon(coord.easting, coord.northing, 0, self.label_size, coord.id)
65+
self._drawer.draw_beacon(coord.easting, coord.northing, 0, self.label_size, self._get_drawing_extent(), coord.id)
6666

6767
def draw_parcels(self):
6868
if not self.parcels or not self.coordinates:

dxf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def setup_font(self, font_name: str = "Times New Roman"):
102102
# Add a new text style with the specified font
103103
self.doc.styles.add('SURVEY_TEXT', font=f'{font_name}.ttf')
104104

105-
def draw_beacon(self, x: float, y: float, z: float = 0, text_height: float = 1.0, label=None):
105+
def draw_beacon(self, x: float, y: float, z: float = 0, text_height: float = 1.0, extent: float = 1000, label=None):
106106
# Add a beacon point with optional label
107107
x = x * self.scale
108108
y = y * self.scale
@@ -117,7 +117,7 @@ def draw_beacon(self, x: float, y: float, z: float = 0, text_height: float = 1.0
117117

118118
# add label
119119
if label is not None:
120-
offset = 1 * self.scale
120+
offset = self.scale * extent * 0.02
121121
self.msp.add_text(
122122
label,
123123
dxfattribs={

topographic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def draw_beacons(self):
9292
for coord in self.topographic_boundary.coordinates:
9393
if coord.id in check:
9494
continue
95-
self._drawer.draw_beacon(coord.easting, coord.northing, 0, self.label_size, coord.id)
95+
self._drawer.draw_beacon(coord.easting, coord.northing, 0, self.label_size, self._get_drawing_extent(), coord.id)
9696
check.append(coord.id)
9797

9898
def draw_topo_points(self):

0 commit comments

Comments
 (0)