The Section plane object and tools. More...
Classes | |
class | SectionPlaneTaskPanel |
Functions | |
def | closeViewer (name) |
def | getCameraData (floatlist) |
def | getCoinSVG (cutplane, objs, cameradata=None, linewidth=0.2, singleface=False, facecolor=None) |
def | getCutShapes (objs, cutplane, onlySolids, clip, joinArch, showHidden, groupSshapesByObject=False) |
def | getDXF (obj) |
def | getFillForObject (o, defaultFill, source) |
def | getSectionData (source) |
def | getSVG (source, renderMode="Wireframe", allOn=False, showHidden=False, scale=1, rotation=0, linewidth=1, lineColor=(0.0, 0.0, 0.0), fontsize=1, showFill=False, fillColor=(0.8, 0.8, 0.8), techdraw=False, fillSpaces=False, cutlinewidth=0, joinArch=False) |
def | isOriented (obj, plane) |
def | looksLikeDraft (o) |
def | makeSectionPlane (objectslist=None, name="Section") |
def | makeSectionView (section, name="View") |
Variables | |
bool | ISRENDERING = False |
Detailed Description
The Section plane object and tools.
This module provides tools to build Section plane objects. It also contains functionality to produce SVG rendering of section planes, to be used in TechDraw and Drawing modules
Function Documentation
◆ closeViewer()
def ArchSectionPlane.closeViewer | ( | name | ) |
Close temporary viewers
References ArchCommands.getDefaultColor(), getDXF(), and DraftVecUtils.project().
Referenced by getCoinSVG().
◆ getCameraData()
def ArchSectionPlane.getCameraData | ( | floatlist | ) |
reconstructs a valid camera data string from stored values
Referenced by getSVG().
◆ getCoinSVG()
def ArchSectionPlane.getCoinSVG | ( | cutplane, | |
objs, | |||
cameradata = None , |
|||
linewidth = 0.2 , |
|||
singleface = False , |
|||
facecolor = None |
|||
) |
Returns an SVG fragment generated from a coin view
References closeViewer(), WorkingPlane.plane, and DraftVecUtils.project().
Referenced by getSVG().
◆ getCutShapes()
def ArchSectionPlane.getCutShapes | ( | objs, | |
cutplane, | |||
onlySolids, | |||
clip, | |||
joinArch, | |||
showHidden, | |||
groupSshapesByObject = False |
|||
) |
returns a list of shapes (visible, hidden, cut lines...) obtained from performing a series of booleans against the given cut plane
References ArchCommands.getCutVolume().
◆ getDXF()
def ArchSectionPlane.getDXF | ( | obj | ) |
returns a DXF representation from a TechDraw/Drawing view
References getCutShapes(), and getSectionData().
Referenced by closeViewer(), and importDXF.getViewDXF().
◆ getFillForObject()
def ArchSectionPlane.getFillForObject | ( | o, | |
defaultFill, | |||
source | |||
) |
returns a color tuple from an object's material
Referenced by getSVG().
◆ getSectionData()
def ArchSectionPlane.getSectionData | ( | source | ) |
◆ getSVG()
def ArchSectionPlane.getSVG | ( | source, | |
renderMode = "Wireframe" , |
|||
allOn = False , |
|||
showHidden = False , |
|||
scale = 1 , |
|||
rotation = 0 , |
|||
linewidth = 1 , |
|||
lineColor = (0.0,0.0,0.0) , |
|||
fontsize = 1 , |
|||
showFill = False , |
|||
fillColor = (0.8,0.8,0.8) , |
|||
techdraw = False , |
|||
fillSpaces = False , |
|||
cutlinewidth = 0 , |
|||
joinArch = False |
|||
) |
returns an SVG fragment from an Arch SectionPlane or BuildingPart. If allOn is True, all cut objects are shown, regardless if they are visible or not. renderMode can be Wireframe (default) or Solid to use the Arch solid renderer. If showHidden is True, the hidden geometry above the section plane is shown in dashed line. If showFill is True, the cut areas get filled with a pattern. lineColor -- Color of lines for the renderMode "Wireframe". fillColor -- If showFill is True and renderMode is "Wireframe", the cut areas are filled with fillColor. fillSpaces - If True, shows space objects as filled surfaces
References getCameraData(), getCoinSVG(), getCutShapes(), getFillForObject(), getSectionData(), Draft.getSVG, isOriented(), looksLikeDraft(), and WorkingPlane.plane.
◆ isOriented()
def ArchSectionPlane.isOriented | ( | obj, | |
plane | |||
) |
determines if an annotation is facing the cutplane or not
Referenced by getSVG().
◆ looksLikeDraft()
def ArchSectionPlane.looksLikeDraft | ( | o | ) |
Does this object look like a Draft shape? (flat, no solid, etc)
Referenced by getSVG().
◆ makeSectionPlane()
def ArchSectionPlane.makeSectionPlane | ( | objectslist = None , |
|
name = "Section" |
|||
) |
makeSectionPlane([objectslist]) : Creates a Section plane objects including the given objects. If no object is given, the whole document will be considered.
◆ makeSectionView()
def ArchSectionPlane.makeSectionView | ( | section, | |
name = "View" |
|||
) |
makeSectionView(section) : Creates a Drawing view of the given Section Plane in the active Page object (a new page will be created if none exists
Variable Documentation
◆ ISRENDERING
bool ArchSectionPlane.ISRENDERING = False |