Skip to content

Conversation

@GerjanDorgelo
Copy link
Contributor

@GerjanDorgelo GerjanDorgelo commented Nov 18, 2025

Description

I propose every check class being made from 4 segments:

  1. Source document, to show which (euro)code is used for the check
  2. Calculation steps, having either links to individual Formula or to other sub_checks. Usage of this will be mostly local, but could be useful to request from outside so not made actually local. I propse returning a dictionairy with keys: . As mentioned, the steps can be Formula or other checks.
  3. check. Returns the new CheckResult. if a check is made from sub_checks, it only returns the max unitycheck
  4. latex. Returns latex representation of the check. I would want that in (at least) 3 categories. long form, summary, and in a near future (i propose adding later): tables!

To solve (1), i moved files into more subfolders so we can seperate by code itself. Furthermore, a check has been written for the Normal Force (class 1, 2 and 3), which is a check made from Formula. I also initiated a steel_i_profile_strenght_class_3 check, which is a check made from other checks. For now just the Normal Force, but when we settle on the format of the Checks, i want to add moments/torsion/etc before pushing it to main.

Type of change

  • 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

@GerjanDorgelo GerjanDorgelo self-assigned this Nov 18, 2025
Copilot AI review requested due to automatic review settings November 18, 2025 14:43
@GerjanDorgelo GerjanDorgelo linked an issue Nov 18, 2025 that may be closed by this pull request
2 tasks
@github-actions
Copy link

Thank you so much for contributing to Blueprints!
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!

@GerjanDorgelo GerjanDorgelo marked this pull request as draft November 18, 2025 14:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a showcase implementation of automated steel strength checks for Class 3 I-profiles according to Eurocode 3. The implementation demonstrates a structure for performing multiple sub-checks using various formulas, specifically focusing on normal force resistance checks for both tension and compression cases.

Key changes:

  • Introduces LoadCombination dataclass to represent load combinations with clear sign conventions
  • Implements SteelIProfileStrengthClass3 with a nested NormalForceCheck class for evaluating normal force resistance
  • Provides comprehensive test coverage for both the main check class and the normal force sub-check

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
blueprints/checks/loads/load_combination.py Defines a frozen dataclass representing load combinations with detailed documentation of axis conventions and sign definitions
blueprints/checks/steel/strength/steel_i_profile_strength_class_3.py Implements the main strength check class with a nested normal force check that applies Eurocode 3 formulas for tension and compression
tests/checks/loads/test_load_combination.py Comprehensive tests for LoadCombination including initialization, equality, and hashability
tests/checks/steel/strength/test_steel_i_profile_strength_class_3.py Tests for both the main check class and the normal force sub-check, including parametrized LaTeX output validation
tests/checks/steel/strength/conftest.py Provides a reusable fixture for creating HEB300 profile instances with section properties

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (64f9df6) to head (38be8c6).

Additional details and impacted files
@@                                    Coverage Diff                                     @@
##           840-feature-request-add-first-steel-check-to-blueprints      #836    +/-   ##
==========================================================================================
  Coverage                                                   100.00%   100.00%            
==========================================================================================
  Files                                                          404       406     +2     
  Lines                                                        12643     12746   +103     
==========================================================================================
+ Hits                                                         12643     12746   +103     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…enhance LaTeX formatting and improve test cases for compression checks.
…enhance LaTeX formatting for short and detailed outputs.
…improve LaTeX representation and streamline logic for tension and compression checks.
… None area values and ensure correct tension and compression checks.
…leStrengthClass3 for clarity and update corresponding test cases.
@GerjanDorgelo GerjanDorgelo changed the base branch from main to 840-feature-request-add-first-steel-check-to-blueprints November 23, 2025 09:15
Copilot AI review requested due to automatic review settings December 20, 2025 07:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 20 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 21, 2025 10:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 20 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 21, 2025 12:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 23 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Implement NormalForceClass123 for normal force resistance checks on steel I-profiles of class 1, 2, and 3.
- Create SteelIProfileStrengthClass3 to perform overall strength checks for class 3 steel I-profiles, integrating normal force checks.
- Add unit tests for normal force checks and overall strength checks for steel I-profiles, ensuring correct functionality and LaTeX output.
- Introduce fixtures for HEB profile and properties to streamline testing.
- Establish test structure for nominal concrete cover checks in accordance with EN 1992-1-1.
Copilot AI review requested due to automatic review settings December 21, 2025 12:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 27 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…le strength classes to reflect Eurocode structure
…ode 3

- Implemented SteelIProfileStrengthClass3 for strength checks on class 3 steel I-profiles.
- Added calculation steps for normal force, with placeholders for other checks.
- Created tests for SteelIProfileStrengthClass3 and NormalForceClass123, covering various scenarios and latex output.
- Updated imports in nominal_concrete_cover example to reflect new module structure.
- Removed obsolete __init__.py files from concrete and steel test directories.
- Added new __init__.py files for EN 1992-1-1:2004 and EN 1993-1-1:2005 test directories.
Copilot AI review requested due to automatic review settings December 21, 2025 12:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 25 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 21, 2025 12:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 21, 2025 14:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 25 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Example
-------
from blueprints.checks.eurocode.en_1993_1_1_2005.ultimate_limit_states.normal_force import NormalForceClass123
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

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

The import statement on line 37 is duplicated with line 11. Remove the duplicate import from the docstring example section.

Suggested change
from blueprints.checks.eurocode.en_1993_1_1_2005.ultimate_limit_states.normal_force import NormalForceClass123

Copilot uses AI. Check for mistakes.
from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile
from blueprints.structural_sections.steel.steel_cross_sections.standard_profiles.heb import HEB
from blueprints.saf.results.result_internal_force_1d import ResultFor, ResultInternalForce1D, ResultOn
from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

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

The import statement on line 43 is duplicated with line 14. Remove the duplicate import from the docstring example section.

Suggested change
from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile

Copilot uses AI. Check for mistakes.
from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile
from blueprints.structural_sections.steel.steel_cross_sections.standard_profiles.heb import HEB
from blueprints.saf.results.result_internal_force_1d import ResultFor, ResultInternalForce1D, ResultOn
from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

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

The import statement on line 50 is duplicated with line 20. Remove the duplicate import from the docstring example section.

Suggested change
from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +34
load_tension = ResultInternalForce1D(
result_on=ResultOn.ON_BEAM, member="M1", result_for=ResultFor.LOAD_CASE, load_case="LC1", n=355 * 14908 / 1.0 / 1e3 * 0.99
) # 99% of capacity
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

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

The magic numbers 355, 14908, and 0.99 should be extracted into named constants or calculated from the profile properties to improve readability and maintainability. Similar issue exists in lines 45, 57, and 69.

Copilot uses AI. Check for mistakes.
Comment on lines +133 to +151
# Check (multiple axis) bending and shear interaction (not yet implemented)
if (
max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0
and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0
):
all_latex += r"\newline \newline \text{Warning: bending and shear interaction check not yet implemented.}"

# Check bending and axial force interaction (not yet implemented)
if (max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 and abs(self.result_internal_force_1d.n) > 0) or (
self.result_internal_force_1d.mz != 0 and self.result_internal_force_1d.my != 0
):
all_latex += r"\newline \newline \text{Warning: (multiple axis) bending and axial force interaction check not yet implemented.}"

# Check bending, shear and axial force interaction (not yet implemented)
if (
max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0
and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0
and abs(self.result_internal_force_1d.n) > 0
):
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

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

This conditional logic is complex and difficult to understand. Consider breaking it into smaller, named boolean variables that clearly express the intent of each condition (e.g., has_bending_moment, has_axial_force, has_biaxial_bending).

Suggested change
# Check (multiple axis) bending and shear interaction (not yet implemented)
if (
max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0
and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0
):
all_latex += r"\newline \newline \text{Warning: bending and shear interaction check not yet implemented.}"
# Check bending and axial force interaction (not yet implemented)
if (max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 and abs(self.result_internal_force_1d.n) > 0) or (
self.result_internal_force_1d.mz != 0 and self.result_internal_force_1d.my != 0
):
all_latex += r"\newline \newline \text{Warning: (multiple axis) bending and axial force interaction check not yet implemented.}"
# Check bending, shear and axial force interaction (not yet implemented)
if (
max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0
and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0
and abs(self.result_internal_force_1d.n) > 0
):
# Define combined internal force conditions for readability
has_bending_moment: bool = max(
abs(self.result_internal_force_1d.my),
abs(self.result_internal_force_1d.mz),
) > 0
has_shear_force: bool = max(
abs(self.result_internal_force_1d.vy),
abs(self.result_internal_force_1d.vz),
) > 0
has_axial_force: bool = abs(self.result_internal_force_1d.n) > 0
has_biaxial_bending: bool = (
self.result_internal_force_1d.mz != 0
and self.result_internal_force_1d.my != 0
)
# Check (multiple axis) bending and shear interaction (not yet implemented)
if has_bending_moment and has_shear_force:
all_latex += r"\newline \newline \text{Warning: bending and shear interaction check not yet implemented.}"
# Check bending and axial force interaction (not yet implemented)
if (has_bending_moment and has_axial_force) or has_biaxial_bending:
all_latex += r"\newline \newline \text{Warning: (multiple axis) bending and axial force interaction check not yet implemented.}"
# Check bending, shear and axial force interaction (not yet implemented)
if has_bending_moment and has_shear_force and has_axial_force:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[✨ Feature request]: check for strength of steel (I-)profiles, class 3

2 participants