Jump to content

Draw ARC with Bulge


SZLMCL

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

You can derive the necessary arguments from the definition of the bulge:

 

[ATTACH]18688[/ATTACH]

 

Thanks, I managed to solve it in VBA.:)

Link to comment
Share on other sites

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