Skip to content

fix: Update GenericSection to accept SurfaceGeometry#130

Merged
mortenengen merged 1 commit intodevfrom
fix_accept_only_compound
Aug 7, 2024
Merged

fix: Update GenericSection to accept SurfaceGeometry#130
mortenengen merged 1 commit intodevfrom
fix_accept_only_compound

Conversation

@talledodiego
Copy link
Collaborator

@talledodiego talledodiego commented Aug 7, 2024

Update GenericSection to work also with SurfaceGeometry as input.

This fix an issue mentioned in #113

# Materials
concrete = ConcreteEC2_2004(25)
# Create section
poly = Polygon(((0, 0), (350, 0), (350, 500), (0, 500)))
geo = SurfaceGeometry(poly, concrete)
# Section from SurfaceGeometry
sec = GenericSection(geo)
print(f"Area = {sec.gross_properties.area*1e-2} cm2")

# Section from CompoundGeometry
sec = GenericSection(CompoundGeometry([geo]))
print(f"Area = {sec.gross_properties.area*1e-2} cm2") 

now both definition works and the output is:

Area = 1750.0 cm2
Area = 1750.0 cm2

Update GenericSection to work also with SurfaceGeometry as input
@mortenengen mortenengen added the enhancement New feature or request label Aug 7, 2024
@mortenengen mortenengen changed the title Update GenericSection fix: Update GenericSection to accept SurfaceGeometry Aug 7, 2024
Copy link
Member

@mortenengen mortenengen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix 👍

@mortenengen mortenengen merged commit e3730fd into dev Aug 7, 2024
@mortenengen mortenengen deleted the fix_accept_only_compound branch August 7, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done 🚀

Development

Successfully merging this pull request may close these issues.

2 participants