# Python: module fabmetheus_utilities.svg_writer

fabmetheus_utilities.svg_writer ($Date: 2008/02/05 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/fabmetheus_utilities/svg_writer.py

`Svg_writer is a class and collection of utilities to read from and write to an svg file.
Svg_writer uses the layer_template.svg file in the templates folder in the same folder as svg_writer, to output an svg file.`

Modules

``

__init__ cStringIO | fabmetheus_utilities.euclidean fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret | fabmetheus_utilities.gcodec math | os

Classes

``

SVGWriter

class SVGWriter
`` | `A base class to get an svg skein from a carving.`

Methods defined here:

__init__(self, addLayerTemplateToSVG, carving, decimalPlacesCarried, perimeterWidth=None)

addLayerBegin(self, layerIndex, rotatedBoundaryLayer)
  `Add the start lines for the layer.`

addRotatedLoopLayerToOutput(self, layerIndex, rotatedBoundaryLayer)
  `Add rotated boundary layer to the output.`

addRotatedLoopLayersToOutput(self, rotatedBoundaryLayers)
  `Add rotated boundary layers to the output.`

getReplacedSVGTemplate(self, fileName, procedureName, rotatedBoundaryLayers, xmlElement)
  `Get the lines of text from the layer_template.svg file.`

getRounded(self, number)
  `Get number rounded to the number of carried decimal places as a string.`

getRoundedComplexString(self, point)
  `Get the rounded complex string.`

getSVGStringForLoop(self, loop)
  `Get the svg loop string.`

getSVGStringForLoops(self, loops)
  `Get the svg loops string.`

getSVGStringForPath(self, path)
  `Get the svg path string.`

getTransformString(self)
  `Get the svg transform string.`

setMetadataNoscriptElement(self, prefix, value)
  `Set the metadata value and the NoJavascript text.`

Functions

``

getCarving(fileName)
  `Get a carving for the file using an import plugin.`

getSVGByLoopLayers(addLayerTemplateToSVG, rotatedLoopLayers, svgCarving)
  `Get the svg text.`

getSliceDictionary(xmlElement)
  `Get the metadata slice attribute dictionary.`

getTruncatedRotatedBoundaryLayers(repository, rotatedBoundaryLayers)
  `Get the truncated rotated boundary layers.`

setSVGCarvingCorners(rotatedLoopLayers, svgCarving)
  `Parse SVG text and store the layers.`

Data
`` |  | __author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __date__ = '$Date: 2008/02/05 $' __license__ = 'GPL 3.0' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)