1.Multiple offsets, positive numbers shift outwards, negative numbers shift inward, separate with commas, use * for repetitions, such as 300*2,
2."\nEnter the offset distance (+-, repeat *), separated by commas <Exit>: "
(defun c:XDTB_CurveOffset (/ d1 d2 ss strl dl s i)
(if (setq ss (xdrx-ssget (xdrx-string-multilanguage "\n选取要多重偏移的曲线<退出>:"
"\nSelect the curves to be multi-offset<Exit>:"
)
'((0 . "*line,circle,arc,ellipse"))
)
)
(progn
(if (/= ""
(setq strl (getstring
(xdrx-string-multilanguage "\n输入偏移距离(+-,重复*),以逗号分隔<退出>: "
"\nEnter the offset distance (+-, repeat *), separated by commas <Exit>: "
)
)
)
)
(progn (xdrx_begin)
(setq dl (xdrx_string_split strl ","))
(mapcar '(lambda (x)
(setq d2 nil)
(setq d1 (xdrx_string_split x "*"))
(if (= (length d1) 2)
(progn (setq i 0)
(repeat (atoi (cadr d1))
(setq d2 (cons (* (setq i (1+ i)) (atof (car d1))) d2))
)
)
(progn (setq d2 (list (atof (car d1)))))
)
(mapcar '(lambda (y) (xdrx_curve_getoffsetcurves ss y)) d2)
)
dl
)
(xdrx_end)
)
)
)
)
(princ)
)