乐筑天下

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

[编程交流] Move objects to match x (y,z)

[复制链接]

13

主题

81

帖子

68

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 12:15:05 | 显示全部楼层 |阅读模式
I'm also looking for a procedure to move an object parallel to an axis and match a start point with the x,y, or z-coordinate af another point while keeping the other coordinates.
 
  1. defun c: txp (translate in x-direction to a certain point), typ, tzpselect objectsselect point 1 (x1,y1,z1)select point 2 (x2)move objects (x1,y1,z1) ([b]x2[/b],y1,z1)
 
Alan ... please ... ?
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:21:08 | 显示全部楼层
LoL
I'm not sure I understand what you are asking. Sounds like something that can be solved with point filters. Shouldn't be too terribly difficult. I don't mind helping, but I'm not sure I understand what you want.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:25:15 | 显示全部楼层
Is this what you are shooting for?

 
You could also achieve this by turning orthomode on.
 
 
Might as well post this. I know it's not what you were looking for, but someone might want it.
  1. (defun c:MXY (/ #SS #Pnt #Choice) (and (setq #SS (ssget "_:L"))      (setq #Pnt (getpoint "\nSpecity base point: "))      (not (initget 0 "X Y"))      (setq #Choice (getkword "\nAxis filter [X/Y]: "))      (command "_.move" #SS "" "_non" #Pnt (strcat "." #Choice) "_non" #Pnt) ) ;_ and (princ)) ;_ defun
回复

使用道具 举报

13

主题

81

帖子

68

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 12:27:00 | 显示全部楼层
Edit: Bad example.
回复

使用道具 举报

13

主题

81

帖子

68

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 12:30:26 | 显示全部楼层
OK, a better example. And a real one.
 
In top view, I've positioned a table in my house model.
As I change to ISO-view, I find that the table hovers somewhere above the floor.
No I would like to enter "tzp", click on any foot of a table leg and then on any corner of the floor.
The table would drop to the floor without changing its position in the ground plan.
 
I hope that does it. I admit that above descriptions were a bit weird. Thanks for your understanding.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:34:11 | 显示全部楼层
 
1. Will it always be a block?
2. Single or multiple objects?
回复

使用道具 举报

13

主题

81

帖子

68

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 12:37:37 | 显示全部楼层
Mostly 3D Solids, but also 2D objects. Multiple would be better, as the "table" might consist of several solids.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:41:23 | 显示全部楼层
So it's no different than selecting an object, picking a point, using .XY filter, then picking another point to get the Z value?
 
  1. Command: mMOVESelect objects: Specify opposite corner: 1 foundSelect objects:Specify base point or [Displacement] : _endp of Specify second point or : .XY of _endp of (need Z): _endp of
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 12:45:35 | 显示全部楼层
This?

 
........
回复

使用道具 举报

13

主题

81

帖子

68

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
65
发表于 2022-7-6 12:50:36 | 显示全部楼层
"So it's no different than selecting an object, picking a point, using .XY filter, then picking another point to get the Z value?"
 
Yeah, you got it, but in 1 command and also for the other axis (txp, typ, tzp). As I wrote in the first posting:
 
move objects from point (x1,y1,z1) to point (x1, y1, z2).
 
It's no more complicated.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-5 06:22 , Processed in 0.568799 second(s), 72 queries .

© 2020-2025 乐筑天下

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