Existing Parts

A couple of commands can create whole parts like walls. Typically the sizes given are the inner dimension not including additional space needed for burn compensation or joints.

Currently there are the following parts:

Boxes.rectangularWall(x, y, edges='eeee', ignore_widths=[], holesMargin=None, holesSettings=None, bedBolts=None, bedBoltSettings=None, callback=None, move=None, label='')[source]

Rectangular wall for all kind of box like objects

Parameters:
  • x – width

  • y – height

  • edges – (Default value = “eeee”) bottom, right, top, left

  • ignore_widths – list of edge_widths added to adjacent edge

  • holesMargin – (Default value = None)

  • holesSettings – (Default value = None)

  • bedBolts – (Default value = None)

  • bedBoltSettings – (Default value = None)

  • callback – (Default value = None)

  • move – (Default value = None)

  • label – rendered to identify parts, it is not meant to be cut or etched (Default value = “”)

Boxes.flangedWall(x, y, edges='FFFF', flanges=None, r=0.0, callback=None, move=None, label='')[source]

Rectangular wall with flanges extending the regular size

This is similar to the rectangularWall but it may extend to either side. Sides with flanges may only have e, E, or F edges - the later being replaced with fingerHoles.

Parameters:
  • x – width

  • y – height

  • edges – (Default value = “FFFF”) bottom, right, top, left

  • flanges – (Default value = None) list of width of the flanges

  • r – radius of the corners of the flange

  • callback – (Default value = None)

  • move – (Default value = None)

  • label – rendered to identify parts, it is not meant to be cut or etched (Default value = “”)

Boxes.rectangularTriangle(x, y, edges='eee', r=0.0, num=1, bedBolts=None, bedBoltSettings=None, callback=None, move=None, label='')[source]

Rectangular triangular wall

Parameters:
  • x – width

  • y – height

  • edges – (Default value = “eee”) bottom, right[, diagonal]

  • r – radius towards the hypotenuse

  • num – (Default value = 1) number of triangles

  • bedBolts – (Default value = None)

  • bedBoltSettings – (Default value = None)

  • callback – (Default value = None)

  • move – (Default value = None)

  • label – rendered to identify parts, it is not meant to be cut or etched (Default value = “”)

Boxes.regularPolygonWall(corners=3, r=None, h=None, side=None, edges='e', hole=None, callback=None, move=None)[source]

Create regular polygon as a wall

Parameters:
  • corners – number of corners of the polygon

  • r – radius distance center to one of the corners

  • h – distance center to one of the sides (height of sector)

  • side – length of one side

  • edges – (Default value = “e”, may be string/list of length corners)

  • hole – diameter of central hole (Default value = 0)

  • callback – (Default value = None, middle=0, then sides=1..)

  • move – (Default value = None)

Boxes.polygonWall(borders, edge='f', turtle=False, correct_corners=True, callback=None, move=None, label='')[source]

Polygon wall for all kind of multi-edged objects

Parameters:
  • borders – array of distance and angles to draw

  • edge – (Default value = “f”) Edges to apply. If the array of borders contains more segments that edges, the edge will wrap. Only edge types without start and end width supported for now.

  • turtle – (Default value = False)

  • correct_corners – (Default value = True)

  • callback – (Default value = None)

  • move – (Default value = None)

  • label – rendered to identify parts, it is not meant to be cut or etched (Default value = “”)

borders is alternating between length of the edge and angle of the corner. For now neither tabs nor radii are supported. None at the end closes the polygon.

Boxes.roundedPlate(x, y, r, edge='f', callback=None, holesMargin=None, holesSettings=None, bedBolts=None, bedBoltSettings=None, wallpieces=1, extend_corners=True, move=None, label=None)[source]

Plate with rounded corner fitting to .surroundingWall()

For the callbacks the sides are counted depending on wallpieces

Parameters:
  • x – width

  • y – height

  • r – radius of the corners

  • edge

  • callback – (Default value = None)

  • holesMargin – (Default value = None) set to get hex holes

  • holesSettings – (Default value = None)

  • bedBolts – (Default value = None)

  • bedBoltSettings – (Default value = None)

  • wallpieces – (Default value = 1) # of separate surrounding walls

  • extend_corners – (Default value = True) have corners outset with the edges

  • move – (Default value = None)

  • label – (Default value = None)

Boxes.surroundingWall(x, y, r, h, bottom='e', top='e', left='D', right='d', pieces=1, extend_corners=True, callback=None, move=None)[source]

Wall(s) with flex filing around a roundedPlate()

For the callbacks the sides are counted depending on pieces

Parameters:
  • x – width of matching roundedPlate

  • y – height of matching roundedPlate

  • r – corner radius of matching roundedPlate

  • h – inner height of the wall (without edges)

  • bottom – (Default value = ‘e’) Edge type

  • top – (Default value = ‘e’) Edge type

  • left – (Default value = ‘D’) left edge(s)

  • right – (Default value = ‘d’) right edge(s)

  • pieces – (Default value = 1) number of separate pieces

  • callback – (Default value = None)

  • move – (Default value = None)

Parts Class

More parts are available in a separate class. An instance is available as Boxes.parts

Parts.disc(diameter: float, hole: float = 0, dwidth: float = 1.0, callback: Callable | None = None, move: str = '', label: str = '') None[source]

Simple disc

Parameters:
  • diameter – diameter of the disc

  • hole – (Default value = 0)

  • callback – (Default value = None) called in the center

  • dwidth – (Default value = 1) flatten on right side to given ratio

  • move – (Default value = “”)

  • label – (Default value = “”)

Parts.wavyKnob(diameter: float, n: int = 20, angle: float = 45, hole: float = 0, callback: Callable | None = None, move: str = '') None[source]

Disc with a wavy edge to be easier to be gripped

Parameters:
  • diameter – diameter of the knob

  • n – (Default value = 20) number of waves

  • angle – (Default value = 45) maximum angle of the wave

  • hole – (Default value = 0)

  • callback – (Default value = None) called in the center

  • move – (Default value = “”)

Parts.concaveKnob(diameter: float, n: int = 3, rounded: float = 0.2, angle: float = 70, hole: float = 0, callback: Callable | None = None, move: str = '') None[source]

Knob with dents to be easier to be gripped

Parameters:
  • diameter – diameter of the knob

  • n – (Default value = 3) number of dents

  • rounded – (Default value = 0.2) proportion of circumference remaining

  • angle – (Default value = 70) angle the dents meet the circumference

  • hole – (Default value = 0)

  • callback – (Default value = None) called in the center

  • move – (Default value = “”)

Parts.ringSegment(r_outside: float, r_inside: float, angle: float, n: int = 1, move: str = '') None[source]

Ring Segment

Parameters:
  • r_outside – outer radius

  • r_inside – inner radius

  • angle – angle the segment is spanning

  • n – (Default value = 1) number of segments

  • move – (Default value = “”)