-
Notifications
You must be signed in to change notification settings - Fork 26
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
Step joint notch feature #268
Conversation
There was a problem hiding this 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.
@papachap would you say this is ready for review/merge? |
@chenkasirer I think you can now go for it! |
…into step_joint_notch_feature
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: |
There was a problem hiding this comment.
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.
Co-authored-by: Chen Kasirer <chen902@gmail.com>
Co-authored-by: Chen Kasirer <chen902@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
StepJointNotch
based on the example for theJackRafterCut
.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?
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.CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
).invoke test
).invoke lint
).compas_timber.datastructures.Beam
.