Parameter Equations
Parameter Equations
(OP)
Hi,
I am trying to run an equation within the parameter/formula editor of v5. The equation is used to determine the minimum length of a part based upon an angular variable and length (in other words a trigonometric equation is applied). However, whilst in its simple form the equation works as soon as I try to round the figures down to a useful value (eg whole number), the system responds with the non-homogeneous units message. Below is a sample of the equation I am running.
min_flange_length=int (((beam_size /2)/sin (beam_angle))+ offset_constant)
I have also tried by changing the 2 to both a parameter with a real value and by applying it as a 2in, all to no avail.
Any help would be appreciated. Thanks
Gary W.
I am trying to run an equation within the parameter/formula editor of v5. The equation is used to determine the minimum length of a part based upon an angular variable and length (in other words a trigonometric equation is applied). However, whilst in its simple form the equation works as soon as I try to round the figures down to a useful value (eg whole number), the system responds with the non-homogeneous units message. Below is a sample of the equation I am running.
min_flange_length=int (((beam_size /2)/sin (beam_angle))+ offset_constant)
I have also tried by changing the 2 to both a parameter with a real value and by applying it as a 2in, all to no avail.
Any help would be appreciated. Thanks
Gary W.





RE: Parameter Equations
You indeed need to homogenize units
int function returns (unitless) real number and your lenght parameter requires a unit of length. You need to multiply the int result with lenght unit like 1in (or 1mm or whatever length units you're using)
min_flange_length=(int (((beam_size /2)/sin (beam_angle))+ offset_constant)*1in
RE: Parameter Equations
Your help was much appreciated, I had missed the conversion of the real value back to a length, your solution solved the homogeneous units issue, however, it did result in another rather strange fault. The process of converting the equation to a real value changed the lengths from inches to metres such that a length of 3.39 inches would return a value of;-
int(0.0861)=0
I fixed this by multiplying the length by 39.37, but this is a rather awkward fix for what should be a simple equation process.
Gary W.
RE: Parameter Equations