8 码分享团队手记

Selling an STL file? Check the mesh for a missing face

A front preview can hide a missing face underneath a 3D model. Before you sell an STL, open the exported file from the ZIP your buyer will receive and inspect the underside.

What changes when one face is missing?

I exported two sample tetrahedra and counted how many triangles share each edge. With all four faces present, there were no edges belonging to just one triangle. Removing the bottom face left three such edges.

Sample Triangles Open edges
Complete tetrahedron 4 0
Missing bottom face 3 3

Mesh diagram: the intact tetrahedron is on the left and three open edges are marked in red on the right

Generate the two STL samples

Run this Python 3 script in an empty folder. It writes complete.stl and missing-base.stl, then prints their open-edge counts, 0 and 3.

from collections import Counter
from math import sqrt
from pathlib import Path

points = [(0, 0, 0), (20, 0, 0), (0, 20, 0), (0, 0, 20)]
faces = [(0, 2, 1), (0, 1, 3), (1, 2, 3), (2, 0, 3)]


def save_stl(filename, triangles):
    lines = ["solid demo"]
    for face in triangles:
        a, b, c = [points[i] for i in face]
        u = [b[i] - a[i] for i in range(3)]
        v = [c[i] - a[i] for i in range(3)]
        n = [u[1]*v[2]-u[2]*v[1], u[2]*v[0]-u[0]*v[2], u[0]*v[1]-u[1]*v[0]]
        length = sqrt(sum(i*i for i in n))
        lines.append("facet normal " + " ".join(f"{i/length:.8g}" for i in n))
        lines.append("outer loop")
        for point in (a, b, c):
            lines.append("vertex " + " ".join(map(str, point)))
        lines.extend(["endloop", "endfacet"])
    lines.append("endsolid demo")
    Path(filename).write_text("\n".join(lines) + "\n", encoding="ascii")


def open_edges(filename):
    vertices = [
        tuple(map(int, line.split()[1:]))
        for line in Path(filename).read_text(encoding="ascii").splitlines()
        if line.startswith("vertex ")
    ]
    edges = Counter()
    for a, b, c in zip(vertices[::3], vertices[1::3], vertices[2::3]):
        edges.update(tuple(sorted(edge)) for edge in [(a, b), (b, c), (c, a)])
    return sum(count == 1 for count in edges.values())


for filename, triangles in [("complete.stl", faces), ("missing-base.stl", faces[1:])]:
    save_stl(filename, triangles)
    print(filename, open_edges(filename))

Check the mesh for open edges, then look at the underside and seams. If you repair a face, export the STL again, reopen it from the final ZIP and inspect the layers in your slicer. A mesh with no open edges can still have issues such as an incorrect scale, thin walls or intersecting geometry.

Upload the checked files to 8ma Sharing, set a price and place the purchase link beside the preview. Open the link on a signed-out phone before sharing it to review the title, price and payment option.

Copyable first-order model check

If your platform provides a test order, download the ZIP from that order’s delivery page. Extract it into an empty folder and open the delivered model in your slicer. Fill in this record with what you see.

ZIP filename:
Model filename and format (STL or 3MF):
Expected dimensions in mm (X × Y × Z):
Dimensions shown in the slicer:
Layer preview result:

Open the English guide and delivery examples.

阅读中文版 STL 缺面实测

First time listing a model? Open 8ma Sharing registration. The form is in Chinese. Look for 注册 to register.

8ma Sharing team · AI-assisted