Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Kent1Cooper
en respuesta a: Anonymous


@Anonymous wrote:

How do I find the diameter of the isocircle?

 

....

Here's one way, in simplest terms [none of the usual controls yet, etc.]:

 

(defun C:ICD (/ el) ; = IsoCircle Diameter

  (setq el (car (entsel "\nSelect Ellipse to find its axonometric Diameter: ")))

  (* 2 ; to get diameter from:

    (distance ; isometric-axis radius

      (cdr (assoc 10 (entget el))); center

      (vlax-curve-getPointAtParam el (* pi 0.25)); quarter-of-pi Parameter value at axis point

    ); distance

  ); *

); defun

 

Or, the diameter directly:

 

(defun C:ICD (/ el) ; = IsoCircle Diameter
  (setq el (car (entsel "\nSelect Ellipse to find its axonometric Diameter: ")))
  (distance ; isometric-axis diameter
    (vlax-curve-getPointAtParam el (* pi 0.25)); axis point as above
    (vlax-curve-getPointAtParam el (* pi 1.25)); opposite axis point
  ); distance
); defun

 

I think that would be correct for an Ellipse of any axonometric axis ratio, not just an isometric one, hence the wording of the prompt not using the words "isometric" or "isocircle."

Kent Cooper, AIA