Restrain the movement of an object within a boundary

Restrain the movement of an object within a boundary

harry.zolbie
Participant Participant
1,248 Views
8 Replies
Message 1 of 9

Restrain the movement of an object within a boundary

harry.zolbie
Participant
Participant

Hello guys!

 

I am working on a dynamic block and I am having an issue which I believe you might help me to resolve. I would be grateful for your support.

 

The requirable block is a drop-in sink mounted on a counter. The counter needs to stretch horizontally in both directions. The sink has to move left and right within the counter.

 

Both activities should be independent from one another.

 

The sink basin should be prevented from moving outside the counter boundary and the counter - prevented from overlapping the sink respectively.

 

Do you have an idea how could I restrain the movement of the sink only within the borders of the counter?

 

I attach a simple version of my attempts as a DWG-file. Thank you!

 

 
0 Likes
1,249 Views
8 Replies
Replies (8)
Message 2 of 9

Libbya
Mentor
Mentor

Why do you need to prevent the sink from being able to be moved outside the countertop length?  Do you think that the CAD operator will not notice?

 

IMO you are misusing the base point parameter.  You should only add a base point parameter if you need to dynamically alter the base point position which is not the case here.  IF you need to dynamically alter the base point position, then the base point parameter should always be added to the 0,0 point within block editor and the objects within the block should be adjusted accordingly.  Doing otherwise can cause issues in some blocks and those issues can be quite hard to diagnose. 

0 Likes
Message 3 of 9

harry.zolbie
Participant
Participant

The CAD operators I work for demand that. 🙂  It's just like a window movement within wall ends in Architecture version.

0 Likes
Message 4 of 9

Libbya
Mentor
Mentor

You cannot dynamically alter the max/min of a parameter.  IMO, any CAD operator that demands that should find a new line of work. 

0 Likes
Message 5 of 9

j.palmeL29YX
Mentor
Mentor

Test the attached attempt.

 

(>>Example<< how to use)

 

 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 6 of 9

harry.zolbie
Participant
Participant

Thank you very much Mr. Palme!

 

Your solution is really helpful and shows to me new horizons in my work with dynamic blocks. The only thing I need to achieve my goal is to find a way to set the grip for the sink movement in a way that it doesn’t move separately away from the sink. I hope I’d able to do it.

 

I also noticed on your file that the sink moves as a result of stretching the left border unless it has already reached its limit in right. Do you think it’s possible the stretching of either of the counter ends to affect the sink in the same way i.e. the sink to be moved by border stretching only if the min. distance between them has been reached? It’s exactly like this when I use the right grip but when I use the left grip the sink moves together with the counter stretching.

 

I really appreciate your help!

0 Likes
Message 7 of 9

Libbya
Mentor
Mentor

@j.palmeL29YX wrote:

Test the attached attempt.

 

(>>Example<< how to use)

 


 I think it is an interesting attempt, but in actual use, the way that one side moves the sink and the other doesn't would be more confusing than simply not having an upper limit to the movement and using your eyes and your brain to make sure the sink is within the countertop.  If a CAD user cannot effectively keep the sink within the countertop even if there aren't any limits on the sink placement, then they have absolutely no hope of making any kind of intelligent placement of the countertop block itself within the building plan.

 

FWIW, I work with ACA daily and use specially set up wall styles for the lower and upper cabinets.  I have a dynamic block for sink placement and it has a couple reference points for the correct distance front/back and has the ability to center within the cabinet.  In actual use, adding any additional limits rather than using your own brain would be detrimental rather than helpful.       

Message 8 of 9

j.palmeL29YX
Mentor
Mentor

@Libbya wrote:


... the way that one side moves the sink and the other doesn't would be more confusing than simply not having an upper limit to the movement and using your eyes and your brain to make sure the sink is within the countertop.        


 

Full agreement. My attempt was only a "feasibility study" if and how to hold an object inside a variable boundary (evev without comfortable handling).

 

And @harry.zolbie : I don't see a way to solve your specified wishes (to get the same behavior on both sides). It is IMO not possible to move an object independently free on the one hand and to make its movement dependent on other conditions at the same time. This is an unsolvable logical contradiction. But maybe someone will find such a solution after all (?).

 

Fazit: Listen to @Libbya  😉

 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 9 of 9

Libbya
Mentor
Mentor

I enjoy 'feasibility studies' also and appreciate you posting it.  Another feasible option would be to add a visibility state for each increment of the 'Counter length' linear parameter and then have a double lookup or block properties table switch visibility states.  Add a different linear parameter for the sink position to each of those visibility states with the only change to each linear parameter being the maximum length property.  The block would function seamlessly the way that is being requested but the amount of added complication to the block would be absurd for no actual added function.