m_n_kappa.geometry.ComposedGeometry#
- class m_n_kappa.geometry.ComposedGeometry#
Bases:
objectGeometry consisting of basic geometries
New in version 0.1.0.
Supported basic geometries must inherit
Geometry:See also
IProfilecomposed geometry consisting of several
Rectangleforming anIUPEProfilecomposed geometry consisting of several
Rectangleforming anURebarLayercomposed geometry consisting of several
Circle
Examples
Building a
ComposedGeometryis 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
MateriallikeSteelmerging to aCrosssection>>> 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
number of
Geometryinstances