Nikon Posted Saturday at 07:50 AM Share Posted Saturday at 07:50 AM (edited) https://lee-mac.com/circletangents.html These lines are from the code Lisp CircleTangentsV1-0 to snap to a point: ("endpoint" " of " 00001) ("midpoint" " of " 00002) ("center " " of " 00004) ("node" " of " 00008) ("quadrant" " of " 00016) .......................... (grgetpoint "\nSpecify center of 2nd circle: This line of code requests the selection of the 2nd point. To bind to the desired point, the user must type in the command line during the execution of the command, for example, center (or c) - space, an entry appears on the command line: c of , now you need to enter 4 and only then will you be able to get a snap to the center. I would like to simplify these steps. Is it possible in this case to use [.../.../...] to select a binding and not enter additional numbers? Something like this: [Endpoint/Midpoint/Center/Node/Quadrant/Intersection/inSert/Perpendicular] Edited Sunday at 07:10 AM by Nikon Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted Saturday at 12:39 PM Share Posted Saturday at 12:39 PM You can specify APERTURE and OSMODE system variables to desired value prior to running lisp, and GrSnap will recognize where you want to snap if your cursor is near desired snapping entity in range of previously set APERTURE variable... 1 Quote Link to comment Share on other sites More sharing options...
Nikon Posted Saturday at 02:13 PM Author Share Posted Saturday at 02:13 PM (edited) 1 hour ago, marko_ribar said: You can specify APERTURE and OSMODE system variables to desired value prior to running lisp, and GrSnap will recognize where you want to snap if your cursor is near desired snapping entity in range of previously set APERTURE variable... If the APERTURE is 30 (I had 10), then the snap to the center of the circle is triggered. Thank you, this is a simple but effective solution. Edited Saturday at 02:32 PM by Nikon Quote Link to comment Share on other sites More sharing options...
BIGAL Posted Saturday at 09:51 PM Share Posted Saturday at 09:51 PM @marko_ribar has given you a good answer using (setvar 'osmode x) you can reset the osnap in your code as required, you can also set combo's like end,center 5. (setvar 'osmode 1) (setq pt (getpoint "\nPick ")) (setvar 'osmode 4) (setq cen (getpoint "\nPick circle ")) 1 Quote Link to comment Share on other sites More sharing options...
Nikon Posted Sunday at 07:06 AM Author Share Posted Sunday at 07:06 AM (edited) 9 hours ago, BIGAL said: @marko_ribar has given you a good answer using (setvar 'osmode x) you can reset the osnap in your code as required, you can also set combo's like end,center 5. Thanks! Interestingly, all bindings work except for the binding to the center of the circle (although this binding is enabled). It can only be seen after installing APERTURE 30. Edited Sunday at 07:07 AM by Nikon Quote Link to comment Share on other sites More sharing options...
BIGAL Posted Sunday at 10:50 PM Share Posted Sunday at 10:50 PM Looking at your video you need to reset the osnap value if you want pick a circle only, the video shows perp and quad be looked for when it appears you only want center. Then aperture problem should go away but you do need to get near the circle object to find a center (setvar 'osmode 4). In some of my code I reset the osnaps multiple times and at the end reset to user defaults. I see it as a simple fix. 1 Quote Link to comment Share on other sites More sharing options...
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.