Note: This tool absolutely does not handle any error situations - it won't simply create the curve if any of the inputs seem to be incorrect or inconsistent.
• The program works in both Draft and Part environments with a sketch active.
• Look for the curve near the origin when testing with the default inputs as seen in screenshot above.
1. The first input is the equation which must use the variable 'x' as seen above. No other letter is recognized.
2. The equation is evaluated for each value of the range specified as from and to over an interval of the number of points on curve. The number of points on the curve are other than the endpoints.
3. Normally these operators are allowed:
+ - * / and %
^ for raised to power, for example x^5
sqrt, sin, cos, tan, atan, acos, asin, sinh, cosh, tanh
exp, ln, log, abs, floor, round
• Constant PI
• Use of 3x in place of 3 * x is allowed. Do not use 3.x
4Sin(x) + 5 creates a sine curve as above.
3x + 4 creates:
Another example is x^2 + 6
Warning: Some equation curves may appear awful.
The program and its source code are provided as part of an illustrated tutorial which runs though the steps of coding this utitlity.
This utility is a prototype from the Solid Edge Maker Faire.
Read the other Maker tutorials here.
Solved! Go to Solution.
This is great. Man I could have used this in my past life.
I can think of a few specfic times that i needed to plot a curve and instead created an X|Y table and used keypoint curve or creaded a function driven variable.
nice tool for when it's needed.
Matt, You nailed it - useful when needed.
Also thanks for establishing the equivalence of X-Y plot curve and the equation curve.
I saw some online equation curve plotters which dramatically plotted a full circle using the standard x^2 + y^2 = c formula which even SW does not attempt to.
I created a similar thing for a helical curve some time ago, as SE didn't have a helix sketch command (I didn't have a use for it, just wanted to know how)
My method was to create an excel spreadsheet and then use that as input for a curve by table.
One of the things I discovered was that curve by table has a tolerance setting and by changing that value you could improve the results and give a better start and end to the curve.
In my past life I worked at Hill-Rom designing hospital bed and stretchers.
These bed articulate in many areas: head up/down, knee up/down, height from floor up/down, trend up/down, siderail up/down, etc... lots of movement.
Newer beds have a translating pivot when the head section moves up/down. A fixed pivot will push the patient toward the foot of the bed as the head section raises and puts a lot of pressure on the patient's shoulders.
To eliminate these issues, of pushing the patient down the bed and shoulder pressure, the head section needs to translate backwards as it pivots up. The curve of this motion was derived from anthropometric measurements. Specfically, it was learned that as we bend at the waist it is the trocanter that needs to be considered for motion to be derived from.
So considering these known anthropometric measurements we derived the ideal motion for the head section to traslate as it pivoted. We had the theretical but had no mechanics to do this physically yet. By creating the equation's curve we were able to connect the head section's pivot point to the curve and see the real motion. Once we had this we could begin to engineer the mechanics that would drive the pivot to produce that same motion.
I didn't have this cool little tool at that time. I took 2 different approaches. First approach was to convert my curve to X|Y table and create a keypoint curve, the second was to use the variable table and create a function to calculate the Y based on X. I found that I liked the function driven Varable best. Once I did this then I would increment the variable and include geometry from the head section, by repeating this and incrementing the variable and also removing the included relation, I could "draw" the entire range of motion.
none the less, your new Equation Driven Curve tool would have been very useful in this situation. Thanks again.
That's amazing Matt. Thanks for the insight and for sharing the application of equation curve.
@beachcomber the tolerance setting is not fully understood, though I agree it surely allows better control over the start and end conditions. This has been a problem with the BSpline curve which changes its nature and curvature with smaller changes near the ends.
First of all, thank you for your effort!
In my life and my customers life there are lots of areas where this command should be useful.
The macro (what was written by you) is great... Why? I know lots of engineers who doesn't use MS excel because they have a "freeware" solutions like openoffice, so they can't use Curve by table command, but They need any other solution...
Huge thanks for it, but... (this is not displeasure)
EDC should works in polar and Cartesian coordinate systems. It should works in 3D (x;y;z) not only 2d... Hmmm.
I know our competitors and there...
Thaniks for this tool, it looks ideal for my purposes! I have an error message that displays when I try execute the macro, stating that info.lundin.math could not be loaded. My understanding of the tutorial was that this was only needed in VB, which I do not have. Any advice would be appreciated.
FYI: Rest assured that @Tushar will reply but I wanted to give you a heads up. He was at SEU15 in America this week and most likely will not return from travels and recover from jet lag till late next week.