from sectionproperties.pre import Material
from sectionproperties.pre.library import rectangular_section, channel_section
from sectionproperties.analysis import Section

# create materials
steel = Material(
    name="Steel",
    elastic_modulus=200e3,
    poissons_ratio=0.3,
    density=7.85e-6,
    yield_strength=500,
    color="grey",
)
timber = Material(
    name="Timber",
    elastic_modulus=8e3,
    poissons_ratio=0.35,
    density=6.5e-7,
    yield_strength=20,
    color="burlywood",
)

# create individual geometry objects
pfc = channel_section(d=250, b=90, t_f=15, t_w=8, r=12, n_r=8, material=steel)
rect = rectangular_section(d=350, b=120, material=timber)
pfc_right = pfc.align_center(align_to=rect).align_to(other=rect, on="right")
pfc_left = pfc_right.mirror_section(axis="y", mirror_point=(60, 0))

# combine into single geometry and mesh
geom = rect + pfc_left + pfc_right
geom.create_mesh(mesh_sizes=[50.0, 10.0, 10.0])

# create section object and plot the mesh
sec = Section(geometry=geom)
sec.plot_mesh()