m_n_kappa.geometry.ComposedGeometry#

class m_n_kappa.geometry.ComposedGeometry#

Bases: object

Geometry consisting of basic geometries

New in version 0.1.0.

Supported basic geometries must inherit Geometry:

See also

IProfile

composed geometry consisting of several Rectangle forming an I

UPEProfile

composed geometry consisting of several Rectangle forming an U

RebarLayer

composed geometry consisting of several Circle

Examples

Building a ComposedGeometry is as easy as adding two basic geometries together:

>>> from m_n_kappa import Rectangle
>>> rectangle_top = Rectangle(top_edge=0.0, bottom_edge = 10.0, width=10.0)
>>> rectangle_bottom = Rectangle(top_edge=10.0, bottom_edge = 20.0, width=10.0)
>>> composed_geometry = rectangle_top + rectangle_bottom
>>> composed_geometry
ComposedGeometry(geometries=[Rectangle(top_edge=0.00, bottom_edge=10.00, width=10.00, left_edge=-5.00, right_edge=5.00), Rectangle(top_edge=10.00, bottom_edge=20.00, width=10.00, left_edge=-5.00, right_edge=5.00)])

Adding another basic geometry is also easily done. This applies also for adding one composed geometry to another.

>>> rectangle_3 = Rectangle(top_edge=20.0, bottom_edge = 30.0, width=10.0)
>>> composed_geometry += rectangle_3
>>> composed_geometry
ComposedGeometry(geometries=[Rectangle(top_edge=0.00, bottom_edge=10.00, width=10.00, left_edge=-5.00, right_edge=5.00), Rectangle(top_edge=10.00, bottom_edge=20.00, width=10.00, left_edge=-5.00, right_edge=5.00), Rectangle(top_edge=20.00, bottom_edge=30.00, width=10.00, left_edge=-5.00, right_edge=5.00)])

The composed geometry is also easily combined by adding a Material like Steel merging to a Crosssection

>>> from m_n_kappa import Steel
>>> steel = Steel(f_y = 300.0, f_u = 350.0, failure_strain=0.25)
>>> cross_section = composed_geometry + steel
>>> cross_section
Crosssection(sections=sections)

Attributes

geometries

number of Geometry instances

property geometries: list#

number of Geometry instances