SolveSpace Logo SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

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

How to constrain distance in one direction? (by Kevin)
Hi,

I'm building a shape within another shape to create a shell. I want that shell to have set thickness, so I've set a dimension between the inner shell's top edge and the outer shell's top edge. That's enough to set the degrees of freedom to 0. What I'm seeing however, is that it's possible for lines to move even with 0 DoF.

Say I set the two edges to be parallel and have a distance between them of 2.5, with the inner shell edge "below" the outer shell edge. Everything looks good up until I try resizing the outer shell. At that point, SolveSpace may push the inner shell edge "above" the outer shell edge. The lines are still parallel and maintain their 2.5 distance, but naturally my shell no longer works.

Is there a way to make this work without setting a height for the inner shell? I was hoping to make it relative to the outer shell. I can't see how to constrain the height with an inequality. Additionally, is the reporting of 0 DoF expected in this case or should I file a bug for it?

Thanks,
Kevin
Mon Oct 12 2020, 12:51:27
(no subject) (by Eric Buijs)
Can you upload the file so we can have a look?
Tue Oct 13 2020, 05:11:48
Direction constraint (by Samu)
I second this problem.

I have attached a 2D sketch. When you drag the one of the concave corners to the outside of the rectangle it flips to the outside.

This becomes a problem as a sketch becomes more complex.

Anyone have a solution?
Mon Jan 12 2026, 17:05:17, download attachment DirectionConstrainExample.slvs
(no subject) (by ruevs)
Use point-line (and point-plane) distances instead of point-point distances. For example in your sketch make the 20mm dimension a distance between pint A and the line segment BC (see the screen shot in my next message). Then you will NOT be able to flip the sketch any more.

An easy way to try that it works is to enable "relax constraints and dimensions" for the group, pull the "notch" on your sketch up to make it a "protrusion" and then uncheck "relax...". With your original sketch it will remain a protrusion. With a point-line constraint it will snap back to a "notch". Try the attached file.

If you want all the details read here:
https://github.com/solvespace/solvespace/issues/76
https://github.com/solvespace/...es/578#issuecomment-3705712330
Today, 02:57:40, download attachment DirectionConstrainExample_PtLineDistance20mm.slvs
(no subject) (by ruevs)
Here is the screen shot showing pint A and the BC line segment. The 20mm constraint point-line and can not be flipped.
Today, 02:59:04, download attachment PtLineDistance.png
(no subject) (by ruevs)
Finally the displayed 0 DOF is completely normal and expected. Your (and many other) fully constrained sketches can have more than one solution.

See the explanation about the pentagon and the star in the tutorial on constraints:
https://solvespace.com/constraints.pl
Today, 03:02:03
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2022 SolveSpace contributors. Most recent update June 2 2022.