@@ -129,20 +129,24 @@ def __create_grid_objects(self):
129
129
y_middle = (max_y_coord + min_y_coord ) / 2
130
130
z_middle = (max_z_coord + min_z_coord ) / 2
131
131
132
+ line_thickness = min (max (self .__scale / 25 , 0.01 ), 5 ) # 0.01 -> 5
133
+
132
134
# XZ plane
133
135
for x_point in x_coords :
134
136
# Draw a line across for each x coord, along the same y-axis, from min to max z coord
135
137
xz_lines .append (create_line (
136
138
vector (x_point , y_origin , min_z_coord ),
137
139
vector (x_point , y_origin , max_z_coord ),
138
- self .__scene
140
+ self .__scene ,
141
+ thickness = line_thickness
139
142
))
140
143
for z_point in z_coords :
141
144
# Draw a line across each z coord, along the same y-axis, from min to max z coord
142
145
xz_lines .append (create_line (
143
146
vector (min_x_coord , y_origin , z_point ),
144
147
vector (max_x_coord , y_origin , z_point ),
145
- self .__scene
148
+ self .__scene ,
149
+ thickness = line_thickness
146
150
))
147
151
148
152
# XY plane
@@ -151,14 +155,16 @@ def __create_grid_objects(self):
151
155
xy_lines .append (create_line (
152
156
vector (x_point , min_y_coord , z_origin ),
153
157
vector (x_point , max_y_coord , z_origin ),
154
- self .__scene
158
+ self .__scene ,
159
+ thickness = line_thickness
155
160
))
156
161
for y_point in y_coords :
157
162
# Draw a line across each y coord, along the same z-axis, from min to max x coord
158
163
xy_lines .append (create_line (
159
164
vector (min_x_coord , y_point , z_origin ),
160
165
vector (max_x_coord , y_point , z_origin ),
161
- self .__scene
166
+ self .__scene ,
167
+ thickness = line_thickness
162
168
))
163
169
164
170
# YZ plane
@@ -167,14 +173,16 @@ def __create_grid_objects(self):
167
173
yz_lines .append (create_line (
168
174
vector (x_origin , y_point , min_z_coord ),
169
175
vector (x_origin , y_point , max_z_coord ),
170
- self .__scene
176
+ self .__scene ,
177
+ thickness = line_thickness
171
178
))
172
179
for z_point in z_coords :
173
180
# Draw a line across each z coord, along the same x-axis, from min to max y coord
174
181
yz_lines .append (create_line (
175
182
vector (x_origin , min_y_coord , z_point ),
176
183
vector (x_origin , max_y_coord , z_point ),
177
- self .__scene
184
+ self .__scene ,
185
+ thickness = line_thickness
178
186
))
179
187
180
188
# Compound the lines together into respective objects
@@ -261,19 +269,12 @@ def __move_grid_objects(self):
261
269
y_middle = (max_y_coord + min_y_coord ) / 2
262
270
z_middle = (max_z_coord + min_z_coord ) / 2
263
271
264
- print ("x" , min_x_coord , x_middle , max_x_coord )
265
- print ("y" , min_y_coord , y_middle , max_y_coord )
266
- print ("z" , min_z_coord , z_middle , max_z_coord )
267
- print ("pos" , self .grid_object [self .__planes_idx ][self .__xy_plane_idx ])
268
-
269
272
# XY Plane
270
273
if camera_axes .z < 0 :
271
274
self .grid_object [self .__planes_idx ][self .__xy_plane_idx ].pos = vector (x_middle , y_middle , min_z_coord )
272
275
else :
273
276
self .grid_object [self .__planes_idx ][self .__xy_plane_idx ].pos = vector (x_middle , y_middle , max_z_coord )
274
277
275
- print ("pos" , self .grid_object [self .__planes_idx ][self .__xy_plane_idx ])
276
-
277
278
# XZ Plane
278
279
if camera_axes .y < 0 :
279
280
self .grid_object [self .__planes_idx ][self .__xz_plane_idx ].pos = vector (x_middle , min_y_coord , z_middle )
@@ -372,6 +373,8 @@ def set_relative(self, is_relative):
372
373
373
374
def set_scale (self , value ):
374
375
"""
376
+ Set the scale and redraw the grid
377
+
375
378
:param value: The value to set the scale to
376
379
:type value: `float`
377
380
"""
0 commit comments