Area.makeSections() - sliptonic/FreeCAD GitHub Wiki

makeSections( mode=2, project=false, heights=[], plane=None): Make a list of area holding the sectioned children shapes on given heights

  • mode(2): 0=Absolute,1=BoundBox,2=Workplane. Section offset coordinate mode. 'Absolute' means the absolute Z height (given in SectionOffset) to start slicing. 'BoundBox' means relative Z height to the bounding box of all the children shape. 'Workplane' means relative to workplane, minus SectionOffset. Note that OCC has trouble getting the minimum bounding box of some solids, particularly those with non-planar surface. It is recommended to use Workplane to specifiy the intended starting z height.

  • project(false): The section is produced by normal pojecting the outline of all added shapes to the section plane, instead of slicing.

  • heights ([]): a list of section heights, the meaning of the value is determined by 'mode'. If not specified, the current SectionCount, and SectionOffset of this Area is used.

  • plane (None): optional shape to specify a section plane. If not give, the current workplane of this Area is used if section mode is 'Workplane'.