Page 1 of 1

object insertion automatically x and y direction

PostPosted: Mon Oct 07, 2013 6:45 am
by kaan
Hi everyone,
I need a lisp. I want to insert automatically on a certain size (length,width,thickness) strip. That is, I want to add object one by one according to following rules:

Image

Image

Let me explain with an example:

I'm giving the dimensions

Strip dimensions :
length: 9 mm
width: 6.8 mm
thickness 0.16 mm

Part dimensions :
L= 2 mm
H= 2 mm
B= 1.25x0.16= 0.2 mm
C= L+B= 2+0.2= 2.2 mm

If the length of x-axis is greater than C= L+B I want to insert one part automatically
I want to do it in the same way as the y-axis.

Image

I draw the first part into the strip after calculate for the example above.

9-2.2=6.8 ≥ 2.2 insert one part

after the second part

6.8-2.2=4.6 ≥ 2.2 insert one part

after the third part

4.6-2.2=2.4 ≥ 2.2 insert one part

after the fourth part

2.4-2.2=0.2 < 2.2 finish

Re: object insertion automatically x and y direction

PostPosted: Mon Oct 07, 2013 5:50 pm
by nuntius
Are you doing this in AutoCAD?

Re: object insertion automatically x and y direction

PostPosted: Tue Oct 08, 2013 1:37 am
by kaan
Yes I want to do that in AutoCAD. I wonder how a lisp can be written to do this?

Thanks in advance for your helps.

Re: object insertion automatically x and y direction

PostPosted: Tue Oct 08, 2013 7:12 pm
by nuntius
Ahh, this forum is not very busy with AutoCAD users. We have a list of links to other sites that may be more helpful.

viewtopic.php?f=29&t=4036