Repository navigation
Conversation
IsakNaslundBh
left a comment
There was a problem hiding this comment.
I think the issue with this is that it fixes one issue (mirror) but introduces another.
The Flip method has the intention of the Bar staying identical in terms of how it functions and works, that is, it is supposed to essentially meant to be the same bar, just with order of things reversed.
The mirror on the other hand I think should flip the section along the length of the bar.
So, will need to differentiate the two cases, as I think what we have now is correct for flip.
This should solve the issues of the profile being mirrored, when using the flip method.
IsakNaslundBh
left a comment
There was a problem hiding this comment.
Think the general structure looks good.
See some comments below.
While at this, could you also have a look at the reinforcement of the ConcreteSection and check if it needs a similar fix?
You could try to create some ConcreteSection with like Longitudinal/Perimiter reinforcement that does not run all the way, and check that it works after Flip/Mirror.
You can call the ReinforcingBars method to check how it looks before and after.
| [Input("bar", "The Bar to flip.")] | ||
| [Output("bar", "The Bar with flipped end Nodes.")] | ||
| public static Bar Flip(this Bar bar) | ||
| public static Bar Flip(this Bar bar, Boolean isMirroring = false) |
There was a problem hiding this comment.
Role this back I think. Dont think we want this as an input here (unless @peterjamesnugent told you to add this in).
| if (bar.SectionProperty != null) | ||
| { | ||
| ISectionProperty flippedSectionProperty = Flip(bar.SectionProperty); | ||
| ISectionProperty flippedSectionProperty = Flip(bar.SectionProperty, isMirroring); |
There was a problem hiding this comment.
| ISectionProperty flippedSectionProperty = Flip(bar.SectionProperty, isMirroring); | |
| ISectionProperty flippedSectionProperty = Flip(bar.SectionProperty, false); |
There was a problem hiding this comment.
this is if we remove the isMirroring on the Bar input
| /***************************************************/ | ||
|
|
||
| private static ISectionProperty Flip(this ISectionProperty section) | ||
| private static ISectionProperty Flip(this ISectionProperty section, Boolean isMirroring) |
There was a problem hiding this comment.
| private static ISectionProperty Flip(this ISectionProperty section, Boolean isMirroring) | |
| private static ISectionProperty Flip(this ISectionProperty section, bool isMirroring) |
please change all others as well
| flippedProfiles.Reverse(); | ||
| } |
There was a problem hiding this comment.
| flippedProfiles.Reverse(); | |
| } | |
| } | |
| flippedProfiles.Reverse(); |
The reverse needs to happen avter the foreach
Issues addressed by this PR
Spatial_Engine: Mirror doesn't return correct extrusion for tapered bar
New PR due to merging the old one with branch
Closes #3616
Reversed the order in which values are assigned to keys for the different heights of a tapered bar when mirrored.
Test files
Mirror
Flip