明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: xyp1964

[资源] [分享]通用函数

  [复制链接]
发表于 2006-3-21 19:55:00 | 显示全部楼层
您人真好,向你学习
发表于 2006-4-2 17:36:00 | 显示全部楼层
很有用的东东,谢谢
 楼主| 发表于 2006-4-20 14:41:00 | 显示全部楼层

xyp_lib通用函数说明(CHM格式):1楼下载

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2006-4-21 07:50:00 | 显示全部楼层
好东西,绝对支持!有了通用函数说明的帮助文件,相信大家从中受益非浅!
 楼主| 发表于 2007-3-3 14:40:00 | 显示全部楼层
升级为xyplib.vlx,1楼下载!
发表于 2007-7-18 22:50:00 | 显示全部楼层
谢谢各位,这个的确是很好的东西,
发表于 2007-8-6 11:55:00 | 显示全部楼层

我还是不晓得怎么使用啊?

楼主能不能把操作步骤更详细的说一下?

引用这些函数时快捷命令是什么?

 楼主| 发表于 2008-5-18 23:35:00 | 显示全部楼层
  1. ;;; 圆心坐标转EXCEL
  2. (defun c:test660 (/ ss i s1 ptn ptn1)
  3.   (cmdla0)
  4.   (princ "\n选择圆: ")
  5.   (setq ss (ssget '((0 . "CIRCLE")))
  6. i  -1
  7.   )
  8.   (while (setq s1 (ssname ss (setq i (1+ i))))
  9.     (setq ptn (cons (cons (xyp-get-dxf 40 s1) (xyp-get-dxf 10 s1)) ptn))
  10.   )
  11.   (setq i    0
  12. ptn1 (mapcar '(lambda (x) (cons (itoa (setq i (1+ i))) x))
  13.        (xyp-vlxls-Vertexs2StrLst (reverse ptn))
  14.       )
  15.   )
  16.   (xyp-vlxls-NewAddDate
  17.     "A1"
  18.     (cons '("序号" "半径" "X坐标" "Y坐标" "Z坐标") ptn1)
  19.   )
  20.   (cmdla1)
  21. )
 楼主| 发表于 2008-5-18 23:40:00 | 显示全部楼层
本帖最后由 作者 于 2008-5-18 23:42:24 编辑

通用函数XYPLib.vlx应用实例:自身镜像
  1. ;; zsjx(自身镜像)
  2. (defun c:zsjx (/ ss i s1 pt)
  3.   (CMDLA0)
  4.   (xyp-initSet '(k1 k2 k3 k4 real) '("4" "1" "0" "1" 0.0))
  5.   (setq lst  '("1-左下" "2-中下" "3-右下" "4-左中" "5-正中" "6-右中" "7-左上" "8-中上" "9-右上")
  6. initlist '(("k0" nil "imagebutton" "-2" "28" "xyp1964(基点九位码)" "(XYP-ABOUTME)")
  7.      (nil nil "spacer_1;")
  8.      ("k1" "基点九码" "poplist" "lst" "18")
  9.      ("real" "镜像角度" "real" "18")
  10.      (nil nil "spacer_1;")
  11.      (nil nil ":boxed_radio_row{label="选择方式";")
  12.      ("k2" "单个实体" "radio")
  13.      ("k3" "选择集" "radio")
  14.      (nil nil "}")
  15.      ("k4" "保留实体" "bool")
  16.      (nil nil "spacer_1;")
  17.     )
  18. i  -1
  19.   )
  20.   (if (and (= (xyp-Dcl-Init initlist "【自身镜像】" t) 1)
  21.     (/= real 1.0)
  22.       )
  23.     (cond ((= k2 "1")
  24.     (princ "\n选择实体<退出>: ")
  25.     (if (setq ss (ssget))
  26.       (progn
  27.         (setq i -1)
  28.         (while (setq s1 (ssname ss (setq i (1+ i))))
  29.    (setq pt (xyp-get-MinMaxPoint s1 (1+ (atoi k1)))
  30.          p1 (polar pt (xyp-ang2rad real) 10)
  31.          ro (if (= k4 "1")
  32.        "N"
  33.        "Y"
  34.      )
  35.    )
  36.    (command "mirror" s1 "" pt p1 ro)
  37.         )
  38.       )
  39.     )
  40.    )
  41.    ((= k3 "1")
  42.     (princ "\n选择<退出>: ")
  43.     (while (setq ss (ssget))
  44.       (setq pt (xyp-get-ssMinMaxPoint ss (1+ (atoi k1)))
  45.      p1 (polar pt (xyp-ang2rad real) 10)
  46.      ro (if (= k4 "1")
  47.    "N"
  48.    "Y"
  49.         )
  50.       )
  51.       (command "mirror" ss "" pt p1 ro)
  52.       (princ "\n选择<退出>: ")
  53.     )
  54.    )
  55.     )
  56.   )
  57.   (CMDLA1)
  58. )

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2008-11-3 11:07:00 | 显示全部楼层
虽然不太明白这些函数的意义,不过先下下来再说
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-5-20 07:11 , Processed in 0.163052 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表