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

Improve Move Objects Update Feature #476

Merged
merged 7 commits into from
Nov 7, 2024

Conversation

GCRA101
Copy link
Contributor

@GCRA101 GCRA101 commented Sep 24, 2024

Issues addressed by this PR

Closes #464

GH Script and Model Preview

VS - Node Move Algorithm After

ETABS Toolkit now able to perform translational movement of ETABS models upon Update Request much faster than before (up to 7 times faster as per Test ETABS model below - i.e.: from 7 minutes to 1 minute max).
Whenever rotations or distorsions of ETABS objects are concerned, unfortunately ETABS API limitations still prevent BHoM from carrying out a correct update of ETABS panel objects.
More work is required to find out a solution to this problem.

Test files

Video Demonstration - Issue
https://burohappold.sharepoint.com/:v:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23476-ImproveMoveObjectsAlgorithm/Moving%20BHoM%20Algorithm%20Issue.mp4?csf=1&web=1&e=XrufhL
Video Demonstration - Solution
https://burohappold.sharepoint.com/:v:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23476-ImproveMoveObjectsAlgorithm/Moving%20BHoM%20Algorithm%20Sorted.mp4?csf=1&web=1&e=ZlxeGo
Grasshopper File
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23476-ImproveMoveObjectsAlgorithm/[TestScript.gh](https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23476-ImproveMoveObjectsAlgorithm/TestScript.gh?csf=1&web=1&e=1smiHN)?csf=1&web=1&e=1smiHN
ETABS File
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/ETABS_Toolkit/%23476-ImproveMoveObjectsAlgorithm/Test%20ETABS%20Model.EDB?csf=1&web=1&e=X61Bhi

Changelog

  • Use of Hash Tables to store and access faster data for moving nodes
  • Use of Streams on Hash Tables to run the ETABS API .move() method faster on nodes grouped together

Rather than moving each node one by one, all nodes are grouped into different buckets based on same movement in x/y/z direction.
In this way, it is possible to call the .move() method on multiple nodes rather than on a single node at the time.
This makes the algorithm much faster taking advantage of the pros of the Hash Tables data structure.
@GCRA101 GCRA101 self-assigned this Sep 24, 2024
@GCRA101 GCRA101 added the type:bug Error or unexpected behaviour label Sep 24, 2024
@GCRA101 GCRA101 added this to the BHoM 7.4 β MVP milestone Sep 24, 2024
Chrisshort92
Chrisshort92 previously approved these changes Oct 14, 2024
Copy link
Contributor

@Chrisshort92 Chrisshort92 left a comment

Choose a reason for hiding this comment

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

Functionality tested with provided test script and file. Files working as expected therefore PR approved for merge.

@Chrisshort92
Copy link
Contributor

@BHoMBot check required

Copy link

bhombot-ci bot commented Oct 14, 2024

@Chrisshort92 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

There are 23 requests in the queue ahead of you.

@peterjamesnugent
Copy link
Member

@BHoMBot check copyright-compliance

Copy link

bhombot-ci bot commented Oct 23, 2024

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

  • check copyright-compliance

There are 27 requests in the queue ahead of you.

@GCRA101
Copy link
Contributor Author

GCRA101 commented Oct 28, 2024

@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Oct 28, 2024

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

  • check ready-to-merge

@BHoM BHoM deleted a comment from bhombot-ci bot Oct 28, 2024
@BHoM BHoM deleted a comment from bhombot-ci bot Oct 28, 2024
Copy link
Member

@peterjamesnugent peterjamesnugent left a comment

Choose a reason for hiding this comment

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

Few minor changes, I have not tested using ETABS but looks like a good improvement in terms of speed.

Etabs_Adapter/CRUD/Update/Node.cs Outdated Show resolved Hide resolved
Etabs_Adapter/CRUD/Update/Node.cs Outdated Show resolved Hide resolved
Etabs_Adapter/ETABSAdapter.cs Outdated Show resolved Hide resolved
Etabs_Adapter/CRUD/Update/Node.cs Outdated Show resolved Hide resolved
Copy link
Member

@peterjamesnugent peterjamesnugent left a comment

Choose a reason for hiding this comment

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

Happy from a code side, @Chrisshort92 can you do a functionality review please.

Actually, given the previous approving review from Chris: #476 (review) and the changes after that were purely variable name changes and removal of commented code - this can be merged,

@peterjamesnugent
Copy link
Member

@BHoMBot check required
@BHoMBot check copyright-compliance

Copy link

bhombot-ci bot commented Nov 7, 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
  • check copyright-compliance

@peterjamesnugent
Copy link
Member

@BHoMBot check installer

Copy link

bhombot-ci bot commented Nov 7, 2024

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

  • check installer

@peterjamesnugent
Copy link
Member

@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Nov 7, 2024

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

  • check ready-to-merge

@peterjamesnugent peterjamesnugent merged commit 01e709c into develop Nov 7, 2024
10 checks passed
@peterjamesnugent peterjamesnugent deleted the ETABS_Toolkit-#464-ImproveMoveObjsFeature branch November 7, 2024 16:25
@BHoMBot BHoMBot mentioned this pull request Dec 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.

Improve Feature for Moving Shells
3 participants