2 constraint parameters on a single point

2 constraint parameters on a single point

Aaron.Abbott
Participant Participant
1,628 Views
13 Replies
Message 1 of 14

2 constraint parameters on a single point

Aaron.Abbott
Participant
Participant

Hello!

 

I am trying to make my dynamic block simple (on AutoCAD 2015). I have created two constraint parameters with grip points at the same point on the block. What I want is, for every time I click on the two grips (with one click), to be able to move vertically and horizontally at the same time. But sometimes only 1 direction is possible. It changes randomly. Is this a bug? Feel free to open the file and check it out. Let me know what you think. 🙂

 

Thanks so much for your help!

 

 

Aaron

0 Likes
Accepted solutions (1)
1,629 Views
13 Replies
Replies (13)
Message 2 of 14

Libbya
Mentor
Mentor

Is there a reason you're using constraints for this?  It would more easily be accomplished with dynamic parameters/actions.  See screencast:

 

 

0 Likes
Message 3 of 14

Aaron.Abbott
Participant
Participant

Hi Libbya!

 

Although that is not exactly solving my issue, that is really helpful and I think it is getting me on the right track.

I have posted a new block, which is much closer to my final product. There are two main pieces: a bracket (which can move horizontally as needed within a range) and a frame (some distance away, which I want to move freely horizontally and vertically within a range). I applied the dynamic parameter like you said, but for some reason, the grip point of the dynamic parameter does not appear where I placed it. This is really strange and confusing. Could you help me further? Thank you for your help so far!

 

 

Aaron

0 Likes
Message 4 of 14

Aaron.Abbott
Participant
Participant

To clarify, I want the block to change per the block table -- namely, I want the 3 angle options, while still being able to move that one point vertically or horizontally. Is there a reason that it is not working as I would like it to?

0 Likes
Message 5 of 14

Libbya
Mentor
Mentor

How many options are you planning on using in the finished block?  Are you only using the 3 angles or are you planning on adding more?  With the current options listed in the block properties table I would not use any constraints.  If you are planning on expanding the block in many ways then my advice might be different.  

 

I would use 3 visibility states (one for each angle), and I would use the appropriate linear parameters and stretch actions to accommodate the rows on the table.  It would be easier to accomplish and more consistent in behavior than how you are doing it.  

0 Likes
Message 6 of 14

Libbya
Mentor
Mentor

As far as a reason why it is not working as you would like, it is because of the inconsistent behavior of the constraints and the fact that constraints do not generally behave well with dynamic parameters/actions.  That is why I continue to ask why you are using constraints rather than ONLY dynamic parameters/actions to construct your block?

0 Likes
Message 7 of 14

Aaron.Abbott
Participant
Participant

Sorry for not clarifying all of the constraints. What complicates it further is that I want the frame to be constrained to the bracket so that the edge of the frame and edge of the bracket that are parallel are colinear. Does that make sense? I can try to give images if that will help.

0 Likes
Message 8 of 14

Libbya
Mentor
Mentor

There is no difficulty in keeping the edge colinear without constraints.  Are you planning on adding additional angles and other additional options on the block properties?  If not, then it would be easier to construct the block without any constraints at all.  

0 Likes
Message 9 of 14

Libbya
Mentor
Mentor

If the only options you plan on using are the options shown on the block properties table in the last file, then I believe I can work up an example showing how to easily do it without the constraints and the block will work consistently and accurately.  

0 Likes
Message 10 of 14

Aaron.Abbott
Participant
Participant

I am actually working on that now. If you would like to work on that version yourself as well, I would highly appreciate it! 🙂

0 Likes
Message 11 of 14

Aaron.Abbott
Participant
Participant

Here is my latest. It's actually working out really great! The only issue I have now is when I change to visibility of "10 degrees" and move the grip point a few times. The grip point does not stay on the crosshairs as I would like it to. Any idea what is making it do that?

0 Likes
Message 12 of 14

Libbya
Mentor
Mentor
Accepted solution

No constraints.  Really, none at all.  Not even geometric constraints.  🙂  They are only added difficulty, added complexity, and added problems.  See screencast.  If you want any assistance implementing your block properties or an explanation of why it works, I can offer that as well.  

 

 

0 Likes
Message 13 of 14

Aaron.Abbott
Participant
Participant

Libbya,

 

That was perfect -- and so helpful! The block is working exactly how I wanted it to.

 

One thing that I don't understand. You add a Y-direction move parameter with a specific angle. I see what you did to keep the two blocks together, but I don't quite understand why it works. Could you explain that to me?

 

I have attached the final product for reference.

 

 

Aaron

0 Likes
Message 14 of 14

Libbya
Mentor
Mentor

The XY parameter separates movement into X and Y values.  An X-move action is activated based on the change in the parameter's X value, Y changes are ignored.  A Y-move action is activated based on the change in the parameter's Y value, X changes are ignored.  When the left part of the block is moved vertically, if the right side of the block is not moved, then the two parts of the block either overlap or have a gap.  To keep their mating surface colinear, when the left side of the block is moved vertically, the right side of the block needs to move left or right to make up that difference.  I accomplish that with the added Y-move action that you are asking about.  The Y-move is activated when the XY parameter grip is moved vertically but the right side of the block needs to be moved horizontally.  The horizontal movement is accommodated by changing the angle offset to 90° which makes the right side of the block move to the right when the XY grip is moved down and vice versa.  The relationship between how far the right side of the block should move relative to the Y movement of the XY grip is not a 1:1 ratio, though.  It should move less than 1:1 in order to maintain its correct position.  In order to calculate the appropriate ratio of its movment, I drew a couple little lines.  The first line I drew starting from that mating surface of the two parts of the block, and I drew it vertically 1 unit long.  The second line I drew perpendicular to the first line from the first line's endpoint back to that mating surface.  The length of the second line is the total distance the right side of the block should move when the XY grip is moved vertically 1 unit.  In the Y-move's properties I went to the distance modifier and selected the quickcalc option.  I then measured that line and applied it to the Y-move action as its distance modifier.  Voila, the right side of the block then moves the correct distance to maintain the colinear mating surface.