; 由离散点生成凸包[mini_hull].lsp

(or mai_cehui_gcd_blk
   (mai_load_files (mai_panel_search "谜你测绘功能设置文件.lsp"))
)


(defun c:mini_hull ( / old_cmd pts)
  (mai_start nil)
  (mai_last_com "mini_hull")
  (princ "\n选择要凸包的块或点坐标点:")
  (setq pts (mai_select_first '((0 . "INSERT,point"))
                            "选择要按坐标点生成凸包的块或点:<回车退出>"
                            "没有找到任何块或点."
            )
  )
  (princ "\n数据处理中......")
  (setq pts (mapcar '(lambda (x)(trans (mai_dxf 10 x) 0 1)) (mai_ssget_2_list pts))
        pts (mai_points_hull pts T)
  )
  (mai_entmake "polyline" (cons (last pts) pts))
  (mai_end)
)
