HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Bidirectional offset of LISP source program entities

2008-03-05View Original

Thread Content

;; Two-way offset of entities (defun c:nn(/ sn x n2 p1 p2 p3 ) (command “undo” “g”) ;(modes ‘(“blipmode” “cmdecho” “osmode”)) (setvar “cmdecho” 0) (setvar “osmode” 0) (setvar “blipmode” 0) (graphscr) (if (= xkuan nil) (setq xkuan 100)) (princ “\nOffset distance:” xkuan (if x x xkuan)) (while (progn (initget “W”) (setq sn (entsel (strcat “\n(Offset distance is “ (itoa xkuan) “) Select the line to offset:))) ) (if (eq “W” sn) (progn (princ “\nOffset distance:” xkuan (if x x xkuan) n2 xkuan ) (setq sn (entsel “\nSelect the line to offset:")) ) ) (setq n2 xkuan p2 (cadr sn) p1 (osnap p2 “nea”) p3 (polar p1 (angle p2 p1) 200)) (command “offset” n2 sn p2 “”) (command “offset” n2 sn p3 “”) ) ;(moder) (command “undo” “e”) (princ) )

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.