-
Notifications
You must be signed in to change notification settings - Fork 14
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
Structure_Engine: flipping of bars fixed to take release into account #3447
base: develop
Are you sure you want to change the base?
Conversation
@peterjamesnugent @IsakNaslundBh when working on this one, I started thinking whether the orientation angle should not be negated too? Not entirely sure about it, but a part of me argued for that - happy for you to take over this and make an informed decision 👍 |
@BHoMBot check required |
@pawelbaran to confirm, the following actions are now queued:
|
@pawelbaran to confirm, the following actions are now queued:
|
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.
Happy that the script works as intended, minor change for the code if you think it's worth changing.
I have added a check for a horizontal bar, happy this works for the BarRelease
.
As discussed offline, the orientational angle should update too, this needs to be set dependent on whether Bar
is vertical if not:
- If
Bar
is vertical,newOrientationAngle = -orientationalAngle + pi()
- If
Bar
is not vertical ,newOrientationAngle = -orientationAngle
I have added a bit in the script to show this.
9157e9c
to
7893070
Compare
There is a method here: https://github.com/BHoM/ETABS_Toolkit/blob/develop/Etabs_Adapter/CRUD/Create/Bar.cs that potentially could be migrated over. Covers most things I think, but still to be double checked that all things are covered. Mirroring of sections is one thing that might need a bit of attention I think, which is not handled in that method. |
I feel like I am least informed of us three @IsakNaslundBh @peterjamesnugent - is there a chance you could agree between your duo on how to finalise this PR? To me anything would work 😉 |
@pawelbaran just to let you know, I have provided a |
The check |
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.
See some comments below. Think general work on sections make sense.
One alternative approach to the general filtering for if a profile should be flipped or not, that would be broadening the scope of this though, is to add a new Quary method in spatial engine for IProfile, returning the level of symmetry for the profile. Would then also need to add an enum that is specifying this level of symmetry though, but then you ifstatement could be changed to something like if(profile.ISymmetry() = Symmetry.DoubleSymetric) => return oldprofile.
Not sure if that is widening the scope to much for this though, but just a thought, as I think that potentially could be useful elsewhere as well.
Base.Compute.RecordError("The given shape profile does not have a FlipProfile method implemented."); | ||
return null; |
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.
Would change this to a warning and return the old profile.
} | ||
private static IProfile FlipProfile(KiteProfile oldProfile) | ||
{ | ||
return oldProfile; |
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.
If this is problematic, might be good to add a warning about it, or let it fallback to the other method
@@ -86,6 +120,87 @@ public static Stem Flip(this Stem stem) | |||
|
|||
return flipped; | |||
} | |||
|
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.
Need method separator lines between all methods /***************************************************/
ISectionProperty flippedSectionProperty = Flip(bar.SectionProperty); | ||
flipped.SectionProperty = flippedSectionProperty; | ||
} | ||
|
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.
Think the offset also need to be handled here.
Issues addressed by this PR
Closes #3446
Test files
On SharePoint
Changelog
Bar.Flip()
to include updates to theSectionProperty
,ShapeProfile
,Releases
andOrientationAngle
.Additional comments
The
KiteProfile
is the only one I cannot get to work - we may need to add aMirrorAboutY
property to it.