public static JointCoordinate ParseAST(string data) { //Example //N001 UNIT 1.000 1.000 KIP FT KIP FT NODE, x[NODE]*lfact, y[NODE]*lfact, z[NODE]*lfact, TX, TY, TZ, RX, RY, RZ //N001 1 0 0 0 0 0 0 0 0 0 //N001 2 30 0 0 0 0 0 0 0 0 //...... //...... string temp = data.Trim().TrimEnd().TrimStart(); temp = temp.Replace('\t', ' '); while (temp.IndexOf(" ") != -1) { temp = temp.Replace(" ", " "); } string[] values = temp.Split(new char[] { ' ' }); JointCoordinate obj = new JointCoordinate(); if (values.Length != 11) { throw new Exception("String Data is not correct format."); } obj.NodeNo = int.Parse(values[1]); obj.Point.x = double.Parse(values[2]); obj.Point.y = double.Parse(values[3]); obj.Point.z = double.Parse(values[4]); return(obj); }
public static JointCoordinate ParseTXT(string data) { // JOINT COORDINATES // 1 0 0 0 ; 2 30 0 0 // 3 0 20 0 ; 4 10 20 0 ; 5 20 20 0 ; 6 30 20 0 // 7 0 35 0 ; 8 30 35 0 ; 9 7.5 35 0 ; 10 22.5 35 0 ; 11 15 35 0 // 12 5 38 0 ; 13 25 38 0 ; 14 10 41 0 ; 15 20 41 0 ; 16 15 44 0 string temp = data.Trim().TrimEnd().TrimStart(); temp = temp.Replace('\t', ' '); while (temp.IndexOf(" ") != -1) { temp = temp.Replace(" ", " "); } string[] values = temp.Split(new char[] { ' ' }); JointCoordinate obj = new JointCoordinate(); if (values.Length != 4) { throw new Exception("String Data is not correct format."); } obj.NodeNo = int.Parse(values[0]); obj.Point.x = double.Parse(values[1]); obj.Point.y = double.Parse(values[2]); obj.Point.z = double.Parse(values[3]); return(obj); }
public Element(Element elmt) { this.elementNo = elmt.elementNo; this.node1 = elmt.node1; this.node2 = elmt.node2; this.node2 = elmt.node2; this.node2 = elmt.node2; }
public MemberIncidence() { iMemberNo = 0; gpStartNode = new JointCoordinate(); gpEndNode = new JointCoordinate(); mType = MembType.BEAM; //Property = new MemberProperty(); }
public Element() { elementNo = -1; node1 = new JointCoordinate(); node2 = new JointCoordinate(); node3 = new JointCoordinate(); node4 = new JointCoordinate(); sThickness = ""; sDen = ""; }
public Support() { jcNode = new JointCoordinate(); soOption = SupportOption.FIXED; FX = true; FY = true; FZ = true; MX = true; MY = true; MZ = true; }
public JointCoordinate(JointCoordinate objData) { this.iNodeNo = objData.iNodeNo; this.gpPts = objData.gpPts; }