concreteproperties.pre.CPGeomConcrete#
- class CPGeomConcrete(geom, material)[source]#
Bases:
CPGeom
concreteproperties Geometry class for concrete geometries.
Inits the CPGeomConcrete class.
- Parameters
geom (
Polygon
) – Shapely polygon defining the geometrymaterial (
Concrete
) – Material to apply to the geometry
Methods
Calculates the area of the geometry.
Calculates the centroid of the geometry.
Calculates the minimum and maximum
x
andy
values among the points describing the geometry.Generates a list of facets given a list of points and a facet offset.
Creates a shapely line string defined by a
point
andvector
and bounded bybounds
.Creates a list of points and facets from a shapely polygon.
Plots the geometry.
Rounds the coordinates in
geometry
to tolerancetol
.Sorts polygons that are above and below the line.
Splits the geometry about a line.
Converts self to a sectionproperties geometry object.
- calculate_area()#
Calculates the area of the geometry.
- Returns
float
– Geometry area
- calculate_centroid()#
Calculates the centroid of the geometry.
- Returns
Tuple
[float
,float
] – Geometry centroid
- calculate_extents()#
Calculates the minimum and maximum
x
andy
values among the points describing the geometry.- Returns
Tuple
[float
,float
,float
,float
] – Extents (x_min
,x_max
,y_min
,y_max
)
- create_facets(points_list, offset=0)#
Generates a list of facets given a list of points and a facet offset.
- Parameters
points_list (
List
[Tuple
[float
,float
]]) – List of ordered points to create facets fromoffset (
int
, default:0
) – Facet offset integer
- Returns
List
[Tuple
[int
,int
]] – List of facets
- create_line_segment(point, vector, bounds)#
Creates a shapely line string defined by a
point
andvector
and bounded bybounds
.- Parameters
point (
Tuple
[float
,float
]) – Point on linevector (
Tuple
[float
,float
]) – Vector defining direction of linebounds (
Tuple
[float
,float
,float
,float
]) – Bounds of the geometry
- Returns
LineString
– Shapely line string
- create_points_and_facets(geometry)#
Creates a list of points and facets from a shapely polygon.
- Parameters
geometry (
Polygon
) – Shapely polygon from which to create points and facets- Returns
Tuple
[List
[Tuple
[float
,float
]],List
[Tuple
[int
,int
]]] – Points and facets
- plot_geometry(title='Cross-Section Geometry', **kwargs)#
Plots the geometry.
- Parameters
title (
str
, default:'Cross-Section Geometry'
) – Plot titlekwargs – Passed to
plot_geometry()
- Returns
Axes
– Matplotlib axes object
- round_geometry(geometry, tol)#
Rounds the coordinates in
geometry
to tolerancetol
.- Parameters
geometry (
Polygon
) – Geometry to roundtol (
int
) – Number of decimal places to round
- Returns
Polygon
– Rounded geometry
- sort_polys(polys, point, vector)#
Sorts polygons that are above and below the line.
- Parameters
polys (
List
[Polygon
]) – Polygons to sortpoint (
Tuple
[float
,float
]) – Point on linevector (
Tuple
[float
,float
]) – Vector defining direction of line
- Returns
Tuple
[List
[Polygon
],List
[Polygon
]] – Polygons above and below the line
- split_section(point, theta)#
Splits the geometry about a line.