大概
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; ;;;
- ;;; View Clip function that lets you easily define a view and the depth of the view ;;;
- ;;; After finished with the view: UCS <enter> PLAN REGENMODE 1 ;;;
- ;;; Found @ http://www.theswamp.org/index.php?topic=105.0 ;;;
- ;;; ;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun c:DBS_Section (/)
- (setvar "cmdecho" 0)
- (setvar "expert" 5)
- (command "ucs" "s" "tmp") ;;;; saves ucs to "tmp"
- (setq pt1 (getpoint "\nCutline pt1: "))
- (setq pt2 (getpoint pt1 "\nCutline pt2: "))
- (setq pt1 (polar pt1 (angle pt1 pt2) (/ (distance pt1 pt2) 2)))
- (setq pt2 (getpoint pt1 "\nSection depth: "))
- (setq pt1 (trans pt1 1 0) pt2 (trans pt2 1 0))
- (command "ucs" "w")
- (setvar "regenmode" 1)
- (command "dview" "" "po" pt2 pt1 "cl" "f" (distance pt2 pt1) "cl" "b" 0 "")
- ;;;; move ucs origin to middle of section cut line & sets to view
- ;;; this causes grips to be actinve in dview box because ucs origin is in box
- (command "ucs" "or" pt2)
- (command "ucs" "v")
- ;;; by passed next line when added setting ucs to origin.
- ;;; (command "ucs" "r" "tmp") ;;;; restores ucs to "tmp"
- (setvar "regenmode" 0)
- (setvar "expert" 0)
- (setvar "cmdecho" 1)
- (princ)
- )
|