乐筑天下

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

[综合讨论] Equation to fix/unfix the posi

[复制链接]

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 02:50:08 | 显示全部楼层 |阅读模式
Hello
 
I need to disable or enable the dragging of a body depending on a certain condition, such as the position of another body or the value of an equation.
 
How can I get it?, Maybe linking some value to an equation?, How?
 
I've though that one way to achieve it would be using distance mates, something like:
 
minimum distance = 0
maximum distance = iff(condition=true, 100, 0)
 
That would allow to move the piece from 0 to 100 if the condition is true.
 
But it doesn't allow me to introduce equations there.
回复

使用道具 举报

21

主题

1086

帖子

1065

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2022-7-9 03:00:11 | 显示全部楼层
skan, can you give me a little more info about the assembly or conditions.  My initial thought would be to use the $FIXED parameter in an equation in a design table.  But the manual drag part is what im not sure how to work around.  Inside excel in a design table you can fix/free the parts and the equation functionality in excel will be easier to implement this.
回复

使用道具 举报

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 03:06:19 | 显示全部楼层
Hello
 
I wasn´t speaking about any specific assembly, but I can give you an example:
 
Imagine I'm designing a lock with a key.
I want to be able to move the key in and out the hole.
It's easy to assign mates in order to restrict the position of key.
 
But once the key it's completely inserted and I rotate the cylinder lock (I start to open it) I need the key not to be extracted till the cylinder is rotated 360 degress.
 
The key will be allowed to move from distance 0cm (inner) to 10cm if the cylinder is at 0º (or 360º), but the distance will be fixed to 0cm otherwise.
 
How can I do it?
回复

使用道具 举报

21

主题

1086

帖子

1065

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2022-7-9 03:15:55 | 显示全部楼层
 
Well for instance such as that I have always run a motion study.  This allows you to apply a Cam "mate" which takes into account the physical limitation.  In your example the tumblers and grooves retaining the key.  Ill have to give this a little thought.  My first thought is that there is not a combination of mates that allow this motion but i wont give up that easy:)
回复

使用道具 举报

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 03:17:10 | 显示全部楼层
It would be doable if one could add vba code to the mates
回复

使用道具 举报

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 03:23:33 | 显示全部楼层
Another example would be a puzzle with sliding pieces or a Rubik puzzle, where each piece can move depending on the others
回复

使用道具 举报

21

主题

1086

帖子

1065

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2022-7-9 03:35:35 | 显示全部楼层
if you turn on physical dynamics and move your parts with the "move" command it will account for physical interference, but its a real drag on the system.  The only thing i am coming up with is a path mate.  If you have a point on your key(in that case) and you create a composite curve path the key can go in straight then rotate only following that path.
 
I dont know of a way to control mates with VBA, only fix/float and suppressing components.  It still wouldnt allow the free drag which it sounds like thats what you are after...
回复

使用道具 举报

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 03:41:55 | 显示全部楼层
OK, thanks,
I'll it.
回复

使用道具 举报

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 03:45:30 | 显示全部楼层
The difficulty in my example, I FORGOT TO TELL IT, is that there are two restrictions:
1) The cylinder could only be moved if the key is completly inserted.
2) The key could only be inserted or extracted if the cylinder is at 0º.
 
Therefore, rotation (cylinder+key) and insertion (key) are mutually exclusive.
回复

使用道具 举报

3

主题

12

帖子

9

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-9 03:50:15 | 显示全部楼层
Hi
 
I've being thinking again and youur suggestion is enough for my lock+key example, I'd use a curved path.  Depending on the model I could even need several paths and linked points.
 
Other problems more difficult, such as the Rubik cube, may require a motion study
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2024-11-22 06:22 , Processed in 0.157347 second(s), 72 queries .

© 2020-2024 乐筑天下

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