STEP→STL Your file stays in this tab · nothing is uploaded

Does my STL file have holes? Count the edges

The slicer refuses your file and says the mesh is open or non-manifold, and nothing on the screen tells you where the problem is or how big it is. There is a countable answer. Every number below is measured on the machine that wrote it and re-run by npm test before the page is published.

The short answer

A printable shell uses every edge exactly twice. An edge used once is part of a hole. Our closed test cube — a 10 mm cube converted from IGES — measures 12 triangles and 18 distinct edges, and every one of those 18 edges is shared by exactly two triangles. When one whole square face is removed, the same cube measures 10 triangles, 17 distinct edges, and exactly 4 edges used once. Those 4 edges are the boundary of the missing square: the hole is not a vague quality of the file, it is a list of edges you can name and count.

The one check: multiply by three, divide by two

Each triangle has 3 edges, so N triangles carry 3×N edge-uses. A closed mesh spends each edge on exactly two triangles, so a closed solid must satisfy distinct edges = 3×N ÷ 2. The test cube checks out from both directions: 12 triangles give 12 × 3 = 36 edge-uses, and 36 ÷ 2 = 18 distinct edges, with 0 used once. Run the same arithmetic on any mesh you are suspicious of: if the two sides do not meet, the difference is exactly the set of single-use edges, and each of them is a stretch of open boundary that the slicer cannot assign an inside or an outside to.

The same cube, closed and open: triangle count, edge-uses, distinct edges and single-use edges
ShellTrianglesEdge-uses (3×N)Distinct edgesEdges used once
Closed cube123618 (36 ÷ 2)0
Cube, one face removed1030174
The divide-by-two identity on a closed cube and the four single-use edges on an open one On the left, a closed cube drawn as 12 triangles with the arithmetic 36 edge-uses divided by 2 equals 18 edges and 0 used once. On the right, the same cube with one square face removed: 10 triangles, 30 edge-uses, 17 distinct edges made of 13 edges used twice plus 4 used once, and the 4 single-use edges are drawn burning orange around the empty face. Used twice = closed. Used once = a hole. Closed 12 triangles 36 edge-uses ÷ 2 = 18 edges, 0 used once One face removed 10 triangles 30 edge-uses = 13 × 2 + 4 × 1 → 17 edges, 4 used once the 4 orange edges trace the missing square
The open cube, counted from the drawing. Removing one square face takes away its 2 triangles and, with them, the diagonal edge both of them shared — which is why the count goes 18 → 17 and not 18 → 16. What remains is 10 triangles carrying 30 edge-uses: 13 edges still spent twice, and the 4 edges around the empty face spent once each. 13 × 2 + 4 × 1 = 30, the identity holds, and the 4 single-use edges are the hole.

Where the edge count separates hole from non-manifold

The count classifies every edge into three buckets, and each bucket means something different. Used once is an open boundary — the mesh stops, one side of the edge faces nothing, and that is what a hole is made of. Used twice is a normal shared edge, the only kind a closed solid may contain. Used three or more times is a non-manifold edge — more than two triangles claim the same edge, so the surface folds against itself and no consistent inside or outside exists there. The closed test cube measures 0 edges used once and 0 edges used three or more times; the open variant measures 4 used once and still 0 used three or more times, because removing a face cannot create the second defect. The two failures print differently in slicers but share one property: neither is introduced by the conversion, and neither is fixed by it.

The three buckets an edge can fall into: used twice, used once, used three or more times Three local edge configurations. Left, teal: two triangles sharing one edge, the used-twice case that a closed solid is made of; the measured closed cube has 18 of 18 edges in this bucket. Middle: a triangle whose long side is claimed by nothing on one side, drawn burning orange, the used-once case that a hole is made of; the measured open cube has 4. Right: three triangles all claiming the same central edge, drawn with that edge in burning orange, the used-three-or-more-times case called non-manifold; the closed cube measures 0 and the open cube also measures 0. Every edge lands in one of three buckets Used twice — closed one edge, two owners closed cube: 18 of 18 edges used twice, 0 used once Used once — a hole one side faces nothing open cube: 4 used once — the 4 sides of the missing face Used 3+ — non-manifold one edge, three owners closed cube: 0 edges open cube: 0 edges
The three buckets, drawn locally. Used twice is the only kind of edge a closed solid may contain — all 18 of the closed cube's edges live here. Used once is what a hole is made of; the open cube's 4 single-use edges are exactly the four sides of the removed square. Used three or more times is a non-manifold edge, where more than two triangles claim the same edge and no consistent inside or outside exists — neither measured cube has one, because removing a face cannot create the second defect. Conversion does not move an edge between buckets.

The converter now counts the buckets for you

The divide-by-two arithmetic above needs nothing but a text editor and the patience to count, but the front-page converter now does the counting itself: after every conversion its audit panel reports boundary edges (the used-once bucket — each one is a hole's rim), non-manifold edges (the used-three-or-more bucket), shell count and degenerate triangles, computed from the exact triangles of the STL it just wrote, in the tab, with nothing uploaded. On the closed test cube it reads 0 boundary edges and 0 non-manifold edges, as the arithmetic predicts.

The two buckets separate best on a real assembly, and the project's two flavour test files measure the difference cleanly. Both audit with 0 boundary edges — nothing is open — but as1_pe_203.stp, a 10-shell file, measures 336 non-manifold edges, while the 18-shell as1-oc-214.stp measures 0. That is the edge-classification doing its job: a mesh can be entirely closed and still fold against itself, and a boundary-edge count alone would call it clean. Slicers flag both defects; the panel now names which one you have before the slicer does.

What to do about it

The conversion triangulates and does not repair. Tessellation walks the surfaces the STEP file declares and writes each one out as triangles; it never invents a surface that is missing from the file, so a gap in the source arrives in the STL as the same gap. That fixes the order of operations for you: the repair belongs on the source side. Restore the missing face in the CAD model — or in the STEP file itself, if you are editing text — export again, and re-run the count. What you should not expect is to heal it afterwards one vertex at a time: a hole is not a misplaced point, it is a missing face, and STL-side editing moves vertices by hand at a cost the editing page measures. Once the source closes, convert it again on the front-page converter and the identity should hold: every edge used exactly twice.

One caution while you compare tools: a converter that promises to “fix” or “heal” meshes is not doing the same job as conversion, and a repaired mesh can differ from the source in ways the source never authorized. The honest position is the one this page takes — report the counts, tell you the shell is open, and leave the repair decision to you. The pipeline page goes one step further back and shows why there is no repair stage to audit here: an STL record has nowhere to store one.

How do you fix a non-manifold edge? Not by converting again. This converter triangulates and does not repair: its audit panel reports non-manifold edges, and a mesh that folds against itself arrives here folded. The repair belongs on the source side, the same way an open hole does — remove the folded or duplicated geometry in the CAD model, export again, and re-run the count. On the project's own test files the distinction is measurable: as1-oc-214.stp audits at 0 non-manifold edges while as1_pe_203.stp audits at 336, both measured by the same auditStats() code the panel runs.

Can the repair be outsourced instead? For years the standard answer was to upload the mesh to a cloud repair service and let it close the gaps. That was the 2015-era playbook: the era's cloud services would analyze an uploaded mesh — triangle count, border edges, shells, holes — and then stitch, fill and re-orient it automatically. The free endpoints of that era are gone, and the two cautions survive them: a repaired mesh can still differ from the source in ways the source never authorized, and the upload is a trade this site does not ask you to make. The divide-by-two check above runs on your own file in your own tab — no service in the loop, which is also why npm test can re-run it before this page ships.

When a print service says it will repair my STL, what is it actually fixing? Four things, and every one of them is a count you can read yourself: edges used once (an open boundary), edges used three or more times (a fold against itself), the number of separate shells in the file, and degenerate triangles with no usable area. On the project's own test files the four are not the same defect wearing four names: as1_pe_203.stp audits at 10 shells, 0 boundary edges and 336 non-manifold edges, so it has no hole at all and still folds; as1-oc-214.stp audits at 18 shells, 0 boundary edges and 0 non-manifold edges. Ask which of the four counts the repair is meant to move before you agree to it — a hole is only the first bucket, and a service that quietly re-surfaces a folded region may hand back geometry the source never authorized.

Which repairs did a service do for free, and which did it quote? The 2007 order form this project archived split the two by machinery rather than by price list: a file the service could correct unattended came back at no charge, and a file that needed hand work came back as an offer that had to be confirmed before anything was returned. That split is worth knowing before agreeing to any repair today, because it names the only question that matters — is your defect inside what the machine can do alone? Four counts on this page answer it: a single-use edge, an edge used three or more times, the shell count, and zero-area triangles. If a quote arrives, ask which of the four it is meant to move.

Five repair operations on one side, the four counts this page can take on the other On the left, five operations a repair order listed in 2007: flip triangle orientation, stitch bad edges, fill holes, trim surfaces, merge shells. On the right, the four counts this page measures: edges used once, edges used three or more times, shell count, zero-area triangles. Four of the five operations land on one of those counts; orientation has no edge bucket here and is marked in burnt orange. Five operations, four counts A repair order, as it was written flip triangle orientation stitch bad edges fill holes trim surfaces merge shells What this page counts no edge count for orientation edges used once edges used once zero-area triangles shell count Four of the five operations land on a number you can take yourself, in the tab. Orientation is the exception: flipping a triangle changes no edge bucket. So ask which count a repair is meant to move before you agree to it.
Five operations, and only four of them are countable here. Stitching edges and filling holes both move the used-once count; trimming surfaces moves degenerate triangles; merging shells moves the shell count. Flipping a triangle’s orientation moves none of the four, which is exactly why a repaired file can come back closed, counted the same, and still differ from what the source authorised.

Why you will not find this count elsewhere

Of the three benchmark sites this project tracks — polyd.com, convert3d.org, imagetostl.com — none walks through a countable hole test. convert3d's STEP page is a compatibility table with no failure guidance at all. imagetostl's pages describe file formats in terms of vertices and faces without ever dividing by two. The closest any of them comes is a general blog list of five printing-mistake categories on polyd, where discontinuous edges and flat holes appear as one bullet among five, with no number attached that a reader could reproduce. The divide-by-two identity needs three numbers — 12, 36, 18 — and each of them is pinned to the test suite, which is what makes the check reproducible rather than advisory.

Where these numbers come from

npm test

The command above re-runs every number on this page. The short version of this check lives as check 2 on the verification page; the triangle counts behind it belong to the measured table on the front page; and the STEP to STL converter itself reports the triangle count your own file produces, in the tab, with nothing uploaded.