protected override void SolveInstance(IGH_DataAccess DA) { Releases.Motions motions = null; Releases.Rotations rotations = null; Releases.MotionsPlasticLimits motionsPlasticLimit = null; Releases.RotationsPlasticLimits rotationsPlasticLimit = null; string libraryName = null; if (!DA.GetData("Motions", ref motions)) { return; } if (!DA.GetData("Rotations", ref rotations)) { return; } if (motions == null || rotations == null) { return; } DA.GetData("Plastic Limits Forces Motions", ref motionsPlasticLimit); DA.GetData("Plastic Limits Moments Rotations", ref rotationsPlasticLimit); DA.GetData("LibraryName", ref libraryName); Shells.EdgeConnection edgeConnection = new Shells.EdgeConnection(motions, motionsPlasticLimit, rotations, rotationsPlasticLimit, libraryName); DA.SetData("EdgeConnection", edgeConnection); }
protected override void SolveInstance(IGH_DataAccess DA) { Point3d point = Point3d.Origin; Releases.Motions motions = null; Releases.Rotations rotations = null; Releases.MotionsPlasticLimits motionsPlasticLimit = null; Releases.RotationsPlasticLimits rotationsPlasticLimit = null; string identifier = "S"; if (!DA.GetData(0, ref point)) { return; } if (!DA.GetData(1, ref motions)) { return; } if (!DA.GetData(2, ref rotations)) { return; } DA.GetData(3, ref motionsPlasticLimit); DA.GetData(4, ref rotationsPlasticLimit); DA.GetData(5, ref identifier); if (point == null || motions == null || rotations == null || identifier == null) { return; } // Convert geometry Geometry.FdPoint3d fdPoint = point.FromRhino(); var obj = new Supports.PointSupport(fdPoint, motions, motionsPlasticLimit, rotations, rotationsPlasticLimit, identifier); DA.SetData(0, obj); }
public static ConnectedLines Define(Autodesk.DesignScript.Geometry.Curve firstCurve, Autodesk.DesignScript.Geometry.Curve secondCurve, Autodesk.DesignScript.Geometry.Vector localX, Autodesk.DesignScript.Geometry.Vector localY, Releases.Motions motions, Releases.Rotations rotations, System.Guid[] references, string identifier, bool movingLocal, double interfaceStart, double interfaceEnd) { // convert geometry Geometry.Edge edge0 = Geometry.Edge.FromDynamoLineOrArc2(firstCurve); Geometry.Edge edge1 = Geometry.Edge.FromDynamoLineOrArc2(secondCurve); Geometry.FdVector3d x = Geometry.FdVector3d.FromDynamo(localX); Geometry.FdVector3d y = Geometry.FdVector3d.FromDynamo(localY); // rigidity Releases.RigidityDataType3 rigidity = new Releases.RigidityDataType3(motions, rotations); // references GuidListType[] refs = new GuidListType[references.Length]; for (int idx = 0; idx < refs.Length; idx++) { refs[idx] = new GuidListType(references[idx]); } return(new ConnectedLines(edge0, edge1, x, y, rigidity, refs, identifier, movingLocal, interfaceStart, interfaceEnd)); }
public static EdgeConnection Define(Releases.Motions motions, Releases.Rotations rotations) { return(new EdgeConnection(motions, rotations)); }
public static ConnectedPoints Define(Autodesk.DesignScript.Geometry.Point firstPoint, Autodesk.DesignScript.Geometry.Point secondPoint, Releases.Motions motions, Releases.Rotations rotations, System.Guid[] references, string identifier) { // convert geometry Geometry.FdPoint3d p1 = Geometry.FdPoint3d.FromDynamo(firstPoint); Geometry.FdPoint3d p2 = Geometry.FdPoint3d.FromDynamo(secondPoint); // rigidity Releases.RigidityDataType2 rigidity = new Releases.RigidityDataType2(motions, rotations); // references GuidListType[] refs = new GuidListType[references.Length]; for (int idx = 0; idx < refs.Length; idx++) { refs[idx] = new GuidListType(references[idx]); } return(new ConnectedPoints(p1, p2, rigidity, refs, identifier)); }