Skip to content

Commit

Permalink
Structure_Engine: Added an additional Create Method for GeometricalLi…
Browse files Browse the repository at this point in the history
…neLoad (#3213)
  • Loading branch information
Fraser Greenroyd authored Nov 29, 2023
2 parents f182b02 + 48b2bdf commit 86f7b80
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Structure_Engine/Create/Loads/GeometricalLineLoad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,41 @@ public static GeometricalLineLoad GeometricalLineLoad(Line location, Loadcase lo
};
}

[Description("Creates a GeometricalLineLoad with a constant force across the length of the Line.")]
[InputFromProperty("location")]
[InputFromProperty("loadcase")]
[Input("force", "The force to be applied to the full length of the Line.", typeof(BH.oM.Quantities.Attributes.Force))]
[Input("moment", "The momentto be applied to the full length of the Line.", typeof(BH.oM.Quantities.Attributes.Moment))]
[Input("objects", "The IAreaElement (i.e. Panels or FEMesh) to apply the GeometricalLineLoad to.")]
[Input("name", "The name of the created load.")]
[Output("geoLineLoad", "The created GeometricalLineLoad.")]
public static GeometricalLineLoad GeometricalLineLoad(Line location, Loadcase loadcase, Vector force= null, Vector moment= null, IEnumerable<IAreaElement> objects = null, string name = "")
{
BHoMGroup<IAreaElement> group = new BHoMGroup<IAreaElement>();
if (objects == null)
group = null;
else
group.Elements = objects.ToList();

if(force == null)
force = new Vector();

if(moment == null)
moment = new Vector();

return new GeometricalLineLoad
{
Location = location,
Loadcase = loadcase,
ForceA = force,
ForceB = force,
MomentA = moment,
MomentB = moment,
Name = name,
Objects = group
};
}

/***************************************************/
/**** Public Methods - ToBeRemoved ****/
/***************************************************/
Expand Down

0 comments on commit 86f7b80

Please sign in to comment.