benchmark · featuretree

Fixing what the CADFather comparison found

2026-10-13 · punkfab/featuretree (MIT) · follows CADFather on the NIST test parts

Yesterday we scored featuretree's recovered trees for the eleven NIST test parts with CADFather's metric code. That code starts from a triangle mesh, as a slicer or a simulation would, and it found defects our own checks had not reported: two rebuilt solids that did not mesh closed, sealed voids, and parts that came back in pieces. This post is what we did about them.

A check that meshes the result

featuretree verifies a recovered tree by rebuilding it and comparing volume, size and overlap with the input. None of those looks at the solid the way a mesh consumer does. We added a fourth test. It counts the separate solids, counts the enclosed voids, and meshes the solid to see whether every mesh edge is shared by exactly two triangles. A tree can no longer be VERIFIED unless the rebuilt solid is one closed body like its input.

Run on the eleven trees as they stood, the check reported more than the comparison had. Three meshes were open, where we had found two. Five parts held voids, where we had reported one. No VERIFIED verdict changed: the three VERIFIED parts were clean.

What was wrong

The NIST parts, scored again

Dot chart of score per NIST part under CADFather's rules. CADFather in orange, featuretree before the fixes as hollow blue circles, featuretree after as filled blue. CTC-02 and CTC-05 move from zero to 0.776 and 0.922. The other parts move little. featuretree is above CADFather on ten of eleven parts; on FTC-06 CADFather is higher.

PartFeaturesSolidsVoidsMesh closedIoU beforeIoU nowScore nowCADFather score
CTC-015410yes0.9990.9990.9810.768
CTC-0213210yesfailed0.9260.7760.743
CTC-0314410yes0.9430.9790.9480.754
CTC-0421410yes0.9650.9940.8910.734
CTC-055910yesfailed0.9810.9220.889
FTC-063110yes0.9800.9800.8770.904
FTC-073010yes0.9560.9570.9330.874
FTC-086610yes0.9860.9850.9410.639
FTC-098010yes0.9970.9970.9660.962
FTC-103810yes0.9720.9720.9000.853
FTC-11210yes0.9950.9950.9470.847
Mean11 / 110.977 (9 parts)0.9790.9170.815

All eleven outputs are now valid under CADFather's rules, where nine were, and every one is a single closed body. With failures counted as zero, featuretree's mean score goes from 0.759 to 0.917. CADFather's is 0.815, from the same run as yesterday. The caveats from that post stand: CADFather starts from a mesh and writes at most twelve operations, and featuretree starts from the exact solid and writes up to 214 features.

Updated 2026-10-14. The table and chart first showed three parts with defects; they now include the fixes in the next section.

The last three, fixed a day later

When this post went up, three parts were not one clean body: CTC-02 held 16 sealed hole segments, CTC-03 rebuilt as five solids and CTC-04 had two feet detached from the body. We had not found a general fix. A day later we had, for all three, and the check now passes on all eleven parts. No verdict changed: the three are still PARTIAL by our other checks.

The second fix is an approximation. Those bends are now 1 mm staircases, not curves, and the recogniser says so in its report for each part. It also adds a lot of features: CTC-03 goes from 64 to 144 and CTC-04 from 108 to 214. That is a long tree for a person to edit. A true bend feature would fix both, but every backend would need to support it.

Files with more than one body

A STEP file can hold several solids. featuretree used to take the first one, recover a tree for it, check the tree against that solid alone and report VERIFIED. It now takes the largest solid, says how many it left out, and never reports VERIFIED for such a file. Recovering every body is not done.

DeepCAD and Fusion360

CADFather's paper reports results on the DeepCAD and Fusion360 test sets. We ran featuretree on random samples of both: 1,000 of 8,027 DeepCAD parts and 500 of 1,725 Fusion360 parts, each scaled so its largest dimension is 100 mm.

DeepCAD (1,000)Fusion360 (500)
No output (crash or time limit)21
Mean IoU, all parts with an output0.9740.916
Files with one solid963429
  VERIFIED914383
  Mean IoU0.9950.985
Files with several solids3570
  Mean IoU against the whole file0.410.49
Rebuilt solids that mesh closed994 of 998492 of 499
Median operations per tree12
Median time per part19 s21 s

The paper's figures for CADFather are a mean IoU of 0.987 on DeepCAD and 0.976 on Fusion360, on the full sets, with every output valid. They are not directly comparable with ours. CADFather's input is a mesh and ours is the exact solid. The IoU here is our own measure, taken by sampling points against the solids, and not CADFather's code. Ours are samples. The paper computes IoU only for targets that are a single closed solid, which is closest to our single-solid rows.

Two things stand out. Files with several solids are 3.5% of the DeepCAD sample and 14% of the Fusion360 sample, and on those featuretree recovers one body and scores under 0.5. And these parts are much simpler than the NIST ones: the median input has 8 to 10 faces.

A newer geometry library

featuretree was developed on build123d 0.8, and did not run on the current 0.13, which also moves to a new major version of the OpenCASCADE kernel. It now passes its tests on both. One fix there changed a number we had published: on CTC-01 the recogniser now reports one residual lump left uncut, not two. The second was the kernel handing back the whole part as a leftover, which the old version discarded by accident. The tree and its verdict are the same. The same fix made the recogniser pick a different tree for FTC-08, with 66 features where it had 37 and about the same overlap. The table above is from after that change.

What this does not show

What's next

Bends as features rather than staircases. Recovering every body of a multi-body file. The full DeepCAD and Fusion360 sets, scored with CADFather's code as well as ours.

Who did what

We asked for the defects to be fixed and for the open items from the first post to be run. Claude found the causes, wrote the fixes and the check, and ran the evaluations. The defects were found with CADFather's metric code, which is its authors' work.

The check is mesh_check.py in punkfab/featuretree. Got a STEP file that should be an editable model? Start a project →