Skip to content
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

Lap BTLx Feature // T-Butt & L-Butt #322

Merged
merged 25 commits into from
Nov 25, 2024
Merged

Lap BTLx Feature // T-Butt & L-Butt #322

merged 25 commits into from
Nov 25, 2024

Conversation

papachap
Copy link
Contributor

This PR introduces a new BTLxLap processing feature and Updates the T-Butt and L-Butt joints so that they follow the new system of joint definition (ie the use of the alt constructors of the JackRafterCut and Lap classes).

This means that the ButtJoint module can eventually be removed.

Also this PR fixes a bug in the calculations of angle and inclination of the JackRafterCut.

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)

@papachap
Copy link
Contributor Author

I haven't removed the ButtJoint module, although it has been completely removed from the T-Butt and L-Butt joints. Let me know if you would like to do this in this PR or in a separate one.

@papachap papachap mentioned this pull request Oct 22, 2024
@papachap papachap linked an issue Nov 12, 2024 that may be closed by this pull request
src/compas_timber/_fabrication/btlx_process.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/lap.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/lap.py Outdated Show resolved Hide resolved
src/compas_timber/connections/t_butt.py Outdated Show resolved Hide resolved
src/compas_timber/connections/t_butt.py Outdated Show resolved Hide resolved
src/compas_timber/fabrication/__init__.py Outdated Show resolved Hide resolved
tests/compas_timber/test_jack_rafter_cut.py Outdated Show resolved Hide resolved
@papachap
Copy link
Contributor Author

Adjustments based on the comments from @chenkasirer done 👍

Copy link
Contributor

@obucklin obucklin left a comment

Choose a reason for hiding this comment

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

I worry that we are implementing overly-simplified geometric implementations of the BTLx Processings. I would prefer that we make these more complete so that we don't have to go back later. This is particularly true for the Lap Processing, which will lose functionality with this. I know this is currently only for the Butt Joints, but it's worth considering if we should just implement fully immediately.

src/compas_timber/connections/l_butt.py Outdated Show resolved Hide resolved
rot_angle = 90-self.angle if self.orientation == OrientationType.END else self.angle-90
box_frame.rotate(math.radians(rot_angle), box_frame.normal, point=box_frame.point)

box = Box(xsize=self.length, ysize=self.width, zsize=self.depth, frame=box_frame)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a simplification of what we had previously. For example it doesn't take into account the inclination, lead_angle, etc. The old definition did account for these things, and this should use those too. The subtraction can't really be represented by a Box. As far as I can tell, this will only work for beams that are orthogonal to one another.

Copy link
Contributor

Choose a reason for hiding this comment

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

discussed with @papachap, I agree we should at least be able to do what was possible before AKA arbitrary laps as a result of lap joinery.

a potential solution would be a from_beam_beam() constructor that follows similar logic as the current lap joint. see implementation by @jonashaldemann:

def _create_negative_volumes(self):

Copy link
Contributor Author

@papachap papachap Nov 14, 2024

Choose a reason for hiding this comment

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

This is true that it is a simplification. For sure It is wise to implement an additional alternative constructor as @chenkasirer suggested in order to allow for non box-like laps by using the two beams to extract the params.

Also the geometrical representation can be done with a polyhedron volume rather than a box.

In regards to the joint definitions of TButtJoint & LButtJoint though, this simplification existed from before as the inclination was set to 90 degrees by default. See:

self.cross_beam.add_features(MillVolume(self.subtraction_volume()))

But it doesn't require the beams to be orthogonal, it will just create a lap as the one you can see in the picture below.

image

The _create_negative_volumes() was used for the Lap joints but was not handling the generation of the machining parameters of the lap processings.

Let me know if we want to keep this simplification to any of those joint definitions.

src/compas_timber/connections/t_butt.py Show resolved Hide resolved
@papachap
Copy link
Contributor Author

I worry that we are implementing overly-simplified geometric implementations of the BTLx Processings. I would prefer that we make these more complete so that we don't have to go back later. This is particularly true for the Lap Processing, which will lose functionality with this. I know this is currently only for the Butt Joints, but it's worth considering if we should just implement fully immediately.

I agree with your point, and I think in this case it can be resolved by implementing an additional alternative constructor. But in my opinion in some of the joint definitions this simplification could be valuable. Let me know what you guys think @chenkasirer @obucklin

@papachap
Copy link
Contributor Author

@obucklin After discussing with @chenkasirer, we agreed it would be wise to split the Lap Processing development into two PRs. The main reason is that this PR’s primary goal is to update the old implementations, at least when it comes to machining processes. Since lap joints currently only allow for geometric representation without the ability to extract machining parameters, we can accept that the alternative constructor introduced here is mainly intended for butt joints.

In a follow up PR, we can develop a new constructor that allows for the generation of a more advanced Lap processing, that would handle lap joints and would be able to extract the necessary machining parameters. (And also have the lap be represented as a volume rather than as a box).

Copy link
Contributor

@chenkasirer chenkasirer left a comment

Choose a reason for hiding this comment

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

LGTM
there's a follow-up task #332 to complete the Lap visualization together with the Half-laps

@papachap papachap merged commit 06eff09 into main Nov 25, 2024
14 checks passed
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.

Upstream Tbutt Joint
3 participants