Make docstrings ready for autodoc

This commit is contained in:
Florian Festi 2019-02-13 09:01:20 +01:00
parent c59c0c287d
commit 9b1ce265bf
3 changed files with 11 additions and 4 deletions

View File

@ -762,7 +762,7 @@ class Boxes:
:param radius: distance center to one of the corners :param radius: distance center to one of the corners
:param h: distance center to one of the sides (height of sector) :param h: distance center to one of the sides (height of sector)
:param side: length of one side :param side: length of one side
:return (radius, h, side) :return: (radius, h, side)
""" """
if radius: if radius:
side = 2 * math.sin(math.radians(180.0/corners)) * radius side = 2 * math.sin(math.radians(180.0/corners)) * radius

View File

@ -1251,6 +1251,7 @@ Values:
* eyes_per_hinge : 5 : pieces per hinge * eyes_per_hinge : 5 : pieces per hinge
* hinges : 2 : number of hinges per edge * hinges : 2 : number of hinges per edge
* style : inside : style of hinge used * style : inside : style of hinge used
* relative (in multiples of thickness) * relative (in multiples of thickness)
* eye : 1.5 : radius of the eye (in multiples of thickness) * eye : 1.5 : radius of the eye (in multiples of thickness)

View File

@ -1,5 +1,7 @@
#! /usr/bin/env python #! /usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""
''' '''
Copyright (C) 2007 Aaron Spike (aaron @ ekips.org) Copyright (C) 2007 Aaron Spike (aaron @ ekips.org)
Copyright (C) 2007 Tavmjong Bah (tavmjong @ free.fr) Copyright (C) 2007 Tavmjong Bah (tavmjong @ free.fr)
@ -67,9 +69,11 @@ def point_on_circle(radius, angle):
### Undercut support functions ### Undercut support functions
def undercut_min_teeth(pitch_angle, k=1.0): def undercut_min_teeth(pitch_angle, k=1.0):
""" computes the minimum tooth count for a """
spur gear so that no undercut with the given pitch_angle (in deg) computes the minimum tooth count for a
and an addendum = k * metric_module, where 0 < k < 1 spur gear so that no undercut with the given pitch_angle (in deg)
and an addendum = k * metric_module, where 0 < k < 1
Note: Note:
The return value should be rounded upwards for perfect safety. E.g. The return value should be rounded upwards for perfect safety. E.g.
min_teeth = int(math.ceil(undercut_min_teeth(20.0))) # 18, not 17 min_teeth = int(math.ceil(undercut_min_teeth(20.0))) # 18, not 17
@ -133,7 +137,9 @@ def generate_rack_points(tooth_count, pitch, addendum, pressure_angle,
base_height, tab_length, clearance=0, draw_guides=False): base_height, tab_length, clearance=0, draw_guides=False):
""" Return path (suitable for svg) of the Rack gear. """ Return path (suitable for svg) of the Rack gear.
- rack gear uses straight sides - rack gear uses straight sides
- involute on a circle of infinite radius is a simple linear ramp - involute on a circle of infinite radius is a simple linear ramp
- the meshing circle touches at y = 0, - the meshing circle touches at y = 0,
- the highest elevation of the teeth is at y = +addendum - the highest elevation of the teeth is at y = +addendum
- the lowest elevation of the teeth is at y = -addendum-clearance - the lowest elevation of the teeth is at y = -addendum-clearance