Jump to content

Recommended Posts

Posted

I am trying to figure out if I can create an array with each element decreasing in size by a fixed amount. I have a pattern ( basically a triangle + rectangle connected) and I want 128 of them lined up horizontally. Is there a way to create this array where the length along the x-axis scales, say by 0.1, for each consecutive pattern.

 

I've created a block of the patten, was able to scale the x axis dimension for each consecutive element, and aligned on a horizontal line. But now, like I mentioned, need 128 of them and was hoping for a better way.

 

I would appreciate the assistance.

 

Thank you

Posted
I am trying to figure out if I can create an array with each element decreasing in size by a fixed amount. I have a pattern ( basically a triangle + rectangle connected) and I want 128 of them lined up horizontally. Is there a way to create this array where the length along the x-axis scales, say by 0.1, for each consecutive pattern.

 

I've created a block of the patten, was able to scale the x axis dimension for each consecutive element, and aligned on a horizontal line. But now, like I mentioned, need 128 of them and was hoping for a better way.

 

I would appreciate the assistance.

 

Thank you

 

It is a little hard to visualize what you are after, can you post a sketch or drawing illustrating what you are after.

Posted

Might see if one of the autolisp gurus need a challenge. Something that would copy and scale scale maybe?

Posted

Attached is a picture of what I mean. The pattern I have is a little bit more complex than the picture and I need 128(minimum) elements. Each element is scaled only in on the x axis. I'm fairly new to autocad so I was hoping for a solution that did not involve AutoLISP. That said, if there is no other way, what is the learning curve for AutoLISP.

 

Thanks for the time.

 

test1.jpg

Posted
Attached is a picture of what I mean. The pattern I have is a little bit more complex than the picture and I need 128(minimum) elements. Each element is scaled only in on the x axis. I'm fairly new to autocad so I was hoping for a solution that did not involve AutoLISP. That said, if there is no other way, what is the learning curve for AutoLISP.

 

Thanks for the time.

 

[ATTACH]26315[/ATTACH]

 

I can approximate that but with the rectangles getting closer together. I drew a rectangle, made it a region, changed the ucs, did a circular array, went back to WCS, used the flatten command.

array.jpg

Posted

rkent,

My design requires the pitch to be the same along the array.

 

Thanks though.

Posted
....., what is the learning curve for AutoLISP.

 

From my own experience and as far as I remember, you could learn enough to do this in about 2 days.

Posted

You could draw one rectangle, ad a parametric constraint for the x-axis and a couple of perpendicular constraints to make sure everything moves like you want, then array them and edit the length of each one. That would be quicker than stretching each rectangle. You could use a spreadsheet to generate the lengths, and then copy and paste them.

Posted
The pattern I have is a little bit more complex than the picture ...

 

Out of the box AutoCAD doesn't know how to do what you want. A custom lisp program is the easiest solution I can see.

 

How complex is the object you want to array and which way do you want it to decrease in size? Do you want to array the objects already existing or do you need to draw them first and then array?

Posted

If you make it a block, you can just keep changing the X value.

Posted (edited)

Here is a simple lisp program that draws a rectangle 13 x 5 and arrays it 128 times, with unit distance 15 to the right. Each rectangle to the right is narrower by 0.1.

 

(defun c:as (/ ra rb rc rd di n ip dis osn)
 (command "_.undo" "begin")
 (setq	osn (getvar "osmode")
ra  13.0;(getdist "\n Rectangle horizontal dimension: ")
rb  5.0;(getdist "\n Rectangle vertical dimension: ")
di  15.0;(getdist "\n Constant unit distance: ")
n   128;(getint "\n Number of units in array: ")
ip  (getpoint "\n Insert first rectangle by lower left corner: ")
rc  (polar ip 0 ra)
rd  (polar rc (* pi 0.5) rb)
dis (+ di di)
 )
 (setvar "osmode" 0)
 (command "rectang" ip rd)
 (while (<= dis (* di n))
   (setq dis (+ dis di)
  ip  (polar ip 0 (+ di 0.1))
  rd  (polar rd 0 di)
   )
   (command "rectang" ip rd)
 )
 (setvar "osmode" osn)
 (command "_.undo" "end")
 (princ)
)

Edited by paulmcz
left - right mix-up
Posted

Thanks a lot paulmcz. I will give it a try as soon as I can.

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