乐筑天下

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

[编程交流] beginner - code help

[复制链接]

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 23:50:14 | 显示全部楼层 |阅读模式
hi, I just started reading about lisp and made my first "script", but it is giving me an error after drawing the first rectangle, and wont draw the next. can anyone tell me what am I doing wrong? thanks in advance
 
  1. (defun c:pl()(command "_thickness" 1 "")(command "_circle" '(0 0 0) 1 "")(command "_circle" '(10 10 0) 1 "")(command "_rectangle" '(0 0 0) "_Dimension" 4 5 "")(command "_rectangle" '(10 10 0) "_Dimension" 4 5 "")(princ) ;;clean exit)
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
211
发表于 2022-7-6 00:05:49 | 显示全部楼层
  1. (command "_rectangle" '(0 0 0) "_Dimension" 4 5[b] ""[/b])
 
command is waiting for input after "Specify width for rectangles : 5 prompt
Its either you replace the "" symbol with "\\" or pause for input
 
  1. (command "_rectangle" '(0 0 0) "_Dimension" 4 5 "\")
 
or provide a point list
 
  1. (command "_rectangle" '(0 0 0) "_Dimension" 4 5 '(10 10 0) )
 
to place the rectangle of the first quadrant [right upper corner] as coordinate '(10 10 0.0) is north east of the rectangles first point
 
or even
 
  1. (command "_rectangle" '(0 0 0) "_Dimension" 4 5 (polar '(0 0 0)  (* pi 0.25) 1))
 
HTH
 
And Welcome to the Forum neko_Designer
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-6 00:18:22 | 显示全部楼层
Please pay also attention that all your command calls have an extra  (the "") at their end.
  1. (command "_thickness" 1 [color=red]""[/color])(command "_circle" '(0 0 0) 1 [color=red]""[/color])(command "_circle" '(10 10 0) 1 [color=red]""[/color])(command "_rectangle" '(0 0 0) "_Dimension" 4 5 [color=red]""[/color])
 
Another potential source of errors will come from active OSNAP modes - need to disable them before inputting points:
  1. (command [color=red]"_non"[/color] "_circle" '(0 0 0) 1)
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 00:22:55 | 显示全部楼层
 
I guess the OSNAP mode should be before the insertion point and not before the command name
回复

使用道具 举报

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 00:30:47 | 显示全部楼层
thanks everyone, you guys are great
回复

使用道具 举报

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 00:44:31 | 显示全部楼层
Any idea why this doesn't work either?
 
(command "_arc" "_Center" '(0 0 0) '(1 0 0) '(0 1 0) "")?
 
I'm trying to create an arc only on the first quadrant on this case. In general, I have two points as well as the center point where I want it located and want to generate the arc
 
I could also work with angles of beginning and end of the arc and the center point.
 
I really appreciate any suggestions.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 00:58:43 | 显示全部楼层
Try this ...
  1. (command "_arc" "_C" "_none" '(0 0 0) "_none" '(1 0 0) "_none" '(0 1 0))
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 21:07 , Processed in 0.608806 second(s), 77 queries .

© 2020-2025 乐筑天下

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