src.loc.quad_perimeter.default_perimeter_geo_neighor_helper module
- class PerimeterNeighborHelpers[source]
Bases:
object
Provides utility functions for calculating the shared perimeter lengths between neighboring cells in the default geometry that share a common edge but do not share two vertices.
- static get_default_len_perimeter_in_common(cell: Cell, neighbor: Cell) float [source]
Calculate the length of the common perimeter between two cells in default geometry.
- Parameters:
cell (Cell) – The reference cell from which the common perimeter length is calculated
neighbor (Cell) – The neighboring cell adjacemt to the ‘cell’.
- Returns:
The length of the perimeter shared by the cell and its neighbor.
- Return type:
float
- static get_overlap(cell_vs_on_shared_edge: list[Vertex], neighbor_vs_on_shared_edge: list[Vertex]) float [source]
Calculate the length of the overlap between two segments.
- Parameters:
cell_vs_on_shared_edge (list) – The vertices of the cell on the shared edge.
neighbor_vs_on_shared_edge (list) – The vertices of the neighbor on the shared edge.
- Returns:
The length of the overlap between the two segments.
- Return type:
float