yzy0224

CAD返回曲线上一点在曲线上的参数(网页版)

主要用到函数说明:

IMxDrawCurve::GetParamAtPoint

返回曲线上一点在曲线上的参数,具体说明如下:

参数 说明

[in] IMxDrawPoint* point

曲线的点

[out] DOUBLE* pParam

返回曲线上的参数

 js代码实现如下:

    var ent = mxOcx.GetEntity("选择曲线:");
    if (ent == null)
        return;
    var curve;
    if (ent.ObjectName == "McDbSpline")
    {
        curve =ent;
    }
    else
    {
        alert("实体类型不对");
        return;
    }
    var getPt1 = mxOcx.GetPoint(false,0,0,"\n 点取一个点:");
    if (getPt1 == null)
    {
        alert("用户取消..");
        return;
    }
    if (curve.GetParamAtPoint2(getPt1))
    {
        alert(curve.GetParamAtPoint2(getPt1));
    }
    else
    {
        alert("失败");
    }

 

分类:

技术点:

相关文章:

  • 2021-12-23
  • 2022-01-11
  • 2021-11-07
  • 2022-02-01
  • 2021-12-24
  • 2021-12-10
  • 2021-12-24
  • 2022-02-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-09-26
  • 2021-12-17
  • 2021-12-13
相关资源
相似解决方案