乐筑天下

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

[编程交流] Rotate a line until it's

[复制链接]

145

主题

590

帖子

446

银币

中流砥柱

Rank: 25

铜币
725
发表于 2022-7-5 17:38:47 | 显示全部楼层 |阅读模式
Well that is it.  I am looking for a lisp to do what I have said above.  Is it possible?
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 17:58:28 | 显示全部楼层
Rotation about a user-specified basepoint?
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 18:02:08 | 显示全部楼层
Easy draw a circle, intersectwith only tricky bit is it may have two answers. I take you want a programming answer not a drafting answer.
 
Manually do you really need code ? Circle grip-edit erase all done.
 
Code wise 2 picks, pick line near rotation point this returns length and correct point, pick pline, draw a circle and use intersectwith rotate line ask is correct press enter else draw 2nd answer. little busy at moment Lee may beat me anyway.
回复

使用道具 举报

145

主题

590

帖子

446

银币

中流砥柱

Rank: 25

铜币
725
发表于 2022-7-5 18:16:38 | 显示全部楼层
Yes LeeMac to rotate about one end of the line until the other end intersects the line.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 18:20:47 | 显示全部楼层
 
I agree - the manual method may in fact yield a quicker result:
 
回复

使用道具 举报

66

主题

1552

帖子

1514

银币

后起之秀

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

铜币
325
发表于 2022-7-5 18:29:34 | 显示全部楼层
I think the op should specify more his request:
2 endpoints, and 2 rotation orientations (CW and CCW) = 4 different ways for the code to work.
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 18:47:28 | 显示全部楼层
Grr correct that is why the pick of the line near the rotation end of the line, saves extra picks just compare pick pt to the two ends and the shortest distance is the rotation pt.
 
  1. (setq tp1 (entsel "\nSelect left side inner wall near end : "))(setq tpp1 (entget (car tp1)))(setq pt1 (cdr (assoc 10 tpp1)))      (setq pt2 (cdr (assoc 11 tpp1)))      (setq pt3 (cadr tp1))(setq wallh (cdr (assoc 39 tpp1)))    (setq hts (caddr pt1))                (setq d1 (distance pt1 pt3))(setq d2 (distance pt2 pt3))        (if (> d1 d2)        (progn                 (setq temp pt1)                (setq pt1 pt2)                (setq pt2 temp)        )        )
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 03:10 , Processed in 0.777928 second(s), 66 queries .

© 2020-2025 乐筑天下

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