scallop dome pyformex logo

Previous topic

59. section2d — Some functions operating on 2D structures.

Next topic

61. tetgen — Interface with tetgen

[FSF Associate Member]

Valid XHTML 1.0 Transitional

60. sectionize — sectionize.py

Create, measure and approximate cross section of a Formex.

Classes defined in module sectionize

Functions defined in module sectionize

sectionize.connectPoints(F, close=False)

Return a Formex with straight segments connecting subsequent points.

F can be a Formex or data that can be turned into a Formex (e.g. an (n,3) array of points). The result is a plex-2 Formex connecting the subsequent points of F or the first point of subsequent elements in case the plexitude of F > 1. If close=True, the last point is connected back to the first to create a closed polyline.

sectionize.centerline(F, dir, nx=2, mode=2, th=0.2)

Compute the centerline in the direction dir.

sectionize.createSegments(F, ns=None, th=None)

Create segments along 0 axis for sectionizing the Formex F.

sectionize.sectionize(F, segments, th=0.1, visual=True)

Sectionize a Formex in planes perpendicular to the segments.

F is any Formex. segments is a plex-2 Formex.

Planes are chosen in each center of a segment, perpendicular to that segment. Then parts of the Formex F are selected in the neighbourhood of each plane. Each part is then approximated by a circle in that plane.

th is the relative thickness of the selected part of the Formex. If th = 0.5, that part will be delimited by two planes in the endpoints of and perpendicular to the segments.

sectionize.drawCircles(sections, ctr, diam)

Draw circles as approximation of Formices.