@@ -55,7 +55,7 @@ def setup_beacon_style(self, type_: str = "box", size: float = 1.0):
5555
5656 # Point styles (using blocks)
5757 block = self .doc .blocks .new (name = 'BEACON_POINT' )
58- radius = size * self . scale * 0.2 # inner hatch radius
58+ radius = size * 0.2 # inner hatch radius
5959 half = size / 2 # half-size for square
6060
6161 # Filled (solid hatch) circle
@@ -114,24 +114,25 @@ def draw_beacon(self, x: float, y: float, z: float = 0, text_height: float = 1.0
114114 (x + offset , y + offset )
115115 )
116116
117- def add_parcel (self , parcel_id : str , points : list ):
117+ def add_parcel (self , parcel_id : str , points : list , label_scale : float = 1.0 ):
118118 """Add a parcel given its ID and list of (x, y) points"""
119119 # scale points
120120 points = [(x * self .scale , y * self .scale ) for x , y , * rest in points ]
121+ label_scale = label_scale * self .scale
121122
122123 self .msp .add_lwpolyline (points , close = True , dxfattribs = {
123124 'layer' : 'LINES'
124125 })
125126
126127 # Add parcel ID label at centroid
127128 if points and parcel_id :
128- centroid_x = ( sum (p [0 ] for p in points ) / len (points )) * self . scale
129- centroid_y = ( sum (p [1 ] for p in points ) / len (points )) * self . scale
129+ centroid_x = sum (p [0 ] for p in points ) / len (points )
130+ centroid_y = sum (p [1 ] for p in points ) / len (points )
130131 self .msp .add_text (
131132 parcel_id ,
132133 dxfattribs = {
133134 'layer' : 'LABELS' ,
134- 'height' : 2.0 * self . scale ,
135+ 'height' : label_scale ,
135136 'style' : 'SURVEY_TEXT' ,
136137 'color' : 2 # Yellow
137138 }
0 commit comments