SOLVESPACE -- parametric 2d/3d CAD

(you are viewing a thread; or go back to list of threads)

Nested Rectangles (by Andrew McIntyre)
I attach a 2D drawing I have done showing three nested rectangles. I need to be able to change the dimensioned parameters.

The only way I can think of to do this is to use multiple short segments as shown. This works but is rather messy as well as being unstable - if I drag the drawing sideways the top corners go out of alignment.

I would be grateful if anyone who can offer me a more elegant and stable way to do this!
Wed Sep 17 2014, 08:49:59, download attachment Nested Rectangles.slvs
(no subject) (by Jonathan Westhues)
My suggestion in cases like this is to avoid point-point distance (or, equivalently, line segment length) constraints, in favor of point-line distance constraints. The latter operate on signed distance, so they force the point to always be on the same side of the line. They are therefore less prone to flipping into unintended configurations as the sketch is dragged.

I've attached an example. The shape on the left is drawn with point-point distance constraints, and flips into unexpected configurations if it's dragged quickly by the blue line. The identical shape on the right is drawn with point-line distance constraints, and doesn't (although it may still fail to solve if you drag fast enough).

To constrain the distance between a point and a line, select the point and the line, and choose Constrain -> Distance. You may also wish to investigate the "point-line distance equals point-line distance" constraint. For example, if you select point A, line B, point C, and line D, and then choose Constrain -> Equal, then the distance from point A to line B will be forced equal to the distance from point C to line D.

To see more examples of such constraints, which can often remove the need for construction lines, choose Constrain -> Equal with nothing selected. Let me know if that makes sense, or if you have any other questions.
Mon Sep 22 2014, 06:35:46, download attachment avoid-flipping.slvs
Nested rectangles (by Andrew McIntyre)
It makes perfect sense - and thank you very much indeed for your very helpful response Jonathan
Thu Sep 25 2014, 17:30:24
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.