public static object To_DynamoObj_sPointSupport(sPointSupport pointSupport) { sDynamoConverter dyncon = new sDynamoConverter("Meters", "Feet"); Dyn.Point lp = (Dyn.Point)dyncon.EnsureUnit((dyncon.ToDynamoPoint(pointSupport.location))); Dyn.Vector force = null; if (pointSupport.reaction_force != null) { force = dyncon.EnsureUnit_Force(dyncon.ToDynamoVector(pointSupport.reaction_force)); } Dyn.Vector moment = null; if (pointSupport.reaction_moment != null) { moment = dyncon.EnsureUnit_Force(dyncon.ToDynamoVector(pointSupport.reaction_moment)); } return(new Dictionary <string, object> { { "location", lp }, { "supportType", pointSupport.supportType.ToString() }, { "constraints", pointSupport.constraints }, { "reactionForce", force }, { "reactionMoment", moment }, }); }
public static object To_DynamoObj_sPointLoad(sPointLoad pointLoad) { sDynamoConverter dyncon = new sDynamoConverter("Meters", "Feet"); Dyn.Point lp = (Dyn.Point)dyncon.EnsureUnit((dyncon.ToDynamoPoint(pointLoad.location))); //Dyn.PolyCurve pc = (Dyn.PolyCurve) dyncon.EnsureUnit((dyncon.ToDynamoPolyCurve(pointLoad.tributaryArea.areaBoundary))); Dyn.Vector force = null; if (pointLoad.forceVector != null) { force = dyncon.ToDynamoVector(dyncon.EnsureUnit(pointLoad).forceVector); } Dyn.Vector moment = null; if (pointLoad.momentVector != null) { moment = dyncon.ToDynamoVector(dyncon.EnsureUnit(pointLoad).momentVector); } return(new Dictionary <string, object> { { "location", lp }, { "loadPattern", pointLoad.loadPatternName }, { "forceVec", force }, { "momentVec", moment } }); }