Dahzee Posted November 23, 2021 Share Posted November 23, 2021 I have had a look through the various forums and wasn't able to find anything like this but I have a requirement to draw an Arc that you choose the Start point, then the Center and finally to finish the arc on what would be the intersection of a line. I am using Bricscad and am unable to achieve this irrespective of any intersection snaps selected. Am I missing something or is there another Arc option that would do this or would I have to resort to having an Autolisp achieve this? Attached is a video which hopefully will explain what I am trying to create ( I can't get the arc to stop on the vertical line). Thanks in advance for any advice. Arc Creation.mp4 Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted November 23, 2021 Share Posted November 23, 2021 (edited) See if you're happy with this: After you set the start point and center, the routine draws a temporary circle. Then you can use that circle to find the intersect point (I feel like that intersect point is the main issue). You set that end point, then the arc is drawn, then the circle is removed. (Edit of my code: arcs are always drawn anti clockwise. Maybe you need a clockwise arc, like in your video. In that case type R and press enter at the end ) ;;; entmakex stuff. @see https://www.theswamp.org/index.php?topic=32148.0 (defun drawArc (cen rad sAng eAng) (entmakex (list (cons 0 "ARC") (cons 10 cen) (cons 40 rad) (cons 50 sAng) (cons 51 eAng)))) (defun drawCircle (cen rad) (entmakex (list (cons 0 "CIRCLE") (cons 10 cen) (cons 40 rad)))) ;;;;;;;;;;;;;;;;;;;;;;;;; ;; Custom Draw Arc (defun c:cda ( / sp cp ep tempcircle arc str) (setq sp (getpoint "\nStart point: ")) (setq cp (getpoint "\nCenter point: ")) ;; draw temporary circle (setq tempcircle (drawCircle cp (distance cp sp))) (setq ep (getpoint "\nEnd point: ")) (setq arc (drawArc cp (distance cp sp) (angle cp sp) (angle cp ep))) ;; delete temp circle (entdel tempcircle) ;; Now you might want the reversed start and end (princ ) (setq str (getstring "\nIf you're happy with this arc press enter. If you want the reversed Start/End, then type R: ")) (if (or (= str "r") (= str "R")) (progn ;; delete previous arc, redraw it with reversed angles (entdel arc) (setq arc (drawArc cp (distance cp sp) (angle cp ep) (angle cp sp))) ) ) (princ) ) Edited November 23, 2021 by Emmanuel Delay 1 Quote Link to comment Share on other sites More sharing options...
mhupp Posted November 23, 2021 Share Posted November 23, 2021 (edited) Nothing to snap to because nothing is there yet. (maybe nearest) Use extend or trim. I guess you could program the start point, center, draw a circle so their is something to snap to then delete/trim the circle. Beat me too it Emmanuel. Edited November 23, 2021 by mhupp 1 Quote Link to comment Share on other sites More sharing options...
Dahzee Posted November 23, 2021 Author Share Posted November 23, 2021 @Emmanuel Delay Thanks for this, it is very nearly there. If you look at the video, I am using snap tracking to create the first point, If I try to do this using your routine, there is no way I can control where the center point for the arc will be as the tracking is lost. I don't want to sound ungrateful as it is a fabulous effort for such a quick reply Quote Link to comment Share on other sites More sharing options...
mhupp Posted November 23, 2021 Share Posted November 23, 2021 (edited) 1 hour ago, Dahzee said: @Emmanuel Delay Thanks for this, it is very nearly there. If you look at the video, I am using snap tracking to create the first point, If I try to do this using your routine, there is no way I can control where the center point for the arc will be as the tracking is lost. I don't want to sound ungrateful as it is a fabulous effort for such a quick reply You can still use snap tracking to set start point so just change how the 2nd point is found. this will act like snap tracking and ref the start point. (setq cp (getpoint sp "Center Point: ")) ---EDIT--- You can snap track the start point and cp the other way just have to do it twice and add the .5 to the cp Edited November 23, 2021 by mhupp 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 24, 2021 Share Posted November 24, 2021 1st you can reset the osnaps for every getpoint that is required using osmode variable. set osnap getpoint set osnap getpoint 2nd Like Emmanuel pick start pick centre, then pick past line, two options use trim to remove section past line or use intersectwith and redraw the arc with correct end point. Both not tested. Ok learn something new when asked for endpoint hold Ctrl down will reverse arc direction. So get extended arc as per movie. 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.