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

BHoM_Adapter: Issue with some deep dependency types #339

Closed
IsakNaslundBh opened this issue Feb 1, 2023 · 0 comments · Fixed by #340
Closed

BHoM_Adapter: Issue with some deep dependency types #339

IsakNaslundBh opened this issue Feb 1, 2023 · 0 comments · Fixed by #340
Assignees
Labels
severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour

Comments

@IsakNaslundBh
Copy link
Contributor

Description:

The dependency order management does not function as intended for some cases.

When for example, pushing a BarUniformlyDistributedLoad without at the same time pushing bars, the dependency sorting makes it so that the bars are pushed as the second item, before Nodes and sections etc.

Steps to reproduce:

A test method like:

        [Test]
        public void DependencyOrder_CreateLoadNoObjectsWithIds()
        {
            List<BarUniformlyDistributedLoad> loads = Create.RandomObjects<BarUniformlyDistributedLoad>(3);

            sa.Push(loads);

            string correctOrder = "BH.oM.Structure.Constraints.Constraint6DOF, BH.oM.Structure.MaterialFragments.IMaterialFragment, BH.oM.Structure.SectionProperties.ISectionProperty, BH.oM.Structure.Elements.Node, BH.oM.Structure.Constraints.BarRelease, BH.oM.Structure.Offsets.Offset, BH.oM.Structure.Elements.Bar, BH.oM.Structure.Loads.BarUniformlyDistributedLoad";
            string createdOrder = string.Join(", ", sa.Created.Select(c => c.Item1.FullName));

            Assert.AreEqual(correctOrder, createdOrder);
        }

Will highlight the problem

Expected behaviour:

For recursive evaluation of dependencies to function, independent on if other objects are pushed simultaneously or not. Order of objects being put in to the push component also should not matter.

Test file(s):

See test method above

@IsakNaslundBh IsakNaslundBh added severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour labels Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:critical No workaround exists. Essential to continue type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants