Message 1 of 5
Arc bulge point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Anyone have an idea of how I can check which portion of the circumference the arc is on. I have the code and can get the bulge point on either side, but cant figure out how to determine which? Although I guess there could be a problem if its a half circle. Ideas? Trying to get the bulge point from an arc.
(defun c:test (/ pnt1 pnt2 pnt3 arcent arcdata orgstartPoint orgendPoint centerPoint starang arclength endang chordcenter radius bulgepnt)
(setq pnt1 (getpoint "\nPick point: "))
(setq arc (entsel "\nSelect Arc: "))
(setq arcdata (vlax-ename->vla-object (car arc)))
(setq orgstartPoint (vlax-curve-getstartpoint arcdata))
(setq orgendPoint (vlax-curve-getendpoint arcdata))
(setq centerPoint (cdr (assoc 10 (entget (car arc)))))
(setq startang (angle centerPoint orgstartPoint))
(setq arclength (vla-get-ArcLength arcdata))
(setq radius (vla-get-radius arcdata))
(setq endang (angle centerPoint orgendPoint))
(setq chordcenter (polar orgstartPoint (angle orgstartPoint orgendPoint) (/ (distance orgstartPoint orgendPoint) 2)))
(if
(????????)
(setq bulgepnt (polar centerPoint (angle chordcenter centerPoint) radius));larger
(setq bulgepnt (polar centerPoint (angle centerPoint chordcenter) radius));smaller
)
(command "_circle" bulgepnt 0.5"")
);defun