Jump to content

Lisp in order to place several 2d objects into equal distances at a given length


ALKISTI

Recommended Posts

Hello,

 

I would like to place several (in every case their number is different) 2d objects _simple rectangls_ into equal distances _at a given length(in every case this is different).

 

I know how to do it manually : lets say that I have 11 boxesX150mm each and the total length is 3100mm and the gap(Y) between the boxes is what I am looking for.

so the equation goes like that: 12Y+11X150=3100

 

but I would like to do it in a more automatic way because there is a LOT of the same stuff that I have to finish.

 

thank you in advance. I am almost sure that someone has faced the same problem with me ..but I dont know how to search for it.

I attach a small photo for better understanding.

 

 

 

alkisti

placement of 2dobjects.jpg

Link to comment
Share on other sites

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    16

  • ALKISTI

    14

  • Commandobill

    7

  • rkent

    6

Top Posters In This Topic

Posted Images

Sorry if this seems the obvious choice, but why don't you use "measure"?

 

because with the command array I dont know where I should place the first object!

unless there is a way and I dont know how to use the command array correctly.

 

I did some efforts with array rectangle and array path but it didnt work. even before submitting the first post.

anyway thank you!

Link to comment
Share on other sites

because with the command array I dont know where I should place the first object!

unless there is a way and I dont know how to use the command array correctly.

 

I did some efforts with array rectangle and array path but it didnt work. even before submitting the first post.

anyway thank you!

 

I guess I see the problem there, but array and measure are not the same command. Give it a try and see if it produces what you need.

Link to comment
Share on other sites

I did some efforts with the array command but I cant fix it. The measure command is for measuring but apart from this I should create a block-something that I dont want. Its highly improbable that there isnt a quicker solution. architects confront this kind of problem in a daily basis.

thank you again for your time. I ll do some extra searching.

Link to comment
Share on other sites

Is it okay with you to relocate the closed LWpolylines with a lisp that asks for the gap distance between all of them ?

 

I think the gap is the hidden variable that he doesnt want to do the math to find. Sounds like he has the total distance, the width of the object and the amount of said object he wants in the area...

Link to comment
Share on other sites

Sounds like he isn't using blocks, just rectangles and the likes.

 

Understood, but such rectangles could easily be converted to anonymous blocks then exploded following the array - I have posted several programs in the past to convert a set of objects to an anonymous block.

 

I dont want to set a specific gap distance! I just want to have equal gaps!! so, maybe no.

 

The DIVIDE command will calculate equal gaps for the given number of divisions.

Link to comment
Share on other sites

sorry, but the divide command doesnt do it! I just checked. I created a block and then I divided the specific length with this block. the gap in the beginning and in the end is bigger that the rest of the gaps! really thank you very much for your time. I ll do it manually for the time being! have a nice day-evening! :)

Link to comment
Share on other sites

sorry, but the divide command doesnt do it! I just checked. I created a block and then I divided the specific length with this block. the gap in the beginning and in the end is bigger that the rest of the gaps! really thank you very much for your time. I ll do it manually for the time being! have a nice day-evening! :)

 

Did you make sure that the insertion point of the block was centered on the object?

Link to comment
Share on other sites

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