What a fun inquiry.
Why would they not be equal?
I would think that a virtual environment would not be limited like our abilities, or inabilities? We cant measure to an infinite degree so we put a limit on where something should stop, then decide that it can't be equal because of the limit we just put on it. So we make an adjustment and give one line that little extra to make things work out in our own heads. That's a human limitation, not a virtual one. In a virtual environment it is 1/3 and any measurement you receive will reflect the level accuracy the program is designed to feed back to us based on our ability to understand it.
It's just that I assume a program must hold a number for each dimension and you can't represent a third as a number. The number it shows to us is 8 decimal places or something but I assume the actual number it holds has many more. it does work out when you have a square of these circles and make lines over the diagonals of the squares, the point that the lines cross is the centre of this square but that could also just be based on the representation of the numbers to us. It just ties in with an article I read about the infinite lines in Solidworks not actually being infinite but just very, very large.
Like I said it's probably a programming trick that's been around since the stone age but I am curious now that I stumbled on it.
SolidWorks uses Seimens D-Cubed constraint solver (2D Dimensional Constraint Manager (D-Cubed 2D DCM): Siemens PLM Software ). I do not know how it works (I sent away for an explanation just now). But I'm pretty comfortable guessing that each constraint you add gets dumped into a system of equations, according to a set of rules. I don't know what the rules are, but, to use your example:
Line1.Length = 140mm
Line1.Length = Line2.Length
Line1.Length = Line3.Length
The lines are probably stored as two points, related by the constraints you've placed on them based on linear equations.
I believe that SolidWorks would iterate to the answer, because some equation constraints are non-linear. In the case of linear constraints, the iteration would hit the answer in one flop. Solving simultaneous equations is pretty well-documented on the internet.
To get to your specific question, 1/3 would be stored to 1/3 to machine precision, which is usually about 10^-17. I believe machine precision, and matrix conditioning, is the basis of the high and low size limits on SolidWorks features. The solution to anything /3 would be deterministic for an analytic solution, which should mean that the same answer would be stored for each line, which would be 1/3 +/- machine epsilon. For non-linear constraints, the solver would iterate until the error in each length became smaller than some predetermine threshold, which would be larger than machine epsilon. In this case, because the answer isn't analytic, it would probably be slightly different for each line. But the machine doesn't choose which is shorter. They just are where they are when the machine decides they are all close enough.
All just an educated guess. I'll update this thread when Seimens gets back to me with actual info.
That sounds right. I only understood two or three words, but it sounds good.
Well now I know.
Thanks. I'll wait until you hear back from Seimens to mark as correct. Just in case.
Makes sense, great explanation. Now I won't be stuck thinking about it for days. Thanks.
Looking over the description (it's), I'd add to this that the sketch solver will actually solve some systems algebraically, rather than trying to iterate everything.