CAD得到曲线的长度(网页版)
主要用到函数说明:
IMxDrawCurve::GetLength2
返回曲线长度
js代码得到曲线长度实现如下:
function GetCLength() { var ent = mxOcx.GetEntity("选择曲线:"); if (ent == null) return;
var curve; if (ent.ObjectName == "McDbSpline") { curve =ent; } else { alert("实体类型不对"); return; } var curvelen = curve.GetLength2();
alert(curvelen); }
|
浙公网安备 33010602011771号