ArchSectionPlane Namespace Reference

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=(1.0, 1.0, 1.0), 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")
 
def update_svg_cache (source, renderMode, showHidden, showFill, fillSpaces, joinArch, allOn, objs)
 

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)

◆ getCameraData()

def ArchSectionPlane.getCameraData (   floatlist)
reconstructs a valid camera data string from stored values

◆ 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().

Referenced by getDXF(), and getSVG().

◆ getDXF()

def ArchSectionPlane.getDXF (   obj)
Return a DXF representation from a TechDraw/Drawing view.

References getCutShapes(), and getSectionData().

Referenced by 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)
Returns some common data from section planes and building parts

Referenced by getDXF(), and getSVG().

◆ 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 = (1.0, 1.0, 1.0),
  techdraw = False,
  fillSpaces = False,
  cutlinewidth = 0,
  joinArch = False 
)
Return an SVG fragment from an Arch SectionPlane or BuildingPart.

allOn
    If it is `True`, all cut objects are shown, regardless of if they are
    visible or not.

renderMode
    Can be `'Wireframe'` (default) or `'Solid'` to use the Arch solid
    renderer.

showHidden
    If it is `True`, the hidden geometry above the section plane
    is shown in dashed line.

showFill
    If it is `True`, the cut areas get filled with a pattern.

lineColor
    Color of lines for the `renderMode` is `'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 getCoinSVG(), getCutShapes(), getFillForObject(), getSectionData(), isOriented(), looksLikeDraft(), WorkingPlane.plane, and update_svg_cache().

Referenced by closeViewer().

◆ 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" 
)
OBSOLETE
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

References makeSectionView().

Referenced by makeSectionView().

◆ update_svg_cache()

def ArchSectionPlane.update_svg_cache (   source,
  renderMode,
  showHidden,
  showFill,
  fillSpaces,
  joinArch,
  allOn,
  objs 
)
Returns None or cached SVG, clears shape cache if required

Referenced by getSVG().

Variable Documentation

◆ ISRENDERING

bool ArchSectionPlane.ISRENDERING = False