Skip to content

Refactor JointRule process to accomodate PlateJoint #479

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 99 commits into
base: main
Choose a base branch
from

Conversation

obucklin
Copy link
Contributor

@obucklin obucklin commented Jul 11, 2025

So I wanted to make GH components for the new PlateJoints. This required a rework of the JointRules themselves.

Changes to JointRule application:
I reworked the comply() methods, and realized we had a lot of redundant checks in the process. I tried to rationalize the rule parsing and joint creation a bit. The new concept is a three part process:

  1. JointRule creation. No distance, topology, or other compliance checks are done here.
  2. Joint creation via DirectRule.get_joint or CategoryRule/TopologyRule.try_get_joint. This is where all checks are done. DirectRule.get_joint raises a BeamJoiningError if it fails, but the others take a pair of elements and return a Joint if possible, otherwise None.
  3. Add those joints to model.

Because the Joint is generated outside the context of a model, I implemented a Joint.from_element_list() method. This allows us to separate instantiating the Joint and adding it to the TimberModel. Joints that take different input parameters e.g. the BallNodeJointoverride this method.Joint.create()` functions as previously. PR #491

Changes to GH Components:

  • I added several new GH Components for plate joints. in this PR GH Components for Plate Joints #495 (depends on this PR. should be merged after this)
  • I refactored the GH Model component by extracting sections into various methods. We should look and see if these can be upstreamed to their respective modules.
  • I removed JointDefinition and FeatureDefinition.

There are 2 other PRs now upon which this depends: #500 and #501. once they are merged we can look at this.

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas_timber.datastructures.Beam.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

Copy link

codecov bot commented Jul 11, 2025

Codecov Report

❌ Patch coverage is 84.95763% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.41%. Comparing base (158cd45) to head (3e1218a).

Files with missing lines Patch % Lines
src/compas_timber/design/workflow.py 84.96% 23 Missing ⚠️
src/compas_timber/connections/y_butt.py 23.07% 10 Missing ⚠️
src/compas_timber/connections/t_step_joint.py 25.00% 9 Missing ⚠️
...rc/compas_timber/connections/l_french_ridge_lap.py 64.28% 5 Missing ⚠️
src/compas_timber/connections/plate_butt_joint.py 70.58% 5 Missing ⚠️
src/compas_timber/design/wall_populator.py 37.50% 5 Missing ⚠️
src/compas_timber/model/model.py 86.20% 4 Missing ⚠️
src/compas_timber/connections/plate_joint.py 92.10% 3 Missing ⚠️
src/compas_timber/utils/__init__.py 94.44% 3 Missing ⚠️
src/compas_timber/connections/solver.py 96.82% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #479      +/-   ##
==========================================
+ Coverage   64.05%   65.41%   +1.36%     
==========================================
  Files          76       76              
  Lines       10887    10954      +67     
==========================================
+ Hits         6974     7166     +192     
+ Misses       3913     3788     -125     

☔ 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.

Copilot

This comment was marked as outdated.

@obucklin obucklin removed the request for review from chenkasirer July 14, 2025 07:57
@obucklin obucklin linked an issue Jul 29, 2025 that may be closed by this pull request
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.

Compatibility check at promotion stage Solver and design workflow optimization.
1 participant