www.mxdraw.com
内容索引主面
前一个向上下一个
MxDrawXCustomFunction::Mx_DiscreteCurve 方法

把曲线离散成直线,和圆弧.

IDL
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;
            }
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!