Proctor Posted February 11, 2010 Posted February 11, 2010 Hello: I'm currently working with .net api and using Autocad 09 mechanical. I have a point and a line and I need to find another line that's perpendicular to the line and also passes through the point (see pic - red line represents line I'm looking for. The point and the other line are given). I need to find this line programmatically. Thanks, Proctor Quote
Lee Mac Posted February 11, 2010 Posted February 11, 2010 Take a look at: curve.GetClosestPointTo(pt,false) Quote
Proctor Posted February 11, 2010 Author Posted February 11, 2010 that looks like it might help....let me give it a try. thanks, Proctor Quote
Proctor Posted February 11, 2010 Author Posted February 11, 2010 then again, just because it's the closest point on the line to the point doesn't mean it's going to be perpedicular like i need. mmm Proctor Quote
Lee Mac Posted February 11, 2010 Posted February 11, 2010 then again, just because it's the closest point on the line to the point doesn't mean it's going to be perpedicular like i need. mmm Proctor I think you'll find it will be :wink: by the laws of Euclidean geometry and all.. Quote
lpseifert Posted February 11, 2010 Posted February 11, 2010 If you're working with lines it sure will Quote
Proctor Posted February 11, 2010 Author Posted February 11, 2010 I just bought a book on geometry...I need to brush up on it. ok, let me give this a try. I'll get back to you. thanks again, proctor Quote
BIGAL Posted February 12, 2010 Posted February 12, 2010 Good one Lee never thought of that as you say a circle will only touch the line at one point and it is true perpendicular. Just a side you can always use basic geometry to calculate it as well its pretty easy as you have a perp answer. You just need to know the angle of the line and calculate the angle & dist from an end of line to the picked point the rest is sin cos tan. Just a quick one Lee do you have pick a point near a line end draw perp then move new line to the end of exsiting line variation of this request. Option 2. Quote
Lee Mac Posted February 12, 2010 Posted February 12, 2010 Good one Lee never thought of that as you say a circle will only touch the line at one point and it is true perpendicular. Thanks, quite a few of my programs use this law. Just a quick one Lee do you have pick a point near a line end draw perp then move new line to the end of exsiting line variation of this request. Option 2. Once you have the picked point, you then have the perpendicular point, and hence the angle/distance between the two, so your options are endless Quote
Proctor Posted February 12, 2010 Author Posted February 12, 2010 Lee Mac: I've been working with curve.GetClosestPointTo(pt,false) and it appears to be working! thank you for telling me about this. Also, thanks to everyone for their inputs. Proctor Quote
Lee Mac Posted February 12, 2010 Posted February 12, 2010 Lee Mac: I've been working with curve.GetClosestPointTo(pt,false) and it appears to be working! thank you for telling me about this. Also, thanks to everyone for their inputs. Proctor You're welcome Proctor Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.