Facet#
- class planestress.pre.geometry.Facet(pt1: Point, pt2: Point)[source]#
Bases:
objectClass describing a facet of a 2D geometry, i.e. an edge.
- Parameters:
- Variables:
idx (int) – Facet index.
Methods
Converts the line to a
shapelyLineobject.Converts the facet to a tuple.
If the facet contains the point
old, replace withnew.Tests whether or not a facet is zero length.
Attributes
pt1pt2idx- to_tuple() tuple[float, float][source]#
Converts the facet to a tuple.
- Raises:
RuntimeError – If a point in the facet hasn’t been assigned an index.
- Returns:
Facetin tuple format (pt1_idx,pt2_idx).- Return type:
- to_shapely_line() LineString[source]#
Converts the line to a
shapelyLineobject.- Returns:
Facetas ashapely.LineString.- Return type: