shilvyan  

2013年5月10日

摘要: 必须提交事务,只有事务提交才能在CAD图形中显示出来。using (Transaction trans = db.TransactionManager.StartTransaction()) { bool success1 = false;//画一条多线段,并实时显示出来 DrawDMFX(polylineEndPoint, polylineStartPoint, LoadLinetype("RL", "C:/Users/Administrator/Desktop/断面方面.lin", ref success1)); dmCS.DmFWJ = CalDm 阅读全文
posted @ 2013-05-10 10:26 shilvyan 阅读(663) 评论(0) 推荐(0) 编辑
 
摘要: View Code 1 /// <summary> 2 /// 保存文档 3 /// </summary> 4 /// <param name="txt"></param> 5 /// <param name="filename"></param> 6 public void Save(string txt, string filename) 7 { 8 if (txt != string.Empty) 9 {10 S... 阅读全文
posted @ 2013-05-10 10:21 shilvyan 阅读(248) 评论(0) 推荐(0) 编辑
 
摘要: /// /****点到直线的距离*** /* 过点(x1,y1)和点(x2,y2)的直线方程为:KX -Y + (x2y1 - x1y2)/(x2-x1) = 0 * 设直线斜率为K = (y2-y1)/(x2-x1),C=(x2y1 - x1y2)/(x2-x1) * 点P(x0,y0)到直线AX + BY +C =0DE 距离为:d=|Ax0 + By0 + C|/sqrt(A*A + B*B) * 点(x3,y3)到经过点(x1,y1)和点(x2,y2)的直线的最短距离为: * distance = |K*x3 - y3 + C|/sqrt(K*K + 1) */View Code .. 阅读全文
posted @ 2013-05-10 10:18 shilvyan 阅读(644) 评论(0) 推荐(0) 编辑
 
摘要: 1- 类GCD public class GCD:IComparable { //高程点X坐标 private double gcdX; public double GcdX { get { return gcdX; } set { gcdX = value; } } //高程点Y坐标 private double gcdY; public double GcdY { get { return gc... 阅读全文
posted @ 2013-05-10 10:08 shilvyan 阅读(512) 评论(0) 推荐(0) 编辑