Skip to content

571 feature request add basis for complex steel shapes #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 68 commits into
base: main
Choose a base branch
from

Conversation

GerjanDorgelo
Copy link
Contributor

@GerjanDorgelo GerjanDorgelo commented Apr 21, 2025

Description

Add basis for complex steel shapes, such as CHS, strips, and I-profiles. The idea is to build steel shapes from basic elemental shapes. The code has been set up like the reinforced concrete is: which is a rectangle (concrete) with inner circles (rebar). Steel elements such as I-profiles consist of 3 rectangles and 4 radii. A tube is just a single element. Using this method, it's rather easy to build your own shapes.

Also did some optimizations for speed regarding curves fix.

Fixes #571

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

…tring representations in CHSSteelProfile and StripSteelProfile tests
…SteelCrossSection for improved shape representation
…odule path and add geometry tests for CHSSteelProfile and StripSteelProfile.
…y naming and enhance geometry handling; update tests accordingly.
@GerjanDorgelo GerjanDorgelo self-assigned this Apr 21, 2025
@GerjanDorgelo GerjanDorgelo linked an issue Apr 21, 2025 that may be closed by this pull request
3 tasks
Copy link

Thank you so much for contributing to Blueprints! This is your Pull Request # 16 to this project.
Your contributions help thousands of engineers work more efficiently and accurately.

Now that you've created your pull request, please don't go away; take a look at the bottom of this page for the automated checks that should already be running. If they pass, great! If not, please click on 'Details' and see if you can fix the problem they've identified. A maintainer should be along shortly to review your pull request and help get it added!

Adjusted the docstring for better clarity, specifying that the nominal thickness of the steel element should match the cross-section thickness. This improves the documentation but does not modify any functionality.
Refactored the base steel cross-section class to use `@dataclass` for improved readability and maintainability. Renamed the class to `CombinedSteelCrossSection`, added proper type annotations, and updated methods to better align with the new structure. Improved handling of elements, polygon merging, and strength calculations for compatibility with the updated architecture.
Introduced `height` and `width` properties to calculate the cross-section's dimensions based on its polygon bounds. This enhances accessibility to geometric properties and improves usability in structural calculations.
Updated the plotter to handle `CombinedSteelCrossSection` with improved dimension labeling and refined annotations. Enhanced legend text formatting and added dynamic offset handling for better visualization. Simplified bounds calculations and streamlined the plotting logic.
Transitioned `IProfile` to use `@dataclass` for cleaner initialization and added `from_standard_profile` class method for streamlined creation of standard profiles. Refactored plotting and simplified corrosion handling logic while improving flexibility and readability.
@egarciamendez
Copy link
Member

afbeelding

@egarciamendez
Copy link
Member

afbeelding

Replaced hardcoded values with offset calculations for text positioning to improve readability and maintain consistency. This ensures dynamic adjustments based on profile dimensions, enhancing plot accuracy and layout.
Updated type hints for the `plot` method to specify the input type explicitly, improving code clarity and type checking. Added an example usage under `__main__` to demonstrate creating and plotting an `ISteelProfile`.
Converted `CHSSteelProfile` to use a dataclass for immutability and clearer attribute definitions. Introduced a `from_standard_profile` class method for constructing profiles from predefined standards. Simplified plotting functionality and removed redundant `LoadStandardCHS` class.
Added x-axis limits to the plotter using the profile's polygon bounds with an offset. This ensures consistent visualization and improves clarity in generated plots.
Rearranged the attribute order in the docstring to improve readability and maintain consistency with typical documentation standards. This ensures better comprehension for users and developers navigating the code.
Improve class documentation by adding usage examples and clarifying the distinction between custom I-profiles and standard profiles. This update provides better guidance on using the `from_standard_profile` method effectively.
@egarciamendez
Copy link
Member

afbeelding

Converted `StripSteelProfile` to a dataclass with improved initialization and profile handling. Replaced `LoadStandardStrip` with a cleaner `from_standard_profile` class method for creating instances from standard profiles, reducing redundancy and improving clarity. Enhanced the `plot` method with optional custom plotter support.
Replaced `LoadStandard*` classes with direct calls to `from_standard_profile` on steel profile classes, improving clarity and consistency. Updated imports to reflect the changes and streamlined the use of `SteelMaterial` for profile creation.
Replaced redundant initialization with `StripSteelProfile` factory methods to simplify test setup. Updated test logic to align with refactored attribute names and improved overall readability and maintainability of the test suite.
Replaced redundant initialization with `StripSteelProfile` factory methods to simplify test setup. Updated test logic to align with refactored attribute names and improved overall readability and maintainability of the test suite.
The icecream library was added to `requirements_dev.txt` to improve debugging during development. It provides a simple and intuitive way to inspect variables and program flow.
Replaced `LoadStandardCHS` with the updated `CHSSteelProfile` class interface. Enhanced test methods to use streamlined input handling and removed redundant code. Improved accuracy and clarity of test expectations.
Updated test assertions to reference attributes through `steel_element.cross_section` instead of directly accessing properties on `steel_element`. This improves consistency and aligns with the updated internal structure of the `SteelElement` class.
The function was incorrectly returning the minimum yield strength instead of the minimum ultimate strength of steel elements. This fix ensures the method aligns with its intended purpose and documentation.
Clarified the area property's docstring to explain how the area is approximated for circular cross-sections and calculated using Shapely's Polygon. Added guidance for overriding the method in derived classes for exact calculations.
…tangle.py

The `area`, `perimeter`, and `centroid` properties were removed as they are unused. Additionally, the unnecessary import of `Point` and `MM2` was cleaned up. This reduces code clutter and improves maintainability.
Added tests for yield and ultimate strength of the Strip profile. Additionally, included tests for plastic section modulus about both the y- and z-axes to enhance coverage and ensure accuracy.
Introduced unit tests for `CombinedSteelCrossSection` to validate edge cases, including handling of empty configurations and invalid elements. Added a new pytest fixture in `conftest.py` for setting up empty combined steel cross-section instances.
…r-complex-steel-shapes' into 571-feature-request-add-basis-for-complex-steel-shapes
Copy link
Member

@egarciamendez egarciamendez left a comment

Choose a reason for hiding this comment

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

@GerjanDorgelo Deze was een geweldige PR. Groot maar super mooi in elkaar gezet.
Ik heb wel wat aanpassingen gedaan aan de interface om het simpeler te maken maar in essentie verandert er niets aan wat jij in gedachten had :-)

Voor we deze mergen kijk er wel even naar of ik iets over het hoofd heb gezien of dat je ergens niet helemaal eens bent met mijn aanpassingen

@egarciamendez egarciamendez added the steel Area of expertise material label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review This MR has been reviewed, and changes are made accordingly steel Area of expertise material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[✨ Feature request]: Add basis for complex steel shapes and make plotter
2 participants