-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
You will need Python installed on your computer, and a copy of meter.py from GitHub. You will also need your meter, and a ruler or calipers to measure the dimensions of the meter face (in mm).
Expose the meter face so you can see the label with the meter markings, and measure the following. They will be used as parameters in your Python script which will draw the new label for the meter face.
-
label_width
The width of the label in mm.
-
label_height
The height of the label in mm.
-
label_offset
The vertical distance from the centre of the needle bearing to the bottom edge of the label. A positive value means the label is above the bearing.
-
fsd
The angle of full scale deflection (f.s.d.) of the meter movement in degrees. The software assumes the angle on either side of the vertical is half of the f.s.d.
It is only necessary to record these four parameters to use meter.py.
-
cutout_radius
The radius of the cutout around the needle bearing assembly in mm. If present, a segment will be cut from the label where the cutout circle intersects with the label.
-
screw_centres
The horizontal distance between screw holes on the meter face. The software assumes the holes are centred horizontally on the needle bearing.
-
screw_offset
The vertical distance from the centre of the needle bearing to the centre of the screw holes in mm. A positive value means the screw holes are above the bearing. Must be specified if screw_centres is specified.
-
screw_radius
The radius of the screw holes in mm. Must be specified if screw_centres is specified.
-
d
'Flattening' parameter. This specifies the location of a virtual needle bearing in mm above or below the actual bearing. The default is 0, which gives true circular arcs. Positive values are below the actual bearing, and cause a 'flattening' of the meter scales. A value of 40 is quite pleasing.
-
landscape
If this value is True then the resulting SVG file will be drawn with a landscape orientation, otherwise it will be portrait. The default is True.
Once we have recorded the dimensions of the label, we can write some code to draw it, and then add some scales.
Next: A Simple Example