马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- ;|
- 制作角度刻度盘块XDOB_ANGLESCALE
- |;
- (defun XD::Block:MakeAngleScale (pj / arc-data c-data crosshair ent entmark l-data mat n ss ss1 v)
- (if (not (xdrx_object_get "block" "XDOB_ANGLESCALE"))
- (progn
- (setq l-data '(((0.434667 0.116469 0.0) (0.482963 0.12941 0.0))
- ((0.346804 0.200227 0.0) (0.433013 0.25 0.0))
- ((0.200227 0.346804 0.0) (0.25 0.433013 0.0))
- ((0.0 0.400455 0.0) (0.0 0.5 0.0))
- ((-0.200227 0.346804 0.0) (-0.25 0.433013 0.0))
- ((-0.346804 0.200227 0.0) (-0.433013 0.25 0.0))
- ((-0.400455 0.0 0.0) (-0.5 0.0 0.0))
- ((-0.346804 -0.200227 0.0) (-0.433013 -0.25 0.0))
- ((-0.200227 -0.346804 0.0) (-0.25 -0.433013 0.0))
- ((0.0 -0.400455 0.0) (0.0 -0.5 0.0))
- ((0.200227 -0.346804 0.0) (0.25 -0.433013 0.0))
- ((0.346804 -0.200227 0.0) (0.433013 -0.25 0.0))
- ((-0.342783 0.11 0.0) (0.342783 0.11 0.0))
- ((-0.342783 -0.11 0.0) (0.342783 -0.11 0.0))
- ((0.400455 0.0 0.0) (0.5 0.0 0.0))
- ((0.318198 0.318198 0.0) (0.353553 0.353553 0.0))
- ((0.116469 0.434667 0.0) (0.12941 0.482963 0.0))
- ((-0.116469 0.434667 0.0) (-0.12941 0.482963 0.0))
- ((-0.318198 0.318198 0.0) (-0.353553 0.353553 0.0))
- ((-0.434667 0.116469 0.0) (-0.482963 0.12941 0.0))
- ((-0.434667 -0.116469 0.0) (-0.482963 -0.12941 0.0))
- ((-0.318198 -0.318198 0.0) (-0.353553 -0.353553 0.0))
- ((-0.116469 -0.434667 0.0) (-0.12941 -0.482963 0.0))
- ((0.116469 -0.434667 0.0) (0.12941 -0.482963 0.0))
- ((0.318198 -0.318198 0.0) (0.353553 -0.353553 0.0))
- ((0.434667 -0.116469 0.0) (0.482963 -0.12941 0.0))
- )
- crosshair '(((0.0 -0.03 0.0) (0.0 0.03 0.0)) ((-0.03 0.0 0.0)
- (0.03 0.0 0.0)
- )
- )
- c-data '(((0.0 0.0 0.0) 0.11) ((0.0 0.0 0.0) 0.5))
- arc-data '(((0.0 0.0 0.0) 0.25
- 0.523599 2.61799
- )
- ((0.0 0.0 0.0) 0.25
- 3.66519 5.75959
- )
- )
- )
- (xdrx_setmark (setq entmark (entlast)))
- (foreach n l-data
- (apply
- 'xdrx_line_make
- n
- )
- )
- (foreach n c-data
- (apply
- 'xdrx_circle_make
- n
- )
- )
- (foreach n arc-data
- (apply
- 'xdrx_arc_make
- n
- )
- )
- (setq ss (xdrx_getss 9))
- (xdrx_entity_setcolor ss 0)
- (XD::Pnt:MakeCrossHair '(0 0 0) 0.06 0 "AngleScale")
- (xdrx_entity_setcolor (entlast) 1)
- (xdrx_setmark entmark)
- (setq ent (xdrx_block_make "XDOB_ANGLESCALE" (xdrx_getss) '(0 0 0) t))
- (setq v (mapcar
- '-
- pj
- '(0 0 0)
- )
- mat (xdrx_matrix_settranslation (xdrx_matrix_identity 3) v)
- )
- (xdrx_entity_transform (entlast) mat)
- (entlast)
- )
- (progn
- (if (setq ss1 (ssget "x" '((2 . "XDOB_ANGLESCALE"))))
- (xdrx_entity_delete ss1)
- )
- (setq ent (xdrx_insert_make "XDOB_ANGLESCALE" pj 1.0 0.0))
- )
- )
- (xdrx_entity_setcolor (entlast) '(0 191 255))
- (entlast)
- )
|