Lap bugfix#431
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| raise BeamJoiningError(self.elements, self, debug_info=str(ex)) | ||
| self.main_beam.add_blank_extension(start_main, end_main, self.main_beam_guid) | ||
| self.cross_beam.add_blank_extension(start_cross, end_cross, self.cross_beam_guid) | ||
| tol = TOL.absolute |
There was a problem hiding this comment.
sure that's enough? TOL.absolute is like 1e-9 iirc..
obucklin
left a comment
There was a problem hiding this comment.
looks fine except the double definition of angle_vectors_projected
|
@obucklin should we merge this already? or wait and replace it with the |
maybe use the existing |
|
@obucklin AFAIK there is no built-in function in github for hard-linking cross repo PRs. I replaced the function with the compas.geometry one in all occasions, and I completely removed the one in our utils toolkit. Once your PR in compas is approved and merged, come back and approve this one too. |
|
I propose, as also suggested by @obucklin above, that we do the check ourselves (is_parallel, before calling |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
=======================================
Coverage ? 63.64%
=======================================
Files ? 76
Lines ? 10861
Branches ? 0
=======================================
Hits ? 6913
Misses ? 3948
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
As suggested by @chenkasirer I temporarily added a check before calling the |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes several issues in the Lap joint and related processing when beams are perpendicular, improves how ref_side_index is detected, and consolidates the use of angle_vectors_projected from compas.geometry.
- Removed the deprecated internal
angle_vectors_projectedand now import the one fromcompas.geometry, addingdeg=Trueto its calls. - Corrected the
ref_side_indexcheck to handle0, added a perpendicular‐vector fallback for inclination inLap, and updated slope/inclination calculations. - Simplified
start_framelogic and applied global tolerance offsets to blank extensions in the L-lap connection.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/compas_timber/utils/init.py | Removed custom angle_vectors_projected and its import of Projection. |
| src/compas_timber/fabrication/pocket.py | Updated calls to angle_vectors_projected to include deg=True. |
| src/compas_timber/fabrication/lap.py | Fixed ref_side_index false‐zero bug, added perpendicular‐case fallback for inclination, removed conditional start‐frame branch, and updated angle calls. |
| src/compas_timber/connections/l_lap.py | Added tolerance offsets (TOL.absolute) to add_blank_extension calls. |
| CHANGELOG.md | Documented bug fixes for Lap behavior and ref_side_index. |
Comments suppressed due to low confidence (3)
src/compas_timber/fabrication/lap.py:444
- Consider adding tests to cover the new perpendicular vector branch to ensure correct behavior when
yyaxisis perpendicular tozzaxisorfront_plane.normal.
if TOL.is_zero(abs(yyaxis.dot(zzaxis))) or TOL.is_zero(abs(yyaxis.dot(front_plane.normal))): # TODO: follow changes in compas.geometry and update this acordingly
src/compas_timber/fabrication/lap.py:742
- The conditional handling for
FaceLimitedStartwas removed, causingstart_frameto always be computed via_start_frame_from_params_and_beam; verify this change doesn't alter intended downstream behavior or restore the original branch if needed.
tol = Tolerance()
CHANGELOG.md:104
- This changelog entry mentions adjusting
angle_vectors_projectedto returnNone, but the code doesn't include such a change; update the entry to reflect actual modifications.
* Adjusted `angle_vectors_projected` function so that it returns `None` if any of the projections results in a zero-vector.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Chen Kasirer <ckasirer@ethz.ch>
| return distance_point_point(pt_seg_a, pt_seg_b) | ||
|
|
||
|
|
||
| def angle_vectors_projected(vector_a, vector_b, normal): |
There was a problem hiding this comment.
add to changelog in the Removed section
EDIT: you already did.. sorry!
There was a problem hiding this comment.
I already did. It should appear to you
Co-authored-by: Chen Kasirer <ckasirer@ethz.ch>
chenkasirer
left a comment
There was a problem hiding this comment.
commented on a few minor issues, but other than that lgtm!
What type of change is this?
This PR fixes a bug in the
LapBTLxProcessing occurring when the beams that should be joint with a lap, are perpendicular to each other.Checklist
Put an
xin 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.CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas_timber.datastructures.Beam.