1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Equation Editor cannot multiply

Discussion in 'Using Alibre Design' started by Woodzilla, Mar 23, 2020.

  1. Woodzilla

    Woodzilla Member

    I have run into a roadblock on making formulas in equation editor, with multiplication and division. I cannot square a number like this, D1^2. I get the dimensionality not valid. I cannot do this, D1*/D1. I cannot do this, (D1)*(D1). Cannot do this, (D1*1)*(D1*1). I cannot do this, D1*D2. And so on. But, what I can do is more complicated formulas like this, (((CH_ArcRADIUS*2)*pi)/360)*(CH_ArcANGLE/.01745329252) that ends up just fine. No matter how I try to write a simple formula like Chord/Height, I end up with a garbage result.
     
  2. DavidJ

    DavidJ Alibre Super User Staff Member

    dmckee101 and idslk like this.
  3. albie0803

    albie0803 Alibre Super User

    Can we please get a copy of the above page as a pinned forum post under one of the topics but not locked so that people can add examples that have needed fiddling to get to work with explanations of how.
    This really needs to be SO visible and SO easy to find!

    I've added it to my signature so I can find it in the future
     
    TimoCAD likes this.
  4. NateLiqGrav

    NateLiqGrav Alibre Super User

    In my opinion this restriction on equations is very dumb. You will find the equation editor gives results that users perceive as erroneous when in fact the software does the math right but not in the intended way. It will convert units when you haven't asked it to. I've had numerous posts about it in the past. It would be so much better if it just did math on the dimensions as displayed.

    Anyways to fix your issue:
    Create another dimension equation that is 1 unit long, lets call it D3.
    Now you can do:
    D4 = D1*D2/D3
    Dividing by 1 doesn't change the value but will change the units.
     
  5. Lew_Merrick

    Lew_Merrick Alibre Super User

    Woodzilla -- The Equation Editor is stongly Typed. Thus id you have a Dimension (D1) and you square it you get inches² as a result and that screws things up immensely! However if you convert "D1" to a Ratio such that (say) R1 = D1/1 inch, you can square "R1" to create (say) "R2" multiply that value X 1 inch and assign it to (say) :a0_a0_D2 and have it work. -- Lew
     
  6. Woodzilla

    Woodzilla Member

    I'm still not able to write an equation that takes a length that squares, or multiplies itself. If a radius of 16" on a drawing, shows up as D1 in the equation editor as 16". How is the equation written so D1*D1 gets a result of 256? Or D1^2. I see you have to create another parameter. I did, and called it Omega1, with an equation of 1, result of 1, type is count. Everything I've tried after that has failed. So I need a step by step process as to how this is done. Then I can write more complicated trig equations.
     
  7. idslk

    idslk Alibre Super User

    Hello Woodzilla,

    if your D1 is 16", your equation D1*D1 is written 16" * 16", which results in 256Inches². So you will have square inches which says you have an area.
    Your equation editor has 4 unit types to choose from (Distance, Angle, Count, Scale):
    upload_2020-3-23_19-57-12.png

    No AREA type.

    You can go around with 16 (type count) * 16 ( type count) * 1 (type Distance). This will result in 256 inch.

    upload_2020-3-23_20-0-38.png

    upload_2020-3-23_20-1-10.png

    upload_2020-3-23_20-2-42.png

    upload_2020-3-23_20-3-6.png

    If you want to do more complex math, you may take a look at WizoGrid or AlibreScript...

    Regards
    Stefan
     
  8. Lew_Merrick

    Lew_Merrick Alibre Super User

    Woodzilla -- 16 inches is a Dimension in terms of the Equation Editor. Squaring it creates an Area (something not allowed within the Equation Editor). You can "convert" a Distance to a Ratio (aka floating point number) vy declaring it as (say) R1 and assigning it as a Ratio to a value of "16 inches/1 inch" you can then declare (say) R2 as a Ratio and assign it a value of R1². Convert that to a Dimension by multiplying R2 * 1 inch. Done. -- Lew
     
  9. Woodzilla

    Woodzilla Member

     
  10. Woodzilla

    Woodzilla Member

    If I'm to understand what has been written above, every time the dimensions change in a drawing, let's say, the radius of 16" is changed to 14". Then you would have to manually go into the equation editor and change the count number from 16 to 14. It does not look like there is an equation that would update this automatically each time the radius changes. Is this right so far?
     
  11. idslk

    idslk Alibre Super User

    Hello Woodzilla,

    what do you want to calculate with the D1*D1 equation?
    Lew has written how you can setup a unitless variable to do your calculation. In snapshots:
    upload_2020-3-23_22-41-15.png
    upload_2020-3-23_22-38-18.png
    upload_2020-3-23_22-40-26.png
    upload_2020-3-23_22-46-25.png
    upload_2020-3-23_22-44-1.png
    upload_2020-3-23_22-47-26.png

    Now change D1 from 16" to 14":

    upload_2020-3-23_22-48-16.png

    Regards
    Stefan
     
  12. Woodzilla

    Woodzilla Member

    My project is about arc calculators for woodworkers. In my past, I would build large radius desks or trim. I would have to take field dimensions and then build a project on those measurements. I did a spreadsheet about 20 years ago to solve these equations. Knowing 2 pieces of information, I would be able to calculate the remaining numbers. Radius and height, chord and height, chord and radius. I have been wanting to get a parametric cad program to draw this stuff automatically. Old cad did not do this very well. But I starting to get it done in alibre. And this program does not give arc dimension in the drawing, you can get it in tools/measure. But I have not figured out how to get that into equation editor. So I have been writing equations instead. Doing fairly well, like this, (acos((RH_ArcRADIUS-RH_ArcHEIGHT)/RH_ArcRADIUS))*2, that gives the angle. But I ran into an angry badger trying to do square and square root, unexpectedly. I was just trying to get a chord dia. knowing the radius and arc height. Basic trigonometry. Something that was so easy in a spreadsheet.
    Projects I will be working on later, crown molding calculator, laminated springback, dual slope mitered box, helical stair, things that a woodworker uses for more complicated projects. It really sucks to show up on a job site to put crown on angled walls, and have no idea what to set your miter saw at. That was over a quarter century ago, so I wrote a spreadsheet to solve those questions.
     
    Last edited: Mar 23, 2020
  13. Woodzilla

    Woodzilla Member

    Thanks Stefan, it works. That"s exactly what I was after. A step by step procedure. It was more complicated that it looked on the surface. You have to jump back and forth between distance and count at the right time. I think I can figure out the square root calculation from here.
     
  14. DavidJ

    DavidJ Alibre Super User Staff Member

    Alibre works internally in Radians for angles (regardless of what it displays). So length along arc is simply (angle * radius) in the equation editor, that should simplify the calculations.

    A lot of what you need should simply 'drop out' of the sketch, without needing manipulation in the equation editor. The Constraint Solver does much of the work for you.
     
    Last edited: Mar 24, 2020
  15. Woodzilla

    Woodzilla Member

    After playing around with the equation editor, I see it cannot square a decimal number like 14.25. Only a whole number like 14. And it cannot do square root, because the numbers are rounded off. So I will not be able to enter equation data in the bill of materials on the drawing. So I'll have to look at a different way to get what I'm after.
     
  16. DavidJ

    DavidJ Alibre Super User Staff Member

    The Equation editor can square decimals. Rounding depends upon the display precision set for the model - the numbers are held internally to more places than the display.

    Perhaps detail what you want to achieve, and we can show how to do that. If you do - describe the problem, not just your desired solution. I suspect from your earlier posts that there may be a much simpler way to reach your goal.
     
  17. idslk

    idslk Alibre Super User

    Hello Woodzilla,

    if you use the type "Scale" it will work:

    upload_2020-3-29_10-22-33.png

    upload_2020-3-29_10-26-42.png

    upload_2020-3-29_10-23-56.png

    upload_2020-3-29_10-26-53.png

    Regards
    Stefan
     
  18. Woodzilla

    Woodzilla Member

    For readers of this thread, calculating square and square root does work. An example of square is written as 4^2=16 and the square root of 16 can be written as sqrt(16)=4 or 16^.5=4. It is a 5 step process for either in the equation editor. The 3rd and 4th steps have to be in Type in the modifiy equation box. And the 1st 2nd and 5th steps are in Distance. Post #11 in this thread was almost right, just change Counts to Scale. There maybe an easier way of doing this, but since there is no arc length dimensioning, I had to write a bunch of formulas in the equation editor to achieve what I was after. Change one driving dimension on an arc, and everything updates automatically. I will be entering that data in the bill of materials on the drawings. That will minimize or eliminate mistakes, manually entering data on final cut-bill. Thanks for everyone's help.
     
  19. idslk

    idslk Alibre Super User

    Hello Woodzilla,

    would you mind posting a picture of a dimensioned sketch and the regarding equation editor of your result?
    Maybe a Part with its BOM entry.

    Regards
    Stefan
     
  20. Woodzilla

    Woodzilla Member

    I'm working on the first 2 of 3 arc drawings. Where the known values are radius and height, or chord and height, or chord and radius. This would be an example in my line of work. An architect specified a radius library reception desk, 20ft radius and about 21 ft across. It has a matching light soffit above, that's already built. So I go out and take field dimensions to see how well the carpenters built to spec. I run my string end to end on the nails, measure the arc height. Go back to the office and start putting the puzzle together, and what corrections I need to make on the die walls for the counter. With what I can look at in equation editor, is instant information to begin the drawings and material order. As I might need to order bookmatched veneer weeks or months ahead of time, I need the correct arc lengths right away. That's why I'm doing these woodworker helper drawings in Alibre.
     

    Attached Files:

Share This Page