Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f65c3bb
#3607
IsakNaslundBh Sep 1, 2026
8a5a04c
Fix issue with reinforcement fragments not properly added
IsakNaslundBh Sep 1, 2026
fc50daf
Add UT test file based on previous version
IsakNaslundBh Sep 1, 2026
2a965fc
Minor description tweak
IsakNaslundBh Sep 2, 2026
a649b7e
revert erroneous change to how the cellular section volume was computed
IsakNaslundBh Sep 2, 2026
db2d237
Additional comment to avoid same error being made again
IsakNaslundBh Sep 2, 2026
503c663
Regenerate UT
IsakNaslundBh Sep 2, 2026
6be40dd
Fix issue with same material registered twice for some surfacepropert…
IsakNaslundBh Sep 2, 2026
dd17e6e
Add Unittests
IsakNaslundBh Sep 2, 2026
93fd20e
Merge branch 'develop' into Structure_oM-#3607-AddConnectionAllowance…
IsakNaslundBh Sep 7, 2026
e690b7e
Provide name to takeoffs
IsakNaslundBh Sep 7, 2026
84a78d2
add description for name
IsakNaslundBh Sep 7, 2026
340334f
Regenerate UTs after change to name handling
IsakNaslundBh Sep 7, 2026
77c540b
Update Structure_Engine/Query/GeneralMaterialTakeoff.cs
IsakNaslundBh Sep 9, 2026
cf6ded1
Update Structure_Engine/Query/GeneralMaterialTakeoff.cs
IsakNaslundBh Sep 9, 2026
d0b3a5b
Update SolidVolume.cs
IsakNaslundBh Sep 9, 2026
9a9fbdb
Add method for computing the area of single bars in reinforcement
IsakNaslundBh Sep 9, 2026
95c89c2
Description fix
IsakNaslundBh Sep 9, 2026
7fd4ea5
Use new method in takeoffs as well as area
IsakNaslundBh Sep 9, 2026
2a2c644
remove the d
IsakNaslundBh Sep 9, 2026
7aec98e
Warnings for the connection allowance
IsakNaslundBh Sep 9, 2026
ae341e9
Warning for 0 reinforcementdensity
IsakNaslundBh Sep 9, 2026
ecb54a5
remove stirrup word from transverse reinforcement method
IsakNaslundBh Sep 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Structure_Engine/Query/Area.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static double Area(this Surface surface)
[Output("area", "The area of the LongitudinalReinforcement.", typeof(Area))]
public static double Area(this LongitudinalReinforcement reinforcement)
{
return reinforcement.IsNull() ? 0 : reinforcement.ReinforcingBarCount() * reinforcement.Diameter * reinforcement.Diameter / 4 * Math.PI;
return reinforcement.IsNull() ? 0 : reinforcement.ReinforcingBarCount() * reinforcement.BarArea();
}

/***************************************************/
Expand Down
82 changes: 82 additions & 0 deletions Structure_Engine/Query/BarArea.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
*
*
* The BHoM is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3.0 of the License, or
* (at your option) any later version.
*
* The BHoM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
*/

using BH.Engine.Geometry;
using BH.oM.Geometry;
using BH.oM.Structure.Elements;
using System.Collections.Generic;
using System.Linq;
using System;
using BH.oM.Base.Attributes;
using BH.oM.Quantities.Attributes;
using BH.oM.Structure.Reinforcement;
using System.ComponentModel;
using BH.Engine.Analytical;

namespace BH.Engine.Structure
{
public static partial class Query
{
/***************************************************/
/**** Public Methods ****/
/***************************************************/

[Description("Calculates the area of a single rebar in the IBarReinforcement. To get the total reinforcement area for the reinforcement layout please call the Area method.")]
[Input("reinforcement", "The IBarReinforcement to calculate the area for.")]
[Output("area", "The area of a single rebar the IBarReinforcement.", typeof(Area))]
public static double BarArea(this IBarReinforcement reinforcement)
{
return reinforcement.Diameter * reinforcement.Diameter / 4 * Math.PI;
}

/***************************************************/

[Description("Calculates the area of a single rebar in the PanelReinforcement in the logitudinal direction.")]
[Input("reinforcement", "The PanelReinforcement to calculate the area for.")]
[Output("area", "The area of a single rebar in the logitudinal direction the PanelReinforcement.", typeof(Area))]
public static double LongitudinalBarArea(this PanelReinforcement reinforcement)
{
return reinforcement.LongitudinalDiameter * reinforcement.LongitudinalDiameter / 4 * Math.PI;
}

/***************************************************/

[Description("Calculates the area of a single rebar in the PanelReinforcement in the logitudinal direction.")]
[Input("reinforcement", "The PanelReinforcement to calculate the area for.")]
[Output("area", "The area of a single rebar in the transversal direction the PanelReinforcement.", typeof(Area))]
public static double TransversalBarArea(this PanelReinforcement reinforcement)
{
return reinforcement.TransverseDiameter * reinforcement.TransverseDiameter / 4 * Math.PI;
}

/***************************************************/

}

}







2 changes: 1 addition & 1 deletion Structure_Engine/Query/Construction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static Construction Construction(this ISurfaceProperty surfaceProperty)
if (surfaceProperty.IsNull())
return null;

MaterialComposition comp = surfaceProperty.IMaterialComposition();
MaterialComposition comp = surfaceProperty.MaterialComposition();
double volume = surfaceProperty.IVolumePerArea();
if (volume == 0)
Base.Compute.RecordWarning("the SurfaceProperty has zero volume - a Construction has been created, but will also have zero volume.");
Expand Down
Loading
Loading