Chiplotle Compound Commands — Chiplotle v0.2 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Chiplotle »
- Chiplotle v0.2 documentation »
- Chiplotle API »

# Chiplotle Compound Commands

class `chiplotle.hpgl.compound.` `Circle`(xy, radius, chord=None, filled=False, pen=None)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Circle with absolute position.

class `chiplotle.hpgl.compound.` `Container`(xy, shapes=None, pen=None)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Generic container.

  `append`(arg)
  `extend`(arg)
  `insert`(i, arg)
  `pop`(indx)
  `remove`(arg)

class `chiplotle.hpgl.compound.` `Cross`(xy, width, height, rotation=0, pen=None)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Cross. Can be rotated.

class `chiplotle.hpgl.compound.` `Cube`(xy, width, height, depth, rotation=(0, 0, 0), pen=None)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  A 3D Cube. Can be rotated on x, y, and z.

class `chiplotle.hpgl.compound.` `DorkbotLabel`(xy, text, cell_shape='square', pen=None, fill_pen=None, width=None, height=None, outline_jitter=None, fill_jitter=None)
  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

class `chiplotle.hpgl.compound.` `FancyLabel`(xy, text, font, cell_shape, pen=None, width=None, height=None, jitter=None)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  FancyLabel.

  Write text with arbitrary Chiplotle-font and arbitrary cell shape.

  - xy: (x, y) position of the label.

  - text: a string of the text to be printer.

  - font: the Chiplotle-font to use. This should be a valid Chiplotle-font.

      Chiplotle-fonts live in chiplotle/fonts.

  - cell_shape : the Chiplotle-HPGL shape to use to draw each cell.

      These can be simple Chiplotle-HPGL commands or Compound commands.

  - pen: the pen to use [1 to 8].

  - width: the width of each character. May be a number or None.

  - height: the height of each character. May be a number or None.

  - jitter : an (x, y) tuple indicating the ammount of randomness added

      to each of the cells making up each character.

class `chiplotle.hpgl.compound.` `Grid`(xy, width, height, height_divisions, width_divisions, pen=None)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Rectangular grid.

  - xy : `tuple`, (x, y) position.

  - width : `int` or `float`, width of the rectangle.

  - height : `int` or `float`, height of the rectangle.

  - width_divisions : `int`, number of horizontal equidistant partitions.

  - horizontal_divisions : `int`, number of vertical equidistant

      partitions.

  - pen : `int`, pen number.

class `chiplotle.hpgl.compound.` `GroovyFrame`(xy, wh1, wh2, linesPerSide, pen=None)
  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

class `chiplotle.hpgl.compound.` `Label`(xy, text)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Text label.

  - xy: 2-tuple of coordinates pair for label location.

  - text: The actual text to be printed.

  - charsize: 2-tuple (w, h) pair defining the absolute character size.

  - direction: 2-tuple. The inclination / angle of the text:

      run (direction on x axis), rise (direction on y axis).

  - charspace: Factor to set spacing between characters.

      Positive separates, negatives bring together.

  - linespace: Factor to set spacing between lines.

      Positive separates, negatives bring together.

  - origin: location of label relative to pen’s current location.

      Possible values:

      > . | Left | Inside | Right
      > --- | --- | --- | ---
      > Above | 3 | 6 | 9
      > Inside | 2 | 5 | 8
      > Below | 1 | 4 | 7

      > If 10 is added to the above-mentioned location number, positions (except 5) will be offset towards the center by 1/2 the character width and 1/2 the character height.

  - slant: slant of characters (italic). Possible values: [0-1).

      0 is vertical, 0.5 is 45 degs., ...

  - vertical: Print text from left to right (False) or top down (True).

  `charsize`

class `chiplotle.hpgl.compound.` `Line`(x1, y1, x2, y2)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Line at absolute position.

class `chiplotle.hpgl.compound.` `MayaNumber`(xy, value, size=500)
  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

class `chiplotle.hpgl.compound.` `Pen`(number, velocity=None, force=None, acceleration=None, thickness=None)

  Bases: `object`

  The Pen class houses the following HPGL pen settable properties:
    AS, FS, SP and VS.
  - number : `int` [1 to 8] pen number.
  - velocity : `int` [1 to 60] pen velocity.
  - force : `int` pen force.
  - acceleration : `int` [1 to 4] pen velocity.
  - thickness : `float` [0.1 to 5] mm.
  `format`

class `chiplotle.hpgl.compound.` `RandomWalk`(xy, steps, stepSize=500)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Random Walk.

class `chiplotle.hpgl.compound.` `Rectangle`(xy, width, height, rotation=0)

  Bases: `chiplotle.hpgl.compound.compound._CompoundHPGL`

  Compound Rectangle. Can be rotated. Cannot be filled

### Navigation

- index
- modules |
- next |
- previous |
- Chiplotle »
- Chiplotle v0.2 documentation »
- Chiplotle API »