캐드 분류
trim 해주는 유용한 리습입니다.
컨텐츠 정보
- 254 조회
- 3 댓글
- 0 추천
- 0 비추천
- 목록
본문
트림을 쉽게 해주는 리습입니다..그런데 이 리습 명령어를 누르면 오스냅이 다 꺼져 버리네요..
그래서 오스냅 꺼지지 않게 수정 가능하실까요…..
리습 사용할줄만 알지 어떻게 수정해야할지 몰라서 이렇게 부탁드립니다.
리습은 이렇습니다.
;;; Author: Mark Thomas
;;; Function: Quick trim
;;; Allows you to draw a line as a cutting edge
;;; then erases the line when done trimming
;;; Modify:Q.J.Chen
(defun c:qt (/ p1 ent p2 p3 p4 p5 ent op obj ang sset a)
(vl-load-com)
(command "undo" "be")
(setq a (getvar "osmode"))
(setvar "osmode" 0)
(cond
((vl-cmdf "_.line" (setq p1 (getpoint "nSelect First Point: "))
(setq p2 (getpoint p1 "nSelect Second Point: "))
""
)
(setq ent (entlast))
(setq p3 (getpoint "nWhich sides: "))
(setq obj (vlax-ename->vla-object ent))
(setq op (vlax-curve-getclosestpointto obj p3))
(setq ang (angle op p3))
(setq p4 (polar p1 ang 1))
(setq p5 (polar p2 ang 1))
(setq sset (ssget "_f" (list p1 p2)))
(command "_.trim" sset "" "f" p4 p5 "" "")
(command "_.erase" ent "")
)
)
(setvar "osmode" a)
(command "undo" "e")
)
관련자료
댓글 3
/ 1 페이지