public static PointLoad Moment(Autodesk.DesignScript.Geometry.Point point, Autodesk.DesignScript.Geometry.Vector moment, LoadCase loadCase, string comment = "") { var p0 = Geometry.FdPoint3d.FromDynamo(point); var v0 = Geometry.FdVector3d.FromDynamo(moment); PointLoad pointLoad = new PointLoad(p0, v0, loadCase, comment, ForceLoadType.Moment); return(pointLoad); }
protected override void SolveInstance(IGH_DataAccess DA) { // get data Point3d point = Point3d.Origin; Vector3d force = Vector3d.Zero; FemDesign.Loads.LoadCase loadCase = null; string comment = null; if (!DA.GetData(0, ref point)) { return; } if (!DA.GetData(1, ref force)) { return; } if (!DA.GetData(2, ref loadCase)) { return; } if (!DA.GetData(3, ref comment)) { // pass } if (force == null || loadCase == null) { return; } ; // Convert geometry FemDesign.Geometry.FdPoint3d fdPoint = point.FromRhino(); FemDesign.Geometry.FdVector3d _force = force.FromRhino(); PointLoad obj = new FemDesign.Loads.PointLoad(fdPoint, _force, loadCase, comment, ForceLoadType.Force); DA.SetData(0, obj); }