www.mxdraw.com
|
把曲线离散成直线,和圆弧.
McDbObjectIdArray Mx_DiscreteCurve(McDbObjectId id, double approxEps);
参数 |
说明 |
double approxEps |
离散后的最小弧的弧高。 |
McDbObjectId |
曲线id |
例如: 如 C#语言.
private void axMxDrawX1_CustomEvent_1(object sender, AxMxDrawXLib._DMxDrawXEvents_CustomEventEvent e) { MxDrawUtility mxUtility = new MxDrawUtility(); MxDrawPoint getPt; MxDrawEntity ent = mxUtility.GetEntity(out getPt, "选择实体"); if (ent == null) return; Int64 id = ent.ObjectID; ent.Close(); MxDrawResbuf param = new MxDrawResbuf(); param.AddObjectId(id); param.AddDouble(0.1); MxDrawResbuf ret = (MxDrawResbuf)axMxDrawX1.CallEx("Mx_DiscreteCurve", param); for (int i = 1; i < ret.Count; i++) { MxDrawEntity ent2 = (MxDrawEntity)axMxDrawX1.ObjectIdToObject(ret.AtObjectId(i)); ent2.colorIndex = MxDrawXLib.MCAD_COLOR.mcGreen; }