弯弯 发表于 2009-1-5 17:01:00

怎样得到多段线上一点处的曲率?

请教高手,怎样得到多段线上一点处的曲率?
什么函数可以实现呢
最好有C#的代码。
呵呵,不胜感激!

ntchjie 发表于 2009-1-7 14:40:00

我也曾经疑惑过很长时间。看看下面代码吧:vbnet的,自己转下。
_
   Public Sub cut()
      Dim db As Database = HostApplicationServices.WorkingDatabase
      Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
      Dim ts As String = vbCr & "请选择线条(圆弧、直线或者多义线):"
      Dim opt As New PromptEntityOptions(ts)
      opt.SetRejectMessage(vbCr & "只能线条")
      opt.AddAllowedClass(GetType(Polyline), True)
      opt.AddAllowedClass(GetType(Arc), True)
      opt.AddAllowedClass(GetType(Line), True)
      Dim res As PromptEntityResult = ed.GetEntity(opt)
      If res.StatusPromptStatus.OK Then
            ed.WriteMessage("用户自行退出!" & vbCr)
      Else
            '获取等分数
            Dim iop As New PromptIntegerOptions("指定等分段的数量:")
            iop.DefaultValue = 10
            Dim irt As PromptIntegerResult = ed.GetInteger(iop)
            Dim n As Integer
            If irt.StatusPromptStatus.OK orElse irt.Value

弯弯 发表于 2009-1-7 20:25:00

谢谢热心肠的ntchjie先生,我试试看...

yanglin112 发表于 2011-11-3 16:05:00

学习了!Mark
页: [1]
查看完整版本: 怎样得到多段线上一点处的曲率?