Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/19/2020 in all areas

  1. It would make sense to me that the blocks are called 36x24rec 18x9rec If dont want blocks can add xdata to each rectang To hosneyalaa the important question is why is to just do block counting ? You could do rectang size counting.
    1 point
  2. For what it's worth, I exploded these in BricsCAD and they were totally normal contiguous text strings afterwards.
    1 point
  3. It's normally located under this link of your own PC: "C:\Program Files\Common Files\Autodesk Shared" Look for the file "acadauto.chm". You'll find all the methods and the parameters each one takes.
    1 point
  4. 'up' is a list of the two points entailing the upper horizontal line: ((5 3 0) (1 3 0)) 'dw' is a list of the two points entailing the lower horizontal line: ((0 0 0) (7 0 0)) mapcar works as such: (mapcar <function_accepting_n_arguments> <list1> <list2> ... <listn>) And it will return a list resulting from the evaluation of the function as a result of passing its elements into the function... meaning: The first result of mapcar in the list will be by passing: The first item of list1 denoting the first argument of the function, The first item of list2 denoting the second argument of the function, The first item of listn denoting the nth argument of the function. Then the second result of mapcar in the list will be by passing: The second item of list1 denoting the first argument of the function, The second item of list2 denoting the second argument of the function, The second item of listn denoting the nth argument of the function. This process continues until whichever's lists run out first, and evaluation stops. Ultimately, the length of the returned mapcar list will be the length of the shortest list from list1 to listn, so if any one of the lists supplied is nil, mapcar returns nil That said... the function distance accepts two points, so that means following the "(mapcar 'distance" should accept two lists... which is up and dw. Writing (mapcar 'distance '((5 3 0) (1 3 0)) '((0 0 0) (7 0 0)) ) is the equivalent to: (list (distance '(5 3 0) '(0 0 0)) (distance '(1 3 0) '(7 0 0)) ) Lambda is basically a user defined function. You write it in the form of '(lambda (a b c ...) <expressions>) and then following a few more lists equaling the number of arguments in the lambda function. The above and below mean exactly the same thing: (mapcar '(lambda (a b) (distance a b) ) '((0 0 0) (7 0 0)) '((5 3 0) (1 3 0)) ) Now, depending on whether the direction of the upper and lower lines are in the same direction or not (by using the (angle) function), that's the purpose of the reverse function to make sure that the correct diagonal is returned instead. In the end, the above returns '(5.83095 6.7082)
    1 point
×
×
  • Create New...