Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Jeroen on April 15, 2019, 07:31:17 AM
Title: Combine lists for desk layout and placing blocks
Post by: Jeroen on April 15, 2019, 07:31:17 AM
I have a Lisp that creates two lists throug user-input. These lists are measurements of two different parts. The lists can change in length. For example (top one in screenshot):
A (2 1 2) -> white-rectangles with "100+" in it B (3 2) -> red dashed with value)
What I need is a list with points to put in 2 different blocks. (see screenshot, block A and block B)
The start and end-block I got covered.
List A only contains values of 1or 2 List B contains values of 1, 2, 3or 4
It should work in every combination where the total of the sum of the values in the lists are equal. (two more examples in screenshot)
I have been breaking my mind for hours and I cannot figure it out...
Kind regards, Jeroen Berkers
Title: Re: Combine lists for desk layout and placing blocks
Post by: roy_043 on April 15, 2019, 08:35:07 AM
Your problem is hard to understand. If both list A and B are based on user input what should the Lisp in fact do? If only list B is given and you accept a list A with only 1's (as per your image) the algorithm is rather simple.