Package theia :: Package rendering :: Module writer
[hide private]
[frames] | no frames]

Module writer

source code

Writer module for theia, to write CAD content to files.

Functions [hide private]
 
writeToCAD(component, doc)
Write the relevant shape and feature content of components in CAD file.
source code
 
writeTree(tree, doc)
Recursively write the shape and feature content of the beams of a tree.
source code
Function Details [hide private]

writeToCAD(component, doc)

source code 
Write the relevant shape and feature content of components in CAD file.

This function is for everython except for beams.
To the doc .fcstd file are added two objects, one of type
    App::FeaturePython which will hold the internal data of the component
    for reviewing in the side panel of FreeCAD, and one of type
    Part::Feature for visualization. The classes for the App::FeaturePython
    objects are i nthe features modules, and those for the shapes are in
    the shapes module.
The important functions are the PythonFeatures
    constructors found in features, and the shape functions found in shapes.

component: component to represent. [Mirror, Lens, BeamDump, Ghost, Beam]
doc: CAD file to write to. [CAD file]

No return value.

writeTree(tree, doc)

source code 
Recursively write the shape and feature content of the beams of a tree.

If the tree's root is not None, write the shape and feature for tree.Root
    and start over for the daughter trees.

tree: beamtree to write the info. [BeamTree]
doc: CAD file to write to. [CAD file]

No return value.