Fplot Add-In
Use the Fplot Add-In to plot a function in the graphics window and create corresponding geometry. Use any text editor to create the equations using basic algebraic notation and save them to a file with a EQN extension. Enter multiple equations on separate lines.
Use the following steps to open the Fplot Add-In.
-
In the Home tab, select Run Add-In.
-
In the Open dialog box, select fplot.dll and select Open.
-
You are prompted to select a EQN file. Navigate to your own files or use one of the sample files provided with Mastercam. Select Open.
The FPlot dialog box displays. Use the following options to make further adjustments:
-
Edit operation—Opens the current file in your default text editor to make edits.
-
Open file—Allows you to select a different EQN file.
-
Set variables—Opens the Variables dialog box to enter a range of values for each variable in the equation that you want Fplot to graph.
For example, if the equation is y=sin(x), enter the range of x values for which you want to calculate y, and enter a step size. Mastercam evaluates the equation at every step. Make sure that the Name for each variable matches the variable name stored in the EQN file.
-
Use degrees—Toggles between degrees and radians.
-
Trace variables—Writes the equation, display parameters, and variable values to fplot.log. The log is displayed after Plot it is selected.
-
Origin—Defines a new origin point for the geometry.
-
Geometry—Sets the type of geometry output for the selected equation. The geometry setting can be included in the EQN file. Refer to the Available operations and constants drop-down for more information.
-
Plot it—Plots the equation in the graphics window.
The following mathematical operations and constants are available:
| Operation | Description |
|---|---|
| (x) | Parentheses |
| (-x) |
Unary minus |
| x^y |
Exponentiation |
| x*y | Multiplication |
| x/y | Division |
| x+y | Addition |
| x-y | Subtraction |
| abs (x) |
Absolute value |
| sqrt (x) |
Square root |
| sin (x) | Sine |
| cos (x) | Cosine |
| tan (x) | Tangent |
| asin (x) |
Arcsine |
| acos (x) |
Arccosine |
| atan (x) |
Arctangent |
| exp (x) |
ex |
| ln (x) |
loge(x) |
| log (x) |
log10(x) |
| pi |
3.14 (approximate) |
| e |
2.71 (approximate) |
Additionally, you can declare the type of geometry you want to create. For example, to create a NURBS surface, enter the following in the EQN file:
geometry = nurbs_surf
Listed below are the available geometry types:
| Variable | Geometry Type |
|---|---|
| draw | Spline |
| points | Points |
| lines | Lines |
| spline | Parametric spline |
| nurbs | NURBS spline |
| draw_surf | Surface |
| points_surf | Surface points |
| parametric_surf | Parametric surface |
| nurbs_surf | NURBS surface |
The following samples files are included with Fplot. You can find them in your \chooks directory.
- candy.eqn—A surface that resembles a piece of wrapped candy.
- drain.eqn—A surface that resembles a drain.
- chip.eqn—A surface that resembles a potato chip.
- ellipsd.eqn—An ellipsoid.
- invol.eqn—An involute curve.
- sine.eqn—A sine curve: y = sin(x).





