Skip to content

Commit

Permalink
flipping of bars fixed to take release into account
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelbaran committed Dec 27, 2024
1 parent 37298d5 commit 7893070
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Structure_Engine/Modify/Flip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using BH.oM.Quantities.Attributes;
using System.ComponentModel;
using BH.Engine.Base;
using BH.oM.Structure.Constraints;


namespace BH.Engine.Structure
Expand All @@ -51,6 +52,15 @@ public static Bar Flip(this Bar bar)
flipped.Start = flipped.End;
flipped.End = tempNode;

BarRelease flippedRelease = bar.Release?.ShallowClone();
if (flippedRelease != null)
{
Constraint6DOF tempRelease = flippedRelease.StartRelease;
flippedRelease.StartRelease = flippedRelease.EndRelease;
flippedRelease.EndRelease = tempRelease;
flipped.Release = flippedRelease;
}

return flipped;
}

Expand Down

0 comments on commit 7893070

Please sign in to comment.