public FaultKeyLine(KeyLine fline, KeyLine kline1, KeyLine kline2) { this.fline = fline; this.kline1 = kline1; this.kline2 = kline2; CalculateKeyPoint(); translationVector = CalculateTranslationVector(); }
private void initKeyPoint() { // 断裂线 double x1 = Convert.ToDouble(textBox2.Text); double y1 = Convert.ToDouble(textBox3.Text); double z1 = Convert.ToDouble(textBox4.Text); double x2 = Convert.ToDouble(textBox5.Text); double y2 = Convert.ToDouble(textBox6.Text); double z2 = Convert.ToDouble(textBox7.Text); // 特征线 1 double x3 = Convert.ToDouble(textBox8.Text); double y3 = Convert.ToDouble(textBox9.Text); double z3 = Convert.ToDouble(textBox10.Text); double x4 = Convert.ToDouble(textBox11.Text); double y4 = Convert.ToDouble(textBox12.Text); double z4 = Convert.ToDouble(textBox13.Text); // 特征线 2 double x5 = Convert.ToDouble(textBox14.Text); double y5 = Convert.ToDouble(textBox15.Text); double z5 = Convert.ToDouble(textBox16.Text); double x6 = Convert.ToDouble(textBox17.Text); double y6 = Convert.ToDouble(textBox18.Text); double z6 = Convert.ToDouble(textBox19.Text); // 断裂线 PointXYZ point1 = new PointXYZ(x1, y1, 0); PointXYZ point2 = new PointXYZ(x2, y2, 0); // 标志线 1 PointXYZ point3 = new PointXYZ(x3, y3, 0); PointXYZ point4 = new PointXYZ(x4, y4, 0); // 标志线 2 PointXYZ point5 = new PointXYZ(x5, y5, 0); PointXYZ point6 = new PointXYZ(x6, y6, 0); KeyLine fline = new KeyLine(point1, point2); KeyLine kline1 = new KeyLine(point3, point4); KeyLine kline2 = new KeyLine(point5, point6); Const.FK_LINE = new FaultKeyLine(fline, kline1, kline2); Console.WriteLine(Convert.ToString(Const.FK_LINE.getTranslationVector().getX() + ":" + Const.FK_LINE.getTranslationVector().getY() + ":" + Const.FK_LINE.getVectorDistance())); }
public static PointXYZ getIntersectPoint(KeyLine line1, KeyLine line2) { PointXYZ point = new PointXYZ(); double k1 = line1.getK(); double b1 = line1.getB(); double k2 = line2.getK(); double b2 = line2.getB(); double x0 = (b2 - b1) / (k1 - k2); double y0 = (k1 * b2 - k2 * b1) / (k1 - k2); point.setX(x0); point.setY(y0); return(point); }
public static void initKeyLine() { FAULT_LINE = new KeyLine(FAULT_LINE_POINT_START, FAULT_LINE_POINT_END); KEY_LINE1 = new KeyLine(KEY_LINE1_POINT_START, KEY_LINE1_POINT_END); KEY_LINE2 = new KeyLine(KEY_LINE2_POINT_START, KEY_LINE2_POINT_END); }
public void setKLine2(KeyLine kline2) { this.kline2 = kline2; }
public void setKLine(KeyLine kline1) { this.kline1 = kline1; }
public void setFLine(KeyLine fline) { this.fline = fline; }