Skip to content

Structure_Engine: Update Timber constructors to accept ITimber as inputs #3309

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

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ public static partial class Create
/**** Public Methods ****/
/***************************************************/

[PreviousVersion("7.1", "BH.Engine.Structure.Create.TimberRectangleSection(System.Double, System.Double, System.Double, BH.oM.Structure.MaterialFragments.Timber, System.String)")]
[Description("Creates a rectangular solid timber section from input dimensions.")]
[Input("height", "Height of the section.", typeof(Length))]
[Input("width", "Width of the section.", typeof(Length))]
[Input("cornerRadius", "Optional corner radius for the section.", typeof(Length))]
[Input("material", "Timber material to be applied to the section. If null a default material will be extracted from the database.")]
[Input("name", "Name of the timber section. This is required for most structural packages to create the section.")]
[Output("section", "The created rectangular solid timber section.")]
public static TimberSection TimberRectangleSection(double height, double width, double cornerRadius = 0, Timber material = null, string name = "")
public static TimberSection TimberRectangleSection(double height, double width, double cornerRadius = 0, ITimber material = null, string name = "")
{
return TimberSectionFromProfile(Spatial.Create.RectangleProfile(height, width, cornerRadius), material, name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ public static partial class Create
/**** Public Methods ****/
/***************************************************/

[PreviousVersion("7.1", "BH.Engine.Structure.Create.TimberSectionFromProfile(BH.oM.Spatial.ShapeProfiles.IProfile, BH.oM.Structure.MaterialFragments.Timber, System.String)")]
[Description("Generates a timber section based on a Profile and a material. \n This is the main create method for timber sections, responsible for calculating section constants etc. and is being called from all other create methods for timber sections.")]
[Input("profile", "The section profile the timber section. All section constants are derived based on the dimensions of this.")]
[Input("material", "timber material to be applied to the section.")]
[Input("material", "Timber material to be applied to the section.")]
[Input("name", "Name of the timber section. If null or empty the name of the profile will be used. This is required for most structural packages to create the section.")]
[Output("section", "The created timber section.")]
public static TimberSection TimberSectionFromProfile(IProfile profile, Timber material = null, string name = "")
public static TimberSection TimberSectionFromProfile(IProfile profile, ITimber material = null, string name = "")
{
if (profile.IsNull())
return null;
Expand Down