Jump to content

Recommended Posts

Posted

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.

Posted

Look at Lee Macs website and grread

Posted

I've seen grread, it's very universal and...complicated...I was hoping for something simpler, more specific to just grabbing a grip programmatically...

Posted

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)

  • Agree 1
Posted

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.

  • Like 1
Posted

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

Posted
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.

Posted

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)
)

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...