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

bjorn/cnx-880-add-sections-and-materials-as-proxies #499

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

bjoernsteinhagen
Copy link
Contributor

@bjoernsteinhagen bjoernsteinhagen commented Jan 15, 2025

Description & motivation

  • Related to CNX-880
  • Functionality to extract material and section data
  • Single material can apply to numerous sections and a single section can apply to numerous objects
  • A section can be either for a PropFrame (FRAME) or PropArea (AREA)
  • To make it a little tricky, PropArea is for one of the following types: Deck, Wall or Slab. This affects the applicable api query

Changes:

Figma Link

image

  • _materialUnpacker - CsiShared implementation (eligible for both Sap2000 and Etabs)
  • _sectionUnpacker - CsiShared and host-app specific implementations (e.g. GetAllSectionProperties_2 not valid for Sap2000
  • SectionMaterialRelationshipManager and ObjectSectionRelationshipManager - Method of building relationships. Based on MaterialName for section-material relationship and sectionDesignation for object-section relationship. Both of these attributes (strings) have to be unique in Etabs world
  • Enums for project-wide consistency

To-do before merge:

  • SectionProxy and MaterialProxy (?) in the SDK. Currently using GroupProxy

Screenshots:

  • Proxies created for materials, frame sections and shell sections:
image
  • The nested properties dictionary orientates itself on the UI:
image
  • The material-section relations are based on the unique material names (no ApplicationId).
image
  • The section-object relations are based on the ApplicationId of the object(s).
image

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

Copy link

linear bot commented Jan 15, 2025

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.15%. Comparing base (db4d2f7) to head (651f527).

Additional details and impacted files
@@          Coverage Diff          @@
##             dev    #499   +/-   ##
=====================================
  Coverage   9.15%   9.15%           
=====================================
  Files        228     228           
  Lines       4306    4306           
  Branches     542     542           
=====================================
  Hits         394     394           
  Misses      3896    3896           
  Partials      16      16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bjoernsteinhagen
Copy link
Contributor Author

bjoernsteinhagen commented Jan 17, 2025

@clairekuang I had a brainwave this morning and currently exploring cDatabaseTables as a way to simplify the extraction of properties and get a more formalized return (as opposed to: determine type, use specific api query for that type etc.). If it works, it should reduce the amount of code and code complexity drastically (especially for AreaSectionProperty). Concerned the cDatabaseTables queries are a little slower though but will keep an eye on this.

cc: @dogukankaratas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants