TechDraw API/it: Difference between revisions

From FreeCAD Documentation
(Created page with "TechDraw API")
 
Line 19: Line 19:




[[Category:API]]
[[Category:API/it]]
[[Category:Poweruser Documentation]]
[[Category:Poweruser Documentation/it]]


{{clear}}
{{clear}}

Revision as of 00:25, 6 September 2016

These functions are part of the TechDraw module and can be used in scripts and macros or from the python interpreter, once the TechDraw module has been imported.

Example:

import FreeCAD
import TechDraw
page = FreeCAD.ActiveDocument.addObject('TechDraw::DrawPage','Page')
FreeCAD.ActiveDocument.addObject('TechDraw::DrawSVGTemplate','Template')
FreeCAD.ActiveDocument.Template.Template = templateFileSpec
FreeCAD.ActiveDocument.Page.Template = FreeCAD.ActiveDocument.Template
page.ViewObject.show()
view = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewPart','View')
rc = page.addView(view)


EdgeWalker(listOfEdges, [bool])

Description: Creates wires from edges in input by planar graph traversal. Optionally exclude the OuterWire by setting optional parameter to false.

Returns: List of wires sorted by size (descending)

findOuterWire(listOfEdges)

Description: Finds the OuterWire (largest) of a list of edges (that form a planar graph).

Returns: Outer wire