IToastThereforeIAm Posted Wednesday at 09:57 PM Posted Wednesday at 09:57 PM Hi, How can I ensure that vlax-curve-getClosestPointToProjection returns the closest point in every case? I suspect that the curve is merging in the projected plane and therefore it does not always return the closest point in the desired direction. Alternatively, I could probably use vla-IntersectWith method with a line object and find the closest point, but I'm using grread where vlax-curve-getClosestPointToProjection will be more appropriate, I don't have to create and delete line objects in while loop. Animation.apng Drawing1.dwg sline2_dev_v2.lsp 1 Quote
mhupp Posted Thursday at 01:46 PM Posted Thursday at 01:46 PM (edited) I Really need to start using grread and grdraw more. seen some really nice things the past few week on here. what happens if you take out LM:rounddown function call? -edit i haven't run the code but might be something in the (if (< dst dse) that isn't updateing the cpt point correctly. that is making "outside" the other line. Edited Thursday at 02:09 PM by mhupp Quote
IToastThereforeIAm Posted 14 hours ago Author Posted 14 hours ago On 20/11/2025 at 14:46, mhupp said: I Really need to start using grread and grdraw more. seen some really nice things the past few week on here. what happens if you take out LM:rounddown function call? -edit i haven't run the code but might be something in the (if (< dst dse) that isn't updateing the cpt point correctly. that is making "outside" the other line. In this part of the code, only the steps on the direction curve are calculated, the intersections are generated in the mssln:line subfunction. There is a problem. I found out that if I adjust z coordinate of the normal vector from 0.0 to 1e-8, I get acceptable results. But mysteriously that doesn't work if the boundary is an arc. 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.