7 Replies Latest reply on Apr 23, 2015 12:52 PM by Mike Pogue

    Equal length of 1/3rd

    Mark Dougall

      Just a query and wondering if anybody knew.

       

      I have 4 circles in a sketch measured over 140mm in a straight line. I place a line in between each and make them all equal. How does Solidworks do that sum? Surely one of the lines is not equal to the other two but it's so small and insignificant  it doesn't matter. Also which line does it choose to be smaller?

       

      As I said just a query. This is not going to make or break my design. Only became aware because the sketch became over defined and I thought that might be the reason before realising it was something else. This is probably one of the first things software programmers smoothed out and I'm just being really slow.

        • Re: Equal length of 1/3rd
          Joe Kuzich

          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.

            • Re: Equal length of 1/3rd
              Mark Dougall

              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.

                • Re: Equal length of 1/3rd
                  Mike Pogue

                  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.