我已经见过这个人了。。。
好吧,这不是我需要的。。。
我会告诉大家:
我有一个lisp,可以创建端点带有箭头的直线:
这是代码
- (defun C:FLUXO (/ PT ENT PT1 PT2 ANG PTA PTB TP ARANG ARROW Slist OK FIM )
- (setq Pt1 (getpoint "\nSpecify first point: "))
- (initget 1)
- (setq Pt2 (getpoint Pt1 "\nSpecify second point: "))
- (command "._line" Pt1 Pt2 "")
- (setq old_lay (getvar "clayer"))
- (command "layer" "set" "0" "")
- (setq setinha (entlast)
- ARANG (angle PT1 PT2)
- FIM (polar PT2 ARANG -3) ; fim da seta
- ARROW (list (cons 0 "LWPOLYLINE")
- (cons 100 "AcDbEntity")
- (cons 8 (getvar "clayer"))
- (cons 100 "AcDbPolyline")
- (cons 90 3)
- (cons 70 128)
- (cons 38 0)
- (cons 39 0)
- (cons 10 PT2)
- (cons 40 0)
- (cons 41 1.5)
- (cons 42 0)
- (cons 10 FIM)
- (cons 40 0)
- (cons 41 0)
- (cons 42 0)
- (cons 40 0)
- (cons 41 0)
- (cons 42 0)
- )
- )
- (entmake ARROW)
- (princ)
- (command "layer" "set" old_lay "")
- (setq
- SList (ssadd (entlast)) ; begin a selection set of center line
- OK T ; set flag
- ) ;_ closes setq
- (while OK ; while still drawing lines
- (setq Pt1 (getvar "LastPoint")) ; used for next line command
- (setq Pt2 (getpoint Pt1 "\nSpecify next point: ")) ; get next point
- (if Pt2 ; if a point was chosen
- (progn ; then...
- (command "._line" Pt1 Pt2 "") ; draw next line
- (setq old_lay (getvar "clayer"))
- (command "layer" "set" "0" "")
- (setq setinha (entlast)
- ARANG (angle PT1 PT2)
- FIM (polar PT2 ARANG -3) ; fim da seta
- ARROW (list (cons 0 "LWPOLYLINE")
- (cons 100 "AcDbEntity")
- (cons 8 (getvar "clayer"))
- (cons 100 "AcDbPolyline")
- (cons 90 3)
- (cons 70 128)
- (cons 38 0)
- (cons 39 0)
- (cons 10 PT2)
- (cons 40 0)
- (cons 41 1.5)
- (cons 42 0)
- (cons 10 FIM)
- (cons 40 0)
- (cons 41 0)
- (cons 42 0)
- (cons 40 0)
- (cons 41 0)
- (cons 42 0)
- )
- )
- (entmake ARROW)
- (princ)
- (command "layer" "set" old_lay "")
- (setq SList (ssadd (entlast) SList))
- )
- (progn
- (setq OK NIL)
- )
- )
- )
- )
我的lisp编码很糟糕,所以我修改了另一个person代码。
我需要用箭头画线,然后打断垂直的线,像这样截取水平线:
|