Section#

In GeoGeometry a Section is a collection of 2D objects representing the intersection between a plane and any type of geometry. That’s why a plane object is required in the constructor of Section objects:

section = geogeometry.Section(name="MySection", plane=some_plane)

The intersection process is not Section’s job. In GeoGeometry, all geometry objects handle independently the plane intersection process:

triangulation = geogeometry.Triangulation()
triangulation.addToCrossSection(section=section)

polyline = geogeometry.Polyline()
polyline.addToCrossSection(section=section)

Section objects hold reference to the intersected objects and their corresponding intersection data. This data is handled by SectionResult objects. Each geometry type has its own SectionResult sub-class:

>>> for r in section.getResults():
>>>     print(r)
TriangulationSectionResult
PolylineSectionResult

These SectionResult objects know how to treat their intersection data, and also how to plot themselves in a 2D space. Therefore, if a section needs to be plotted, it’s inner SectionResult objects just plot themselves:

section.plot()