马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Testing whether a point is on an AutoCAD polyline using .NET
Occasionally I come across a topic that I’m sure I’ve addressed in a previous post, but for the life of me I can’t track it down. The code in a recent response by Balaji Ramamoorthy, from the DevTech India team, fits firmly into this category: it shows how to iterate through a polyline’s segments, testing whether a point is on the polyline.
I did some refactoring of Balaji’s code to extract it into a helper function (although not an extension method, which people who use them may prefer), but otherwise this C# code is basically his.
When you run the POP command and select a polyline and a point, you’ll see a message on the command-line indicating whether the latter is on the former
[url]http://through-the-interface.typepad.com/through_the_interface/2012/01/testing-whether-a-point-is-on-an-autocad-polyline-using-net.html[/url]
|