乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 69|回复: 3

[编程交流] New to LISP, looking for some

[复制链接]

3

主题

9

帖子

6

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-5 18:01:36 | 显示全部楼层 |阅读模式
For the last 2 or 3 days I have done more than my fair share of "googl-ing" and research on Lisps.. I have done a few of the "practice" lisp's and have read mutiple threads, posts, websites, all on lisp's. This is opening up a new world for me, as I know NOTHING about CPU programming, writing code, or am even THAT good with a computer...
 
with that said. I am trying to find (or make?) a few Lisp's...
 
one that cleans up drawings the way we do them and one that will automatically space a duct diffuser in the center of a room or a certain space away from another diffuser.
 
i.e. :if there is a 20' long room and it needs 2 diffusers in it, the first diffuser would be 5 ft off the wall, then there would be doulbe the distance inbetween them, so 10' between them, and then another 5' on the other side of the last diffuser.
 
also looking for any other mechanical-type lisp. I saw a pipe design one on here, but I could not get the program to open.
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 18:29:17 | 显示全部楼层
heres a start
 
(setq pt1 (getpoint "\nPick first point"))
(setq pt2 (getpoint "\nPick second point"))
(setq dist (distance pt1 pt2))
(setq ang (angle pt1 pt2))
(while (> dist 5.0)
(setq newpt (polar pt1 5.0 ang))
(command "point" newpt) ; change this to "insert" diffuser
(setq dist (- dist 5.0)
(setq pt1 newpt)
) ; endwhile
回复

使用道具 举报

13

主题

64

帖子

51

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-5 19:00:02 | 显示全部楼层
 
please someone can give me the complete code. so I can copy in Notepad..
回复

使用道具 举报

21

主题

155

帖子

135

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2022-7-5 19:18:40 | 显示全部楼层
It's a whole lot easier in VLIDE (Visual Lisp Editor) than in Notepad.
In AutoCAD type VLIDE then in the editor click File>New File & paste it into there
Have a look at the Afralisp article on the Visual Lisp Editor
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 23:29 , Processed in 2.863525 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表