Writers

These classes can write documents of various types

Native Open Rocket Document

class openrocketdoc.writers.Document

Bases: object

Write Open Rocket Doc

dump(ordoc)

Return a string yaml formated native Open Rocket Doc

RockSim Engine

class openrocketdoc.writers.RockSimEngine

Bases: object

RockSim Engine file format writter

dump(engine)

Return a str of the file

Parameters:engine (openrocketdoc.document.Engine) – The OpenRocketDoc engine to write
Returns:(str) formated file

RASP Engine

class openrocketdoc.writers.RaspEngine

Bases: object

Write a RASP engine file format

Members:

dump(engine)

Return a str of the file output

Parameters:engine (openrocketdoc.document.Engine) – The OpenRocketDoc engine to write
Returns:(str) formated file

SVG Image

class openrocketdoc.writers.SVG(rocket, page='A4')

Bases: object

Draw an representation of a rocket as an SVG document

Members:

A4 = {'px': (3508, 2480), 'mm': (297, 210)}
SCALES = [0.010416666666666666, 0.015625, 0.020833333333333332, 0.041666666666666664, 0.0625, 0.08333333333333333, 0.125, 0.25, 0.5, 1.0]
classmethod dump(ordoc, drawscale=True, drawborder=True, annotate=True)

Return a str entire svg drawing of the rocket

Parameters:
  • ordoc – the OpenRocketDoc document to draw
  • drawscale (bool) – (optional) if true, draws a scale bar in the document.
  • drawborder (bool) – (optional) if true, draws an engineering border around the document.
Returns:

str SVG document