vanowm Posted April 15, 2023 Posted April 15, 2023 Hello. When you click on middle point of an arc you can drag it to change its shape. Is there a way initiate the same "dragging" of middle of an arc through autolisp? For example ask to select an arc, when user clicks anywhere on the arc its "snaps" middle of the arc to the cursor with ability use osnap Thanks. Quote
vanowm Posted April 15, 2023 Author Posted April 15, 2023 I've seen grread, it's very universal and...complicated...I was hoping for something simpler, more specific to just grabbing a grip programmatically... Quote
Steven P Posted April 15, 2023 Posted April 15, 2023 You could save the snap settings to a variable, change the snap settings to midpoint only, select the arc and hope that the mid point is selected - if the user clicks too far away it might not snap to the mid point. Reset the snap settings using the variable from earlier - doing that a soon as practical in case of a LISP error or user cancels (assuming of course you'd also do this in an error defun but always worth doing it twice to be sure) 1 Quote
mhupp Posted April 15, 2023 Posted April 15, 2023 vlax-curve- functions instead of snaps would be more reliable. or entsel the arc and calcualte the start pt end pt radius and center point to calculate the mid point. 1 Quote
Steven P Posted April 15, 2023 Posted April 15, 2023 Thought of that mhupp, calculate the mid point and snap to there - but you the rules I have about checking things out at the weekend, not so sure I could explain the next steps after arc selection without checking some code Quote
BIGAL Posted April 16, 2023 Posted April 16, 2023 There is a change arc radius and it maintains tangency, which sounds much better than move just mid pt. Dynamic fillet.lsp 1 Quote
vanowm Posted April 22, 2023 Author Posted April 22, 2023 On 4/15/2023 at 11:30 PM, BIGAL said: There is a change arc radius and it maintains tangency, which sounds much better than move just mid pt. Dynamic fillet.lsp 2.95 kB · 1 download Sure, if you know the radius, but in some situations one needs a visual representation first before deciding the final shape. Quote
mhupp Posted April 22, 2023 Posted April 22, 2023 This is what I use when I want a fillet but don't know the exact size of the radius. You select an existing arc, circle, or arc on a polyline and pull its radius. ;;----------------------------------------------------------------------------;; ;; Apply the radius of a selected curved object to the Fillet command (defun C:RR (/ pt r) (if (and (setq pt (cadr (entsel "Select Curve: "))) (setq r (distance (osnap pt "nea") (osnap pt "cen"))) ) (progn (setvar 'filletrad r) (vl-cmdf "_.fillet" "M") ) (prompt "\nNo Radius Found.") ) (princK) ) 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.