Nikon Posted October 19 Posted October 19 (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 October 20 by Nikon Quote
marko_ribar Posted October 19 Posted October 19 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
Nikon Posted October 19 Author Posted October 19 (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 October 19 by Nikon Quote
BIGAL Posted October 19 Posted October 19 @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
Nikon Posted October 20 Author Posted October 20 (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 October 20 by Nikon Quote
BIGAL Posted October 20 Posted October 20 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
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.