![]() ![]() (prompt "\nType XL2L to replace an Xline with a Line where it crosses the drawing Limits/Extents.IRS Instructions for Form 990 (see p. (prompt "\nXline does not cross Limits or Extents of drawing.") else Xline hits Limits/non-Xline Extents twice (setq ends (cons corner ends)) put in list of Line end points (not (member corner ends)) don't duplicate if goes exactly through corner of range (equal (cadr rangeLL) (cadr corner) 1e-6) (equal (cadr rangeUR) (cadr corner) 1e-6) (<= (cadr rangeLL) (cadr corner) (cadr rangeUR)) (equal (car rangeLL) (car corner) 1e-6) (equal (car rangeUR) (car corner) 1e-6) can sometimes "miss" at extremes with calculation rounding, so give it fuzz: (<= (car rangeLL) (car corner) (car rangeUR)) (foreach corner (list intB intR intT intL) IntL (inters xl1 xl2 rangeLL rangeUL nil) with Left side IntT (inters xl1 xl2 rangeUR rangeUL nil) with Top edge IntR (inters xl1 xl2 rangeLR rangeUR nil) with Right side IntB (inters xl1 xl2 rangeLL rangeLR nil) RangeUL (list (car rangeLL) (cadr rangeUR)) RangeLR (list (car rangeUR) (cadr rangeLL)) RangeUR (if noext limUR (mapcar 'max extmaxXY limUR)) RangeLL (if noext limLL (mapcar 'min extminXY limLL)) zero dimensions both ways and cannot be reversed as extents can. ignore "false" extents later in favor of limits, which will always have non. EXTMIN is hugely positive / EXTMAX is hugely negative if so, T if nothing but Xlines/Rays in current space, no extents defined by objects Xl2 (mapcar ' xl1 (cdr (assoc 11 xldata))) direction-defining pointĮxtminXY (reverse (cdr (reverse (getvar 'extmin)))) XY onlyĮxtmaxXY (reverse (cdr (reverse (getvar 'extmax)))) reset EXTMIN/EXTMAX if needed encompass both Extents and Limits (prompt "\nTo replace an Xline with a Line across the Limits/Extents,") RangeLL rangeUR rangeLR rangeUL intB intR intT intL ends) (/ xlss xl xldata xl1 xl2 extminXY extmaxXY noext limLL limUR adjust command name and appropriate comments and prompts.] function near end, and consider whether to add Width option setting to 0 also [To draw a Polyline instead of a Line, change "_.line" to "_.pline" in (command) ![]() Extents or Limits where the Xline crosses them, if it does. To replace an Xline with a Line drawn to the greater reaches of the drawing's Other possibilities: option of whether to keep the Xline check for its being on a locked Layer account for different Coordinate Systems Layer choice other than that of the Xline etc. It could use various enhancements, but it seems to work in limited testing. Since the result of that would be a Line, not a Polyline, that's what the following draws, but it's easily adjusted to make a Polyline instead. My preference, if I wanted to do something like that, would be to draw it across the greatest reach in the X and Y directions of the drawing's Limits and/or Extents, equivalent to drawing a Rectangle around that area and Trimming the Xline away from outside it. Since an Xline has no length, one would need to be determined. is there any way to convert xline to polyline in lisp and keep as same length ? ![]()
0 Comments
Leave a Reply. |