FuzzyOptimaCAD

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.

  1. 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.
  2. Open a sketch containing the curve (or stay in the model; the button is available outside a sketch too).
  3. Click the button "Optimize Spline (FuzzyOptima)":
  4. inside a sketch: SKETCH tab → MODIFY panel;
  5. without entering a sketch: UTILITIES → Add-Ins.
  6. Select the curve in the Spline / Points field (click the spline in the sketch).
  7. In the Constraints group, enable:
  8. ☑ Max deviation → 0.5 mm;
  9. ☑ Min radius → 5 mm.
  10. Leave Show curvature comb enabled: the viewport shows the curvature comb "before" (grey) and "after" (orange) in real time. This is the preview.
  11. Check that the comb became smooth and click OK.
  12. A report window appears: fairness, length, inflections, minimum radius, maximum deviation, constraint statuses (met / NOT met).
  13. 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

LocationWhen availablePurpose
SKETCH → MODIFYWhile editing a sketchQuick access right where you work with curves
UTILITIES → Add-InsAlwaysLaunch 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:

SelectedWhat happens
Fit Point SplineFaired; end points stay in place
Control Point SplineFaired 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 arcsNot changed. In a chain they act as a fixed boundary; on their own you get a "nothing to fair" message
Individual sketch pointsOptimized 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

ElementWhat it does
Spline / PointsSelects the curves or points to optimize. OK is disabled until something is selected

4.2. Search parameters

ElementRange / defaultWhat it doesWhen to change it
Iterations limit20–1000, default 300Maximum iterations of the evolutionary searchIncrease 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 1Smoothness weight: penalty for uneven curvatureHigher → smoother curve
Weight w2 (Tension)0–10, default 1Tension weight: penalty for curve lengthHigher → the curve is "pulled tight" and gets shorter
Weight w3 (Fidelity)0–10, default 1Fidelity weight: penalty for deviation from the originalHigher → the result stays closer to your curve
Seed0–1,000,000, default 0Starting number of the random searchThe 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.

ElementWhat 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 inflectionsNo more than the given number of inflections (points where the curve changes the direction of its bend). Default 1
Lock end tangentsThe 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-downThe 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

ElementWhat it does
Show curvature combShows 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)

ElementWhat 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
ComparisonsHow 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

ButtonWhat it does
OKApplies the result to the sketch (one action in the history) and shows the report window. The result matches the preview
CancelCloses the dialog; geometry is not changed (a result already shown still counted against your quota)
Cancel in the progress windowStops 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.

LineMeaning
max deviation: limit … | value … -> metThe constraint, its value on Fusion geometry, and whether it is met
min radius, max inflectionsThe same for the other constraints
symmetry … met - kept exactlySymmetry preserved (asymmetry 0)
symmetry … skipped …The input was not symmetric, symmetry skipped
end tangents (locked) … -> metChange of the end tangents (in degrees) after fairing
fairness (curvature variation) A -> BUnevenness of curvature; lower is smoother
arc length A -> BCurve length before and after
inflections A -> BNumber of inflections before and after
min radius A -> B | max deviation from originalMinimum 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

SituationWhat to do
The report says NOT met for inflections or radiusThe 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 originalEnable Max deviation and/or increase w3 (Fidelity)
The curve is still unevenIncrease w1 (Smoothness), disable Max deviation or increase it
I want a different variantChange the Seed
The curve meets other geometry at a particular angleEnable Lock end tangents; for chains, joints are preserved automatically
The result is worse than the originalThis 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 movedThe points are locked by sketch constraints (dimensions, snaps). Remove or change the constraints
I want to roll backCtrl+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.