FuzzyOptimaCAD: user guide
FuzzyOptimaCAD is an add-in for Autodesk Fusion that fairs curves in sketches. It takes a rough curve you drew and returns a smoother one while respecting your hard constraints: deviation tolerance, minimum radius, number of inflections, symmetry and preserved tangents.
The main difference from ordinary smoothing: constraints are met exactly, not approximately, and they are verified on the real Fusion spline geometry, not on an internal model.
1. Quick start (happy path)
Scenario: you have a "wobbly" profile spline. You want it smooth, no more than 0.5 mm away from the original, with a minimum radius of at least 5 mm.
- Run the add-in (once per Fusion session):
UTILITIES → Add-Ins → Scripts and Add-Ins → Add-Ins tab → FuzzyOptimaCAD → Run. Optionally enable Run on Startup. - Open a sketch containing the curve (or stay in the model; the button is available outside a sketch too).
- Click the button "Optimize Spline (FuzzyOptima)":
- inside a sketch: SKETCH tab → MODIFY panel;
- without entering a sketch: UTILITIES → Add-Ins.
- Select the curve in the Spline / Points field (click the spline in the sketch).
- In the Constraints group, enable:
- ☑ Max deviation →
0.5 mm; - ☑ Min radius →
5 mm. - Leave Show curvature comb enabled: the viewport shows the curvature comb "before" (grey) and "after" (orange) in real time. This is the preview.
- Check that the comb became smooth and click OK.
- A report window appears: fairness, length, inflections, minimum radius, maximum deviation, constraint statuses (
met/NOT met). - If you are not happy with the result, press Ctrl+Z (or Edit → Undo): the whole optimization is rolled back in one step.
Typical result (an 8-point spline): fairness improved by 99.6%, inflections 3 → 0, minimum radius 17.7 → 66.6 mm, computation time about 1 s.
Quota (trial keys)
An optimization is counted when the server returns its first calculation result for a new input (curve plus settings), that is, when the preview or first result appears, not when you press OK. Running the same curve with the same settings again is free. Changing any setting or the curve is a new input and counts again. If the calculation fails on our side, the unit is returned automatically. Cancelling after a result was shown still counts.
2. Where the button is
| Location | When available | Purpose |
|---|---|---|
| SKETCH → MODIFY | While editing a sketch | Quick access right where you work with curves |
| UTILITIES → Add-Ins | Always | Launch without re-entering the sketch after you have finished it |
The button runs the same command in both places.
3. What you can select
The Spline / Points field accepts:
| Selected | What happens |
|---|---|
| Fit Point Spline | Faired; end points stay in place |
| Control Point Spline | Faired by moving control points |
| Several connected curves (chain: spline – arc – spline) | Splines are faired; joints keep continuity: gap 0 always, and tangent where it already matched |
| Lines and arcs | Not changed. In a chain they act as a fixed boundary; on their own you get a "nothing to fair" message |
| Individual sketch points | Optimized as a set of curve points; constraints on Fusion geometry are not verified for them (there is a corresponding line in the report) |
Curves from different sketches are processed separately. Branched chains are not supported (you get a message).
4. All dialog elements
4.1. Selection
| Element | What it does |
|---|---|
| Spline / Points | Selects the curves or points to optimize. OK is disabled until something is selected |
4.2. Search parameters
| Element | Range / default | What it does | When to change it |
|---|---|---|---|
| Iterations limit | 20–1000, default 300 | Maximum iterations of the evolutionary search | Increase for complex curves with many points. The search stops early if progress vanishes, so a large value usually does not slow it down |
| Weight w1 (Smoothness) | 0–10, default 1 | Smoothness weight: penalty for uneven curvature | Higher → smoother curve |
| Weight w2 (Tension) | 0–10, default 1 | Tension weight: penalty for curve length | Higher → the curve is "pulled tight" and gets shorter |
| Weight w3 (Fidelity) | 0–10, default 1 | Fidelity weight: penalty for deviation from the original | Higher → the result stays closer to your curve |
| Seed | 0–1,000,000, default 0 | Starting number of the random search | The same seed gives the same result; change it to get a different variant |
The balance of w1/w2/w3 is a matter of taste: smoothness versus length versus closeness to the original. Hard constraints (the group below) act on top of the weights and are never violated.
4.3. Constraints group: hard constraints
Each constraint is enabled with a checkbox; the value field is active only when the box is checked.
| Element | What it guarantees |
|---|---|
| Max deviation (mm) | The new curve does not move away from the original by more than this value (in both directions). Default 0.5 mm |
| Min radius (mm) | The radius of curvature is nowhere smaller than this value (no overly sharp turns, for example for a tool). Default 5 mm |
| Max inflections | No more than the given number of inflections (points where the curve changes the direction of its bend). Default 1 |
| Lock end tangents | The directions (tangents) at the ends of the curve stay as in the original. Useful when the curve meets other geometry |
| Symmetry (highest priority) + axis drop-down | The curve stays mirror-symmetric. Axes: Sketch Y axis, Sketch X axis, First-last point bisector (the perpendicular bisector between the first and last points). If the input is symmetric, the result is symmetric exactly; if not, the constraint is skipped with a note in the report ("make the input symmetric") |
Constraint priority (highest to lowest): symmetry → maximum deviation → minimum radius → maximum inflections. A higher-priority constraint is never sacrificed for a lower one. If all of them cannot be met together, the report says NOT met and gives a hint about what deviation would be needed. A constraint that the input curve already satisfied will not be violated by the result.
If no constraint is enabled, the curve may move far from the original. For a badly drawn curve this is normal.
4.4. Display
| Element | What it does |
|---|---|
| Show curvature comb | Shows the curvature comb in the viewport: grey is the original, orange is the result. Helps you see irregularities. Disappears when the dialog closes |
4.5. Pairwise taste (compare variants)
| Element | What it does |
|---|---|
| Pairwise taste (compare variants) | Instead of tuning the weights, you choose between two candidate curves, several times. The add-in learns which one you prefer and applies the result when you finish |
| Comparisons | How many comparisons to make (default 8) |
After OK a Pairwise taste palette opens with two variants and the question "Which curve do you prefer?". Click the variant you like, or use the buttons: Equal (no preference), Skip (show another pair; the counter does not move), Back (change the previous answer), Finish now (stop early) and Cancel. The geometry changes only when you finish; if your answers favour the original curve, it stays unchanged and the report says chosen variant 'input'. Applying the result is a single undo step (Apply pairwise taste).
4.6. Buttons
| Button | What it does |
|---|---|
| OK | Applies the result to the sketch (one action in the history) and shows the report window. The result matches the preview |
| Cancel | Closes the dialog; geometry is not changed (a result already shown still counted against your quota) |
| Cancel in the progress window | Stops a long computation; geometry is not changed |
5. How to read the report
After OK a window appears, and a copy goes to the Text Commands console. All numbers are measured on the real Fusion spline.
| Line | Meaning |
|---|---|
max deviation: limit … | value … -> met | The constraint, its value on Fusion geometry, and whether it is met |
min radius, max inflections | The same for the other constraints |
symmetry … met - kept exactly | Symmetry preserved (asymmetry 0) |
symmetry … skipped … | The input was not symmetric, symmetry skipped |
end tangents (locked) … -> met | Change of the end tangents (in degrees) after fairing |
fairness (curvature variation) A -> B | Unevenness of curvature; lower is smoother |
arc length A -> B | Curve length before and after |
inflections A -> B | Number of inflections before and after |
min radius A -> B | max deviation from original | Minimum radius and the largest deviation from the original |
joint k (…): gap … | tangent mismatch … | For chains: gap and the angle between tangents at the joint |
More detail: Reading the report.
6. Tips and common situations
| Situation | What to do |
|---|---|
The report says NOT met for inflections or radius | The constraints conflict with the deviation tolerance. Increase Max deviation by the value from the hint or relax the lower-priority constraints |
| The curve "ran away" far from the original | Enable Max deviation and/or increase w3 (Fidelity) |
| The curve is still uneven | Increase w1 (Smoothness), disable Max deviation or increase it |
| I want a different variant | Change the Seed |
| The curve meets other geometry at a particular angle | Enable Lock end tangents; for chains, joints are preserved automatically |
| The result is worse than the original | This cannot happen: the result is never worse than the input by the criteria. If nothing better is found, the report says "geometry unchanged" |
| Some points could not be moved | The points are locked by sketch constraints (dimensions, snaps). Remove or change the constraints |
| I want to roll back | Ctrl+Z, in one step |
7. Limitations of the current version
- Closed splines and Fusion's tangent/curvature handles are not modelled.
- A spline with fewer than 3 points is skipped.
- Symmetry currently pairs points in reverse order (first with last) and works in the sketch plane.
- Control Point Splines are skipped if the control frame is turned off, the spline is periodic, rational with unequal weights, or has no "clamped" ends. The reason is printed to the console.
- End tangents at a chain joint are measured on Fusion geometry; if Fusion does not allow preserving them by moving points, the report says
NOT met: check manually. - Lines and arcs are never changed. If you select only a line or only an arc, the add-in says
no spline to fair - straight lines / arcs / fixed curves are never changed. - Chains must be simple: a profile where three curve ends meet at one point is refused with
curves skipped - not a simple chain (branching: ...). Select a non-branching profile. - If the points are not mirror-symmetric, Symmetry is skipped with a message and the curve is faired without it. Make the input symmetric first.
- Tested on macOS; Windows testing is still ahead.
8. Support
If something does not work: open View → Show Text Commands (Py mode), copy the message and send it together with short reproduction steps and, if possible, the sketch.