Author Topic: [XDrX-Function(3)] xdrx-curve-offset ( xdrx_curve_getoffsetcurves )  (Read 993 times)

0 Members and 1 Guest are viewing this topic.

xdcad

  • Swamp Rat
  • Posts: 527
Code - Auto/Visual Lisp: [Select]
  1. (xdrx-curve-offset <db-ent...ge-ent..ss..> <int...real...string> t)
  2.  
  3. (xdrx-curve-offset (list e1 e2 ss) 100.0) ;Offset the processing curve in the increasing direction
  4. (xdrx-curve-offset (list e1 e2 ss) -100.0) ;Offset the processing curve in the direction of reduction
  5.  
  6. (xdrx-curve-offset (list e1 e2 ss) 50.0 100.0 200.0) ; OFFSET three times in a row
  7.  
  8. (xdrx-curve-offset (list e1 e2 ss) "50.0,100.0,300.0"); OFFSET three times in a row
  9.  
  10. (xdrx-curve-offset (list e1 e2 ss) "50.0,100.0,300.0" t); Give the T parameter and return the point list



Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt ()
  2.   (if
  3.     (and (setq e (xdrx-ssget "\nSelect the curve to be OFFSET<Exit>:" '((0 . "*line"))))
  4.          (and (/= ""
  5.                   (setq offsetdist
  6.                          (getstring
  7.                            "\nEnter OFFSET distance (use, to separate multiple)<Exit>:"
  8.                          )
  9.                   )
  10.               )
  11.               (xdrx-string-regexps "^[-0-9.,]+$" offsetdist)
  12.          )
  13.     )
  14.      (progn
  15.        (xdrx-begin)
  16.        (setq ss (xdrx-curve-offset e offsetdist))
  17.        (xdrx-entity-setcolor ss 1)
  18.        (xdrx-end)
  19.      )
  20.   )
  21.   (princ)
  22. )
  23.  
« Last Edit: December 04, 2023, 01:28:42 PM by xdcad »
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
https://github.com/xdcad
https://sourceforge.net/projects/xdrx-api-zip/
http://bbs.xdcad.net