Jump to content

Equation to fix/unfix the position of a piece


skan

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Edited by skan
Link to comment
Share on other sites

Hello

 

I wasn´t not speaking about a specific assembly.

But if you want a clear example:

 

Imagine I'm designing a lock with a key.

I want to be able to move the key in and out the slot.

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.

 

In short, 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?

 

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:)

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...