TheSwamp

CAD Forums => CAD General => Dynamic Blocks => Topic started by: DanB on September 11, 2019, 09:50:40 AM

Title: Stretch and/or Length Constraint
Post by: DanB on September 11, 2019, 09:50:40 AM
Getting frustrated with this one. See attached. I want to stretch line 'a' along distance1 as a variable user length. Lines 'a', 'b', 'c', and 'd' should remain equal lengths. Lines 'a' and 'b' would lengthen towards the bottom of the picture 'c' and 'd' and would lengthen towards the top of picture. I've attempted to use the "equal" constraint but once the block is rotated, there are random results on the direction the lines are lengthened. I've also attempted to apply an angle restraint (60d between 'a' and 'b') to attempt to simply stretch both at the same times to no avail. Any tips or suggestions are appreciated.

Thanks,
Dan
Title: Re: Stretch and/or Length Constraint
Post by: Crank on September 11, 2019, 02:58:30 PM
See attachment.
Title: Re: Stretch and/or Length Constraint
Post by: DanB on September 11, 2019, 03:48:02 PM
Thank You. Exactly what I wanted to accomplish. Can you explain how you get yours to work as desired, I want to be able to apply similar concept to some other blocks I am creating. I had mixed results with the direction the lines would lengthen when using the "equal" constraint. Also, is the vertical component a key to getting this to work?
Title: Re: Stretch and/or Length Constraint
Post by: DanB on September 11, 2019, 03:52:29 PM
Having another look, I am now seeing the coincident constraints (I need to learn what these are doing). Odd these appear very very small on the screen, and difficult to find without hovering over them.
Title: Re: Stretch and/or Length Constraint
Post by: ribarm on September 12, 2019, 01:04:11 AM
Another one with fix point constraints and equal constraints...
Title: Re: Stretch and/or Length Constraint
Post by: Crank on September 12, 2019, 01:48:27 AM
For the mixed results with the direction of of the lines: The coincident constraints are used to pin one side of the line so the line is forced to stretch in the opposite direction.

The vertical component was added to bypass a bug: Without this it looks good In the test environment, but when you insert the block it will be distorted.
Title: Re: Stretch and/or Length Constraint
Post by: DanB on September 12, 2019, 08:26:46 AM
Thank you both, learning a lot from this.