SZLMCL Posted April 8, 2010 Posted April 8, 2010 Hy, I would like to draw an arc with AutoCAD VBA. Known the arc start- and endpoint, and the value of the bulge. With LWPolyline it is possible to draw an arc easily so (SetBulge), but i need draw the arc with ThisDrawing.ModelSpace.AddArc command. Here is not Setbulge function. (Addarc need StartAngle, EndAngle, Radius, CenterPoint). How can i draw it? Thanks! Quote
Lee Mac Posted April 8, 2010 Posted April 8, 2010 You can derive the necessary arguments from the definition of the bulge: Quote
Lee Mac Posted April 8, 2010 Posted April 8, 2010 In LISP: ;; BulgeData ~ Lee Mac ;; Args: p1,p2 Points, b Bulge ;; Returns: (<centre> <inc. angle> <radius>) (defun BulgeData (p1 p2 b / theta/2 radius centre) (setq theta/2 (* 2. (atan b)) radius (/ (distance p1 p2) (* 2. (sin theta/2))) centre (polar p1 (+ (- (/ pi 2.) theta/2) (angle p1 p2)) radius)) (list centre (* 2. theta/2) (abs radius))) Quote
SZLMCL Posted April 8, 2010 Author Posted April 8, 2010 You can derive the necessary arguments from the definition of the bulge: [ATTACH]18688[/ATTACH] Thanks, I managed to solve it in VBA. 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.