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

Step joint notch feature #268

Merged
merged 69 commits into from
Oct 23, 2024
Merged

Conversation

papachap
Copy link
Contributor

@papachap papachap commented Jul 28, 2024

Midterm Research Presentation

  • Implementation of the StepJointNotch based on the example for the JackRafterCut.

This is still a work in progress. The purpose of the pull request is to get an overall feedback on some of the decisions that I took and how parts of the code could be further optimized.

Also when possible, I would like to ask for some guidance on how to properly run tests of the code.

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 papachap requested review from chenkasirer and obucklin and removed request for obucklin July 28, 2024 04:10
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.

oops, forgot to submit.

src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
src/compas_timber/_fabrication/step_joint_notch.py Outdated Show resolved Hide resolved
@chenkasirer
Copy link
Contributor

@papachap would you say this is ready for review/merge?

@papachap
Copy link
Contributor Author

papachap commented Sep 5, 2024

@papachap would you say this is ready for review/merge?

@chenkasirer I think you can now go for it!

CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines +165 to +176
if step_shape == StepShapeType.DOUBLE:
if self.step_depth <= 0 or self.heel_depth <= 0:
raise ValueError("For a 'double' step_shape, both step_depth and heel_depth must be greater than 0.")
elif step_shape == StepShapeType.STEP:
if self.step_depth <= 0 or self.heel_depth != 0:
raise ValueError("For a 'step' step_shape, step_depth must be greater than 0 and heel_depth must be 0.")
elif step_shape in [StepShapeType.HEEL, StepShapeType.TAPERED_HEEL]:
if self.heel_depth <= 0 or self.step_depth != 0:
raise ValueError(
"For 'heel' or 'tapered heel' step_shape, heel_depth must be greater than 0 and step_depth must be 0."
)
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

I would actually not put this here.
validating it here means that, depending on the chronological order the parameters are set you might be validating parameters that haven't been set yet.

As by the end of __init__ all parameters should have already properly been set. that would be a good place to call a function which validates all these.

papachap and others added 2 commits October 22, 2024 16:32
Co-authored-by: Chen Kasirer <chen902@gmail.com>
Co-authored-by: Chen Kasirer <chen902@gmail.com>
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!

@chenkasirer chenkasirer merged commit e6f1565 into gramaziokohler:main Oct 23, 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.

3 participants