zoukankan      html  css  js  c++  java
  • AutoCAD LISP绘制左右对称心型图案

    AutoCAD LISP根据输入对角点自动绘制左右对称心型图案,代码如下。

    (defun c:test()
      (setvar "cmdecho" 0)
      (setq pt1 (getpoint "\n第一角点:"))
      (setq pt3 (getcorner pt1 "\n另一角点:"))
      (setq pt2 (list (car pt3) (cadr pt1)))
      (setq pt4 (list (car pt1) (cadr pt3)))
      (command "pline" pt1 pt3 pt2 pt4 "c")
      (setq dd (/ (distance pt1 pt4) 2))
      (setq ang1 (angle pt2 pt3))
      (setq ang2 (angle pt4 pt1))
      (command "arc" pt2 "e" (polar pt2 ang1 dd) "a" 180)
      (command "arc" (polar pt2 ang1 dd) "e" pt3 "a" 180)
      (command "arc" pt4 "e" (polar pt4 ang2 dd) "a" 180)
      (command "arc" (polar pt4 ang2 dd) "e" pt1 "a" 180)
      (Prin1)
      )

    代码如下。

    作者:codee
    文章千古事,得失寸心知。


  • 相关阅读:
    p_value
    p_value
    第一次差异分析
    fdr
    rpkm&map
    rpkm&map
    s
    python数据处理小函数集合
    Jupyter Notebook 的快捷键
    自由度degree of freedom
  • 原文地址:https://www.cnblogs.com/bimgoo/p/2502956.html
Copyright © 2011-2022 走看看