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

Shallow clone BarVaryingDistributedLoad so the returned objects are not modified #385

Merged

Conversation

peterjamesnugent
Copy link
Member

@peterjamesnugent peterjamesnugent commented Jul 8, 2024

Issues addressed by this PR

Closes #274

Test files

#274 BarVaryingDistributedLoad

Changelog

  • Changed how BarVaryingDistributedLoads are created to remove any modification of the base object;

@peterjamesnugent peterjamesnugent added the type:bug Error or unexpected behaviour label Jul 8, 2024
@peterjamesnugent peterjamesnugent added this to the BHoM 7.3 β MVP milestone Jul 8, 2024
@peterjamesnugent peterjamesnugent self-assigned this Jul 8, 2024
@KalleEdstroem
Copy link
Contributor

Looking at some of the similar CRUD methods they look quite similar. Could the same issue be present in those as well or has that been ruled out ? In that case a similar change should be implemented for those.

private bool CreateCollection(IEnumerable<BarUniformlyDistributedLoad> barUniformlyDistributedLoads)
{
string loadGroupPath = CreateSectionFile("LOAD-GROUP");
foreach (BarUniformlyDistributedLoad barUniformlyDistributedLoad in barUniformlyDistributedLoads)

for (int i = 0; i < 6; i++)
{
barUniformlyDistributedLoad.Force = zeroVector;
barUniformlyDistributedLoad.Moment = zeroVector;

@peterjamesnugent
Copy link
Member Author

@BHoMBot check compliance

Copy link

bhombot-ci bot commented Jul 30, 2024

@peterjamesnugent to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

Copy link
Contributor

@KalleEdstroem KalleEdstroem left a comment

Choose a reason for hiding this comment

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

Tested using test script provided. Gives same values for loads from original, push and pull components for:

  • AreaUniformlyDistributedLoads
  • BarPointLoad
  • BarUniformlyDistributedLoads
  • BarVaryingDistributedLoad

@peterjamesnugent
Copy link
Member Author

@BHoMBot check required

Copy link

bhombot-ci bot commented Aug 1, 2024

@peterjamesnugent to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

Copy link

bhombot-ci bot commented Aug 1, 2024

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

Copy link

bhombot-ci bot commented Aug 1, 2024

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@peterjamesnugent
Copy link
Member Author

@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Aug 1, 2024

@peterjamesnugent to confirm, the following actions are now queued:

  • check ready-to-merge

@peterjamesnugent peterjamesnugent merged commit 19bd11a into develop Aug 1, 2024
12 checks passed
@peterjamesnugent peterjamesnugent deleted the MidasCivil_Toolkit-#274-BarVaryingDistributedLoad branch August 1, 2024 14:16
@BHoMBot BHoMBot mentioned this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MidasCivil_Toolkit/MidasCivil_Adapter/CRUD/Create/Loads/BarVaryingDistributedLoads.cs
2 participants