14 Replies Latest reply on Mar 12, 2014 3:03 PM by Jim Sculley

    possible equation mistake or "bug"

    Kenneth Marah

      I recently posted a question that no one was able to help me out on and I eventually figured out my self.......had to recall some old algebra skills...... anyhow all of the math seems to be working correctly except for a few instances.  this equation is being used to "drive" and automated part file. pretty much the same part just different sizes. this part is as shown below in figure A.  When the width dimension changes, which is only in 0.5" increments I wanted the vertical wires to update accordingly. and dimension "C" to never be greater than 1.5" and the distance between wires to always be 1.5". I was able to accomplish this by using the "roundup" function, however the round up function can not be used in solidworks equations, so I used a work around to get the end result.  these two equations were input into excel and tested with success.  but when I input the "work around" equation into solidworks, in two instances solidworks is not figuring the math correctly. those two instances are when the width is 26.5 and 43.  figure B is a screen shot of my equation table. I have attached the part file with the equation table filled out and I guess I am asking if someone else would be willing to look at this and see if I am correct and solidworks is not calculating the math correctly or have I "input" something incorrectly. I think the equation for "global variable Z" is not being calculated correctly in the two dimensions of 26.5 and 43 and that is where the problem lies.

       

       

      WIRE CAPTURE.JPG

                                                                    FIGURE A

       

       

      equation tab.JPG

       

                                                              FIGURE B

       

       

       

       

        • Re: possible equation mistake or "bug"
          Bernie Daraz

          Kenneth,

           

          I skip the math and use construction lines set to Equal length in many cases. Look into Design Tables, you can use the power of Excel to drive your designs too. In the case shown above I might use two equal length construction lines to set your "C" dimension, then just draw 8 more to set the seperation between the 'fins'. Those will not require a dimension. I did make the assumption that the spacing is equal.

            • Re: possible equation mistake or "bug"
              Kenneth Marah

              Bernie,

               

              thank you for your response, but that is not really what I am trying to accomplish.  this part is going to be used as a "template" sort a speak in driveworksxpress, so all the end user will have do to is input the desired width of the part and all will adjust accordingly. if you can please open the part file and change the width in .5" increments you will see that all changes, with exception to the two diemsnions of 26.5 and 43. I should also state that these equations are also driving numbers within text of the drawing for this part.  if I was to try this the way you have discussed then the end user would still have to figure out some dimensions and amount of "fin" lines.

                • Re: possible equation mistake or "bug"
                  Kenneth Marah

                  also the "C" dimension in this case will always be ture to never being <1.000 or >1.500

                    • Re: possible equation mistake or "bug"
                      Peter De Vlieger

                      Kenneth

                       

                      For what you want to accomplish I would indeed go with equations.

                       

                      The only thing that I see happening when using 26.5 or 43 is that the value C becomes smaller then 1.

                      If this is the problem then it stand to reason that you'll adjust your equations so as to prevent that from happening.

                       

                      In other words, at some point you're rounding of the numbers fails to produce the desired result which in turn leads in a C < 1

                       

                      I'm purely metric so forgive me if I'm not versed enough in inches to see the 'fault' of hand.

                        • Re: possible equation mistake or "bug"
                          Kenneth Marah

                          Peter,

                           

                          no worries, my personal opinion the USA should have switced to the metric system long long ago.....thats beside the point though.

                           

                          yes and no to your answer....yes that when using 26.5 or 43 "C" is <1.00 and no to the rounding (......I think......).

                           

                          global variable "Z" states that  if the result of "X" - "Y" > 0 is true, then "Z" would = "Y"+1 and if the result of "X" - "Y" >  0 is false then "Z" would = "X".  this equation works everytime on any 0.5" incremented number except for 26.5 and 43.

                           

                          however if this same equaiton is used in excel, this equation is 100% correct.

                           

                          so my question is why does this work fully in excel, but in solidworks this eqution works for all except 26.5 and 43 (it could be wrong on other numbers but I have only tested it up 48)

                      • Re: possible equation mistake or "bug"
                        Bernie Daraz

                        I sometimes don't open the files when commenting, on opening I see that you're using a weldment. I assumed that it was a heatsink and not a sectioned view of mulitiple parts. I did see a demo of Driveworks at a SW User Group meeting a year ago and that looks like its the direction for you.

                          • Re: possible equation mistake or "bug"
                            Kenneth Marah

                            Bernie,

                             

                            yes, I am currently in the process of creating driveworksxpress files for the company I work for. driveworksxpress is very very helpful, and this equation can be solved in driveworks with the actual ROUNDUP function. I am just curious as to why this is not being calculated correctly in solidworks... and forgive me but what is a "heatsink"? I have not heard that term before in solidworks.

                              • Re: possible equation mistake or "bug"
                                Bernie Daraz

                                Kenneth,

                                 

                                Heatsink is not a SW term but a device that transfers heat from one side of a device to the other. You might see them cast or molded into valve covers on cars or on older stereo equipment. Another place they are frequently used is on the CPU inside your computer. There are many more and that was the reason I referred to your 'wires' as fins.

                                 

                                On another note, we use the term rack unit to define the number of 1 3/4" spaces in a rack cabinet. I was wondering is you used a similar term or variable and that converted the number of 1/2" spaces you refer to as common. Using an integer like that might help solve the issue you are experiencing. Maybe not but do let us know either way.