コード例 #1
0
ファイル: Restraint.cs プロジェクト: tevfikoguz/DynamoSAP
 public static Dictionary <string, object> Decompose(Restraint restraint)
 {
     // Return outputs
     return(new Dictionary <string, object>
     {
         { "Tx", restraint.u1 },
         { "Ty", restraint.u2 },
         { "Tz", restraint.u3 },
         { "Rx", restraint.r1 },
         { "Ry", restraint.r2 },
         { "Rz", restraint.r3 }
     });
 }
コード例 #2
0
ファイル: Restraint.cs プロジェクト: Zombeast88/DynamoSAP
 public static Dictionary<string, object> Decompose(Restraint restraint)
 {
     // Return outputs
     return new Dictionary<string, object>
     {
         {"Tx", restraint.u1},
         {"Ty", restraint.u2},
         {"Tz", restraint.u3},
         {"Rx", restraint.r1},
         {"Ry", restraint.r2},
         {"Rz", restraint.r3}
     };
 }
コード例 #3
0
ファイル: Joint.cs プロジェクト: Zombeast88/DynamoSAP
 /// <summary>
 /// Set Restraints to Joint
 /// </summary>
 /// <param name="Joint">Joint</param>
 /// <param name="Restraint">Restraint</param>
 /// <returns></returns>
 public static Joint SetRestraint( Joint Joint, Restraint Restraint )
 {
     // Create a new Joint using the properties of the input Joint
     Joint newJoint = Joint.FromPoint(Joint.BasePoint);
     // Create label
     newJoint.Label = String.Format("dyn_{0}", Joint.ID.ToString());
     // set the restraint
     newJoint.JointRestraint = Restraint;
        return newJoint;
 }