3D 绕行大改前保存 包括相关函数

This commit is contained in:
szdot 2023-12-27 14:36:53 +08:00
parent dba45707b5
commit 569d1a0569

View File

@ -52,38 +52,38 @@ namespace FlyCube
Vector3[] aVecs = abVecs[0].ToArray(); Vector3[] aVecs = abVecs[0].ToArray();
Vector3[] bVecs = abVecs[1].ToArray(); Vector3[] bVecs = abVecs[1].ToArray();
Vector3[] new_bVecs = FlyVecFun.ContactABOut(aVecs, bVecs, StrPrint); Vector3[] new_bVecs = FlyVecFun.ContactABOut(aVecs, bVecs, StrPrint);
List<List<Vector3>> re = FlyVecFun.ABypassB(aVecs, new_bVecs, StrPrint, GetVal); //List<List<Vector3>> re = FlyVecFun.ABypassB(aVecs, new_bVecs, StrPrint, GetVal);
string txta = ""; //string txta = "";
string txtb = ""; //string txtb = "";
string txtc = ""; //string txtc = "";
string txtd = ""; string txtd = "";
for (int i = 0; i < abVecs[0].Length; i++) for (int i = 0; i < abVecs[0].Length; i++)
{ {
if (re.Count > 0) //if (re.Count > 0)
{ //{
txta += i + " 0" + " " + re[0][i].X + " " + re[0][i].Y + " " + re[0][i].Z + "\r\n"; // txta += i + " 0" + " " + re[0][i].X + " " + re[0][i].Y + " " + re[0][i].Z + "\r\n";
} //}
if (re.Count > 1) //if (re.Count > 1)
{ //{
txtb += i + " 0" + " " + re[1][i].X + " " + re[1][i].Y + " " + re[1][i].Z + "\r\n"; // txtb += i + " 0" + " " + re[1][i].X + " " + re[1][i].Y + " " + re[1][i].Z + "\r\n";
txtc += i + " 0" + " " + re[2][i].X + " " + re[2][i].Y + " " + re[2][i].Z + "\r\n"; // txtc += i + " 0" + " " + re[2][i].X + " " + re[2][i].Y + " " + re[2][i].Z + "\r\n";
} //}
txtd += i + " 0" + " " + new_bVecs[i].X + " " + new_bVecs[i].Y + " " + new_bVecs[i].Z + "\r\n"; txtd += i + " 0" + " " + new_bVecs[i].X + " " + new_bVecs[i].Y + " " + new_bVecs[i].Z + "\r\n";
} }
if (re.Count > 0) //if (re.Count > 0)
{ //{
SaveFile("C:/Users/szdot/Desktop/a.txt", txta); // SaveFile("C:/Users/szdot/Desktop/a.txt", txta);
} //}
if (re.Count > 1) //if (re.Count > 1)
{ //{
SaveFile("C:/Users/szdot/Desktop/b.txt", txtb); // SaveFile("C:/Users/szdot/Desktop/b.txt", txtb);
SaveFile("C:/Users/szdot/Desktop/c.txt", txtc); // SaveFile("C:/Users/szdot/Desktop/c.txt", txtc);
} //}
SaveFile("C:/Users/szdot/Desktop/d.txt", txtd); SaveFile("C:/Users/szdot/Desktop/d.txt", txtd);
} }
else else