Polar Array with continuously increasing gap angle between two objects

Polar Array with continuously increasing gap angle between two objects

Anonymous
Not applicable
1,252 Views
6 Replies
Message 1 of 7

Polar Array with continuously increasing gap angle between two objects

Anonymous
Not applicable

Hi,

I am trying to create a polar array of an object. But in array objects get placed at equal angle. How can i vary the angle between two objects ? For example I want the angle between my objects in polar array in an incresing arithmetic progression (AP) like 2,4,6,8....degrees.

 

Regards,

Puskar

0 Likes
1,253 Views
6 Replies
Replies (6)
Message 2 of 7

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I want the angle between my objects in polar array in an incresing 

>> arithmetic progression (AP) like 2,4,6,8....degrees.

Sorry, can't be done using command _ARRAY.

This command does not have that option.

 

You either need to run that manually or create a tool by yourself (using LISP, VBA, C#, VB.NET, ...)

 

- alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 7

devitg
Advisor
Advisor

Please upload a sample.dwg 

0 Likes
Message 4 of 7

Anonymous
Not applicable

I have attached a sample photo (hope it will help). I need to make it in Autocad. 

0 Likes
Message 5 of 7

devitg
Advisor
Advisor

Please , a line , angle to fill, angle step law 

0 Likes
Message 6 of 7

Sea-Haven
Mentor
Mentor

Sounds like a lisp problem just copy an object radially and say have a list of the angle increment or new angle.

 

; setq angs or use a formula etc
(defun c:test ( / angs obj x pt)
(setq angs '(2 4 7 11 23 35 46))
(setq obj (entsel "Pick obj"))
(setq pt (getpoint "Pick centre point"))
(repeat (setq x (length angs))
(command "rotate" obj "" pt "c" (nth (setq x (- x 1)) angs))
)
)
(c:test)

 

0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant

@Sea-Haven wrote:

.... 

….
(setq angs '(2 4 7 11 23 35 46))
(setq obj (entsel "Pick obj"))
(setq pt (getpoint "Pick centre point"))
(repeat (setq x (length angs))
(command "rotate" obj "" pt "c" (nth (setq x (- x 1)) angs))
….

That would need to have added to it the making of a Copy  each time, not just repeatedly Rotating the selected object.  And the selection should be (car obj) [the entity, not the list  of the entity and the selection point].  And it works with only one selected object.  Also, in an arithmetic progression, there's no need to create an explicit list of angles -- all you need is the initial value which is also the incrementing value.

 

Here's a way that will allow multiple  objects [just as AutoCAD's Arraying commands do], lightly tested:

 

(defun C:APIA ; = Array Polar at Increasing Angle
  (/ ss)
  (prompt "\nTo Array object(s) in Polar fashion at Increasing Angle,")
  (setq
    ss (ssget ":L"); any number of things
    ctr (getpoint "\nCenter point: ")
    ang (getangle "\nInitial angle and increment: ")
    qua (getint "\nNumber of Copies {not including original(s)}: ")
    n 1
  ); setq
  (command
    "_.copy" ss "" "_none" "0,0" "" ; in place
    "_.rotate" "_previous" "" "_none" ctr (angtos ang); Rotates originals, not copies
); command (repeat (1- qua) (command "_.copy" "_previous" "" "_none" "0,0" "" ; continuously re-uses originals "_.rotate" "_previous" "" "_none" ctr (angtos (* ang (setq n (1+ n)))) ); command ); repeat ); defun

And it accepts negative  angle values to "Array" in the clockwise  direction if that's what you need. 

Kent Cooper, AIA