CPGeom¶
- class concreteproperties.pre.CPGeom(geom: Polygon, material: Material)[source]¶
Bases:
objectA
concretepropertiesgeometry object.A watered down implementation of the
sectionpropertiesGeometryobject, optimised forconcreteproperties.Methods
Calculates the area of the geometry.
Calculates the centroid of the geometry.
Calculates the extents of the geometry.
Generates a list of facets given a list of points and a facet offset.
Creates a
shapelyline.Creates a list of points and facets from a shapely polygon.
Plots the geometry.
Rounds the coordinates in
geometryto tolerancetol.Sorts polygons that are above and below the line.
Splits the geometry about a line.
Converts self to a sectionproperties geometry object.
- round_geometry(geometry: Polygon, tol: int) Polygon[source]¶
Rounds the coordinates in
geometryto tolerancetol.
- create_points_and_facets(geometry: Polygon) tuple[list[tuple[float, float]], list[tuple[int, int]]][source]¶
Creates a list of points and facets from a shapely polygon.
- create_facets(points_list: list[tuple[float, float]], offset: int = 0) list[tuple[int, int]][source]¶
Generates a list of facets given a list of points and a facet offset.
- calculate_area() float[source]¶
Calculates the area of the geometry.
- Returns:
Geometry area
- Return type:
- calculate_extents() tuple[float, float, float, float][source]¶
Calculates the extents of the geometry.
Calculates the minimum and maximum
xandyvalues among the points describing the geometry.
- split_section(point: tuple[float, float], theta: float) tuple[list[CPGeom], list[CPGeom]][source]¶
Splits the geometry about a line.
- create_line_segment(point: tuple[float, float], vector: tuple[float, float], bounds: tuple[float, float, float, float]) LineString[source]¶
Creates a
shapelyline.Creates a
shapelyline string defined by apointandvectorand bounded bybounds.
- sort_polys(polys: list[Polygon] | GeometrySequence, point: tuple[float, float], vector: tuple[float, float]) tuple[list[Polygon], list[Polygon]][source]¶
Sorts polygons that are above and below the line.
- plot_geometry(title: str = 'Cross-Section Geometry', **kwargs) matplotlib.axes.Axes[source]¶
Plots the geometry.
- Parameters:
title (str) – Plot title
kwargs – Passed to
plot_geometry()
- Returns:
Matplotlib axes object
- Return type: