Module gengeo :: Class PolygonWithLines2D

[hide private]
[frames] | no frames]

# Class PolygonWithLines2D

     object --+
              |
    ??.instance --+
                  |
            AVolume --+
                      |
              AVolume2D --+
                          |
                         PolygonWithLines2D

A class defining a polygonal volume in 2D bounded by lines.

Instance Methods | [hide private]

__init__(...) Constructs a polygon from either a list of vertices or a specified centre, radius and number of sides. |

__str__(...) str(x) |

void

addLine(...) Adds a line to the polygon for fitting particles. |

Inherited from `AVolume`: `__reduce__` Inherited from `unreachable.instance`: `__new__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]

| __instance_size__ = `1336`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(...)
(Constructor)

Constructs a polygon from either a list of vertices or a specified centre, radius and number of sides.

Parameters:
  - `corners` (boost::python::list) - list of vertices. Do not specify `centre`, `radius`, `nsides` or `smooth_edges` when using this parameter.
  - `centre` (Vector3) - Coordinates of the centre of the polygon. Do not specify `corners` when using this parameter.
  - `radius` (double) - Radius of circle enclosing the polygon. Do not specify `corners` when using this parameter.
  - `nsides` (int) - Number of sides for the polygon (maximum of 50). Do not specify `corners` when using this parameter.
  - `smooth_edges` (bool) - Adds bounding lines to edges to achieve smooth edges. Do not specify `corners` when using this parameter.
Overrides: object.__init__

### __str__(...)
(Informal representation operator)

str(x)

Overrides: object.__str__
  (inherited documentation)

### addLine(...)

Adds a line to the polygon for fitting particles.

Parameters:
  - `line` (Line2D) - the line to add to the polygon
Returns: void