PlanarGeometry

class xgbxml.xgbxml.PlanarGeometry[source]
get_area()[source]

Returns the area of the polygon described by the PlanarGeometry.

Return type:

float

get_coordinates()[source]

Returns the coordinates of the polyloop child element.

Returns:

Point_coordinates where each point_coordinate is a tuple of the (x,y,(z)) coordinates of a CartesianPoint.

Return type:

tuple(tuple(float))

get_shell()[source]

Returns the shell of the polyloop child element.

Return type:

tuple(tuple(float))

render(ax=None, set_lims=True, outline_kwargs=None, fill_kwargs=None)[source]

Renders the PlanarGeometry in 3D using matplotlib.

Parameters:
  • ax (matplotlib.axes._subplots.Axes3DSubplot) – A matplotlib 3D Axes instance. Optional, if not supplied then an axis is created and returned.

  • set_lims (bool) – If True, then the x, y and z axis limits are set automatically based on the geometry being rendered.

  • outline_kwargs – matplotlib keywork arguments for formatting the outlines (passed to ax.plot method).

  • fill_kwargs – matplotlib keywork arguments for formatting the fill (passed to Poly3DCollection method).

Returns:

The axis instance.

Return type:

matplotlib.axes._subplots.Axes3DSubplot

set_shell(shell)[source]

Creates new coordinate points for the PlanarGeometry.

Parameters:

shell (tuple(tuple(float))) – The exterior points of a polygon (first and lost point of shell are the same).