ms-structural / ms-structural/femdesign-api

Instance counting mismatch

Open
#638 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug?
Dominant language
C#
Stars
51
Forks
29
PR merge metrics
No merged PRs in 30d

Description

The instance number should be based on the number of elements with a given identifier to better mimic what FEM-Design does.

Problem

Create a model with 3 bars. 2 with identifier A and 1 with identifier B. Currently their names will be the following in our API:

A.1
A.2
B.3

But when opening the model in FEM-Design they will be renamed to

A.1
A.2
B.1 <-- 1 instead
Solution

Instead of having a private static int _barInstance field we could change it to a dictionary private static Dictionary<string, int> _barInstances.
This dictionary could map the number of instances created of each name. Like this:

{
  "A": 2,
  "B": 1
}

Testfile in testfolder 638

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the private static _barInstance field and review the test file in testfolder 638. Verify how instance names are generated for bars with repeated and different identifiers. Done means identifiers such as A produce A.1 and A.2 while a different identifier B starts at B.1, matching FEM-Design.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.