Best Min Gap for 3D-Printed String Art
For photo-mode StringArt3D projects, the best starting Min Gap is the built-in preset of 0. Keep it unless a completed preview shows a specific problem caused by very short hops between nearby boundary anchors, such as an unwanted rim band or line budget spent along the edge instead of across the subject. If that symptom is visible, compare 0 with 2—the smallest setting that excludes immediate-neighbor pairs—while keeping the source, crop, size, Anchor Count, Max Lines, detail, and Thread Thickness fixed. Stop increasing Min Gap when the edge symptom clears or useful silhouette and contour lines begin to disappear.
Who this guide is for
Best for
Makers who have a completed photo-mode preview, can identify short near-neighbor paths at the perimeter, and want to test whether the Min Gap override should exclude some of those candidate connections.
Use another workflow for
Choosing Anchor Count, increasing tonal density with Max Lines, fixing a weak source or crop, or diagnosing droop, beads, missing launches, and other physical print failures. Use the anchor, line-count, portrait-troubleshooting, or calibration guide for those decisions.
Read Min Gap as an anchor-index exclusion
Min Gap uses the shortest circular index distance between two anchors; it is not millimetres, line length, spacing between printed anchors, or a promise about tangles. These examples apply to distinct endpoint pairs in the current solver.
| Min Gap | Pairs excluded near each endpoint | What changes | Decision boundary |
|---|---|---|---|
| 0 · photo preset | No non-self pairs are removed by the gap rule. | The solver can consider adjacent anchors and every longer valid pair; other solver rules still apply. | Keep unless completed-preview evidence shows harmful near-neighbor paths. |
| 1 | Still no distinct pair is removed. | Every pair of different anchors already has a circular index gap of at least one. | Do not expect a meaningful image change from 0 to 1. |
| 2 | Immediate neighbors, one index step away. | Removes the shortest possible boundary hops while preserving every pair two or more steps apart. | Use as the first non-trivial diagnostic comparison when the symptom is real. |
| 4 | Pairs one, two, or three index steps away. | Widens the excluded boundary neighborhood and can remove more contour-following choices. | Keep only if 2 is insufficient and named portrait edges remain intact. |
| 20 | Pairs one through nineteen index steps away. | A large exclusion whose perimeter fraction changes sharply with Anchor Count. | Never copy this value from another generator without a controlled StringArt3D proof. |
| 24 · slider end | Pairs one through twenty-three index steps away. | The widest ordinary slider exclusion; direct entry can go higher but may starve the candidate set. | Treat as experimental, not as the “highest quality” setting. |
Understand what the control actually filters
Min Gap rejects a candidate connection when the shortest walk around the ordered anchor list is smaller than the chosen integer.
Imagine the anchors numbered around a closed frame. For a pair at indices 10 and 13, the direct index difference is three. For a pair near the numbering seam, such as 1 and the last anchor, the solver uses the shorter wraparound distance rather than treating them as far apart. A Min Gap of 4 therefore rejects both examples when their shortest circular separation is only one, two, or three steps.
The setting is a candidate filter before line selection. It does not push the printed anchors farther apart, change their diameter, measure a chord in millimetres, or guarantee that the remaining lines cross the center. It simply says which nearby endpoint pairs the optimizer is not allowed to choose. Max Lines then controls how many allowed connections may be selected, and Anchor Count controls how many endpoints exist.
The inequality matters. A pair whose circular separation equals the Min Gap remains allowed; only a pair below it is rejected. That is why 0 and 1 produce the same distinct-pair set in the current solver: a connection from an anchor to itself is not a cached line, while every pair of different anchors is already at least one index step apart. The first non-trivial exclusion is 2.
Keep zero as the clean baseline
All current photo-mode Low, Medium, and High presets resolve Min Gap to 0, so begin there after clearing any older Advanced override.
A zero baseline is not the absence of all constraints. Self-connections do not become usable lines, invalid shape paths are excluded, and the optimizer separately avoids choosing any of the twenty most recently visited anchors as the next endpoint. Min Gap addresses a different question: whether endpoints close together around the boundary should be removed from the candidate set regardless of when they were visited.
The Advanced slider currently spans 0 to 24 in steps of one, and direct numeric entry accepts a larger value. Those are editable bounds, not a quality scale. Raising the number always removes options; it does not add detail. Keep the preset unless you can point to a completed-preview symptom that the excluded near-neighbor connections plausibly cause.
- Choose the real printer, shape, and size. Those choices establish the physical context and the size-owned Anchor Count before a solver filter is tested.
- Choose the intended detail preset. Low, Medium, and High currently share the zero Min Gap baseline in photo mode while changing other solver controls.
- Open Advanced Settings. Reset a carried manual value so the field shows 0 and the test begins from current product behavior.
- Generate to completion. Near-edge choices can appear throughout the sequence; do not judge the baseline from a partial preview.
- Save the evidence. Record the exact image, crop, Anchor Count, Max Lines, Min Gap, Thread Thickness, size, detail, and a screenshot.
Diagnose the right symptom before overriding
Test Min Gap only when the finished line map visibly contains short boundary-following chords that harm the portrait rather than useful contour information.
A credible symptom is local and observable: repeated very short hops form a dark strip near the rim, a cluster of near-neighbor connections spends part of the fixed line budget without improving the subject, or tiny edge chords compete with longer paths through the face. Zoom in to identify their endpoints, then return to the intended display distance to confirm that the pattern actually harms the reading. Do not tune a control merely because a higher value sounds safer.
Some short paths are useful. They can describe a shoulder meeting the frame, the outside of hair, an ear, a hat brim, glasses near the boundary, or the corner behavior of a non-circular shape. If the line follows a named subject contour and strengthens recognition, it is evidence to keep, not an artifact to eliminate. The visual role of the path matters more than its length.
A dark center, missing eye, flat cheek, busy background, or generally sparse portrait is not a Min Gap diagnosis. Those problems usually belong to the source, crop, processing, Anchor Count, Max Lines, or Thread Thickness. Likewise, drooping or broken physical spans belong to calibration and fabrication. Find the first stage that diverges before excluding a new family of digital candidates.
Run a controlled 0-versus-2 test
When the edge symptom is real, compare the completed preset at 0 with one completed result at 2 while every other input remains unchanged.
Keep 2 only if the named rim symptom decreases without losing a protected feature. If the two previews are materially indistinguishable, return to 0; the override adds a custom dependency without demonstrated benefit. If 2 removes a useful contour, 0 has already won. If 2 helps but leaves a clearly identified problem, compare one next step such as 4 rather than jumping to a value copied from another tool.
Do not change contrast to make the higher-gap result look better or raise Max Lines to replace excluded paths. Those changes hide the causal effect. A controlled test can reveal that the solver redirects the same line budget through different regions; an uncontrolled test merely produces two different projects.
- Mark the suspect paths. Save a close screenshot and name the rim region or contour that should change.
- Name protected features. List the silhouette, jaw, hair, ear, clothing, or object edges that must remain readable.
- Freeze the source and crop. Keep pixels, zoom, rotation, inversion, brightness, contrast, and background treatment fixed.
- Freeze the generator contract. Keep printer, shape, size, detail, Anchor Count, Max Lines, Thread Thickness, and frame settings fixed.
- Change Min Gap from 0 to 2. This removes only immediate-neighbor pairs and gives the first meaningful directional test.
- Finish and compare. Use equal-size views, inspect the marked edge, then judge identity and negative space at wall distance.
Normalize every value against Anchor Count
The same Min Gap integer excludes a different fraction of the perimeter when the project uses a different number of anchors.
With 300 anchors, a gap of 20 represents 6.67 percent of one full anchor cycle in either shortest direction; with 600 anchors it is 3.33 percent, with 750 it is 2.67 percent, and with 900 it is 2.22 percent. These percentages describe index separation, not physical chord length, but they show why a fixed value cannot travel unchanged between sizes or custom anchor overrides.
Even the same percentage does not certify equivalent image behavior. Ring, square, octagon, and heart boundaries distribute coordinates differently, and the effective geometry and source crop still determine what a connection crosses. Use the fraction only to understand the scale of an exclusion. The completed preview remains the evidence for whether a named feature survives.
Whenever Anchor Count changes, return Min Gap to 0 and earn the override again. Otherwise two controls move at once: the endpoint set changes and the excluded neighborhood around every endpoint changes as a fraction of that set. Record both values together, including whether each came from a preset or a manual override.
Do not confuse Min Gap with recent-pin avoidance
StringArt3D separately avoids the twenty most recently selected endpoints, but that rolling history rule is not a permanent twenty-anchor Min Gap.
The recent-pin window follows the generated sequence. After an endpoint is selected, it remains temporarily unavailable as a future destination while the next connections are chosen; when it ages out of the twenty-entry history, it can become eligible again. This discourages immediate cycling and repeated short-term revisits no matter where those anchors sit around the frame.
Min Gap is geometric in index space and persistent. A Min Gap of 2 rejects immediate neighbors on every step, even if they have not appeared recently. A Min Gap of 20 rejects all pairs whose shortest circular separation is below twenty, which is much broader than saying “do not return to the last twenty endpoints.” One rule tracks history; the other removes nearby pair geometry.
Outside tutorials often use the words distance, skip, separation, ban window, or recent pins for different algorithms. Never transfer their number on the name alone. Check whether their unit is anchor indices, a percentage of circumference, a chord-length fraction, pixels, millimetres, or generation history before comparing it with StringArt3D.
Know when the filter is too wide
A higher Min Gap has gone too far when it removes useful contour choices, redirects density away from identity cues, or leaves too few candidates to spend the intended line budget.
Look first for missing boundary information: a jaw detaches from the neck, an ear flattens, hair loses its outside curve, glasses no longer meet the face, or an object edge becomes generic. Then inspect the center. Excluding short chords can force the optimizer toward longer paths, but those paths are not automatically useful; they may darken unrelated regions or close negative space while the lost contour remains absent.
Extremely large direct-entry values can leave the current endpoint with too few or no eligible destinations, especially relative to the total Anchor Count. The generator may then stop before using the requested Max Lines budget. An early stop is not an efficient success if it happens because the candidate set was starved. Return toward the smallest setting that addressed the original edge symptom.
Use a strict stop rule: never increase Min Gap after the named symptom is gone, and reject the first value that removes a protected feature at intended viewing distance. If 0, 2, and one carefully justified next step do not produce a clear win, restore 0 and diagnose a different control family.
Carry the decision into the exact print
The preview can justify a candidate filter, but only the exact exported configuration can prove the fully printed perimeter and line network.
Min Gap is primarily a digital candidate rule, not a printer-calibration control. A physically failed line should send you to the calibration evidence chain even if a wider gap happens to avoid that exact span. Otherwise the new setting can hide an unresolved printer problem while erasing useful paths from every future portrait.
For repeatable or commercial work, qualify the decision on more than one representative source before treating it as a local profile. A gap that helps a tightly cropped face near the frame may hurt a centered pet or architectural subject. Keep 0 as the portable default and preserve overrides with the specific design evidence that earned them.
- Export the approved configuration. Confirm Min Gap, Anchor Count, Max Lines, size, detail, shape, and printer path still match the saved preview.
- Inspect the perimeter and anchors. Verify that the physical boundary formed correctly before using the line network as evidence.
- Inspect early launches and arrivals. Confirm the redirected path set attaches and travels as commanded.
- Inspect dense crossings. Look for physical changes that were invisible in the browser, including buildup, contact, droop, or weak capture.
- Judge the finished likeness. View the object against its intended backing and light from normal display distance.
- Save the decision record. Keep the source, crop, all generator settings, export date, screenshots, physical observations, and keep/reject reason.
Primary references
These sources provide technical context for the guide and its fabrication recommendations.
- TU Wien: String Art—Towards Computational Fabrication of String Images
Primary research describing a connected, fabricable graph of straight string segments between pins distributed on a frame.
- Birsak et al. StringArt research repository
The official implementation accompanying the Eurographics 2018 work and its discrete pin-and-edge optimization model.
- StringArt3D Generator
First-party source for the current photo presets, Min Gap control, Anchor Count, Max Lines, preview, and printer-ready export workflow.
- StringArt3D Anchor Count Guide
First-party companion guide for choosing the endpoint set before testing how many nearby endpoint pairs to exclude.
Continue exploring
Use these pages to test StringArt3D, prepare a stronger source image, or compare related fabrication workflows.
- String Art Generator
- Best Anchor Count for 3D-Printed String Art
- How Many Lines for 3D-Printed String Art?
- Why 3D-Printed String Art Does Not Look Like the Photo
- Calibrate a 3D Printer for String Art
- 3D-Printed String Art Without Supports
- Best Photos for Personalized Portrait Gifts
- Best Thread Thickness for 3D-Printed String Art
Frequently asked questions
What is the best Min Gap for 3D-printed string art?+
Start with the current StringArt3D photo-mode preset of 0. Keep it unless a completed preview shows harmful near-neighbor boundary paths. If that symptom is visible, compare 0 with 2 while every other setting remains fixed.
What does Min Gap mean in StringArt3D?+
It is the minimum allowed shortest circular index separation between two boundary anchors. Candidate pairs below the value are rejected. It is not millimetres, physical anchor spacing, chord length, or a general anti-tangle guarantee.
Why is the preset Min Gap zero?+
All current photo detail presets resolve Min Gap to 0 so the solver begins with the full set of distinct valid endpoint pairs. Self-connections, invalid shape paths, and recently visited endpoints are still handled by separate rules.
Is Min Gap 1 different from 0?+
Not meaningfully for distinct pairs in the current solver. Every pair of different anchors has a circular index separation of at least one, while self-connections are not usable cached lines. A value of 2 is the first setting that excludes immediate-neighbor pairs.
What does a Min Gap of 2 exclude?+
It excludes pairs whose endpoints are immediate neighbors, one anchor index apart in either circular direction. Pairs separated by exactly two or more steps remain eligible under the gap rule.
Should I use Min Gap 20 because another generator recommends it?+
No. Different tools use different anchor totals, units, solvers, and physical workflows. In StringArt3D, 20 excludes gaps 1 through 19 and represents a different perimeter fraction at 300, 600, 750, or 900 anchors.
Does a higher Min Gap improve portrait quality?+
Not automatically. It removes short endpoint-pair choices and can reduce an unwanted rim pattern, but it can also erase useful hair, jaw, ear, clothing, or object contours and redirect density into unrelated regions.
Is Min Gap the same as avoiding recent anchors?+
No. Min Gap permanently rejects nearby pairs by circular index distance. The separate recent-pin rule temporarily blocks the twenty most recently selected endpoints regardless of where they sit around the frame.
Can Min Gap fix sagging or broken printed spans?+
It may avoid a particular short path, but it does not calibrate the printer. Droop, beads, missing launches, weak arrivals, and nozzle contact belong to the fabrication workflow and should be diagnosed with the exact generated path held constant.
When should I stop increasing Min Gap?+
Stop as soon as the named rim symptom clears, and reject the first value that removes a protected silhouette or identity cue. If a controlled 0, 2, and one justified next step do not give a clear win, restore 0 and diagnose another stage.
Generate the zero-gap baseline first
Finish the preset preview, mark any harmful near-neighbor paths, and compare 0 with 2 before considering a wider exclusion.