
It does put in some "E" Texts, where they intersect the bottom edge of the rectangle, and one along the left end. The magenta are the points I picked, and the green is the working area - the effective rectangle defined by the points in the 'p' variable. I changed the density of the grid, to better see the relationship to the defined area. I tried it, and since it has something to deal with a non-orthogonal bottom edge, I did it that way. There are things in it that I think can be done much more simply, but those are easy fixes compared to understanding the intent. I would want to know more about what it's supposed to do. If you pick the bottom left corner in greatly different locations relative to the origin, does it put in "E" Texts at some locations, and not at others?Īfter you run it, what is contained in the xs and maxx wrote: Should it just be adding the grid size to the minimum X coordinate instead for an initial location? Depending on where the bottom left corner was set, the xs variable could be greater than the maxx variable right from the start, so the (while (<= xs maxx) loop would end without doing anything. Seems like the wrong thing to do, if you're looking for a starting point for the first "E"-starting Text. To divide the width of the area by the grid size in the X direction? This part :Īpparently multiplies that number of spaces by the grid size, which should give a result similar to the width of the area, adjusted to a whole multiple of the grid size. If I'm correct in my assumptions, should it not be this instead?

If minx is the X coordinate of the left edge of the area, dividing that by the grid size in the X direction would be meaningless, and could be vastly different depending on where you picked that bottom left corner. Is meant to calculate the number of grid spacings in the overall width. (setq xs (+ xg (* (fix (/ minx xg)) xg)). And that makes me wonder about what is setting the xs variable: Is returning nil right from the start, so it doesn't do the whole thing that would put in the "E"-starting Text at all. It's a little hard to figure out all of what's going on, but I'm guessing that this test: (command "text" (polar p0 0 (* ts 3.0)) ts (angtos 0) (strcat "N "(rtos ys 2 0) )) (setq sx (car p1) ex (car p2) fx (+ xg (* (fix (/ sx xg)) xg))) (while ( (car (nth 0 plist)) (car (nth 1 plist))) (command "line" p1 (polar p1 (/ pi 2) lt) "") (while ( (cadr (nth 0 plist)) (cadr (nth 1 plist))) (if (> (cadr (nth n p)) maxy) (setq maxy (cadr (nth n p)))) (if ( (car (nth n p)) maxx) (setq maxx (car (nth n p)))) (setq minx (car (nth 0 p)) miny (cadr (nth 0 p)) maxx minx maxy miny) (if (not lt) (setq lt llt) (setq llt lt)) (setq lt (getreal (strcat "\nTick length : "))) (if (not ts) (setq ts lts) (setq lts ts)) (setq ts (getreal (strcat "\nText height : "))) (if (not xg) (setq xg lxg) (setq lxg xg)) (setq xg (getreal (strcat "\nGrid interval : ")))

(setq abase (getvar "angbase") adir (getvar "angdir")) (setq p (append p (list (polar (nth 0 p) bg dis))))

(setq p (append p (list (polar (nth 1 p) bg dis)))) (setq dis (distance cp (inters cp (polar cp bg 10.0) (nth 0 p) (nth 1 p) nil))) (setq cp (getpoint (nth 0 p) "\nHeight: ")) (setq p (append p (list (getpoint (nth 0 p) "\nBottom right corner: ")))) (setq p (append p (list (getpoint "\nBottom left corner: "))))
