zoukankan      html  css  js  c++  java
  • 这是一个错误的程序

    (defun c:dp (/ os dist e pt1 pt2 pt3 a)
        (command "cmdecho" 0)   
        (setq lwe (getvar "useril"))
        (if    (= lwe 0)
        (progn
            (initget (+ 2 4))
            (setq lwe (getint "出图比例[1:?]:"))
            (if    (= lwe nil)
            (setq lwe 100)
            )
            (setvar "useril" lwe)
        )
        )
        (setq lwe (/ lwe 2))
        (command "pline" '(0 0) "w" lwe lwe "")
        (setvar "osmode" 695)
        (setq pt (getpoint "\n起点:"))
        (if    (= pt nil)
        (prompt "\空格与或回车结束!")
        )
        (initget (+ 2 4))
        (setq dist (getdist pt "\n宽度<240>:"))
        (if    (= dist nil)
        (setq dist 240)
        )
        (setq dist (/ dist 2.0))
        (if (= pt nil) (prompt "\ndddddddd"))
        (setq po (getpoint pt "\n下一点:"))
        (setq ang (angle pt po))
        (setq pt1 (polar pt (+ ang (/ pi 2)) dist))
        (setq pt2 (polar pt (- ang (/ pi 2)) dist))
        (setq po1 (polar po (+ ang (/ pi 2)) dist))
        (setq po2 (polar po (- ang (/ pi 2)) dist))
        (setvar "osmode" 0)
        (command "pline" pt1 po1 "" "pline" pt2 po2 "")
        (setq e 1)
        (while e
        (setvar "osmode" 695)
        (setq pb (getpoint po "\n下一点:"))
        (if (= pb nil)
            (exit)
        )
        (setq ang1 (angle po pb))
        (setq pn1 (polar po (+ ang1 (/ pi 2)) dist))
        (setq pn2 (polar po (- ang1 (/ pi 2)) dist))
        (setq pb1 (polar pb (+ ang1 (/ pi 2)) dist))
        (setq pb2 (polar pb (- ang1 (/ pi 2)) dist))
        (setq pe1 (inters pt1 po1 pn1 pb1 nil))
        (setq pe2 (inters pt2 po2 pn2 pb2 nil))
        (setq ent (ssget po1))
        (command "erase" ent "")
        (setvar "osmode" 0)
        (command "pline" pt1 pe1 "" "pline" pt2 pe2 "")
        (command "pline" pe1 pb1 "" "pline" pe2 pb2 "")
        (setq po  pb
              pt1 pe1
              pt2
              pe2
              po1
              pb1
              po2
              pb2
        )
        )
        (command "cmdecho" 1)
    )

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


  • 相关阅读:
    mongoDB看这篇就够了
    放不下
    jmeter连接不上MySQL数据库的原因以及解决方法
    SecureCRT自动断开连接的解决方法
    Linux及Windows查看占用端口的进程
    网络基础知识
    selenium中driver.close()和driver.quit()的不同点
    day2_窗口句柄切换
    day6_异常捕捉
    day6_logging模块
  • 原文地址:https://www.cnblogs.com/bimgoo/p/2503163.html
Copyright © 2011-2022 走看看