Sub topic 6
Array: fit types, merging, and start and end caps
This chapter covers the parts of the Array modifier that decide how many copies you get and how they join up: the fit type, vertex merging, and the start and end caps. It assumes you already know the Array modifier's count and relative offset, and the constant and object offsets. It also assumes you are comfortable with Object Mode versus Edit Mode, and with the terms vertex, edge, face, and normal.
Fit types: three ways to decide the copy count
The Fit Type setting controls how Blender decides how many copies to make. There are three choices.
| Fit Type | What you set | What Blender decides | Python value |
|---|---|---|---|
| Fixed Count | Count | Nothing. The count is used as given. | `'FIXED_COUNT'` |
| Fit Length | Length | The count, so the row fills the length. | `'FIT_LENGTH'` |
| Fit Curve | A curve object | The count, so the row follows the curve's length. | `'FIT_CURVE'` |
Fixed Count
Fixed Count is the default. You type a number into Count, and the modifier makes that many copies, including the original. A count of 5 gives the original plus four copies. A count of 1 gives only the original, so the modifier appears to do nothing.
Use this mode when the number of repeats matters more than the total size. Examples are five fence posts, or a staircase that needs exactly twelve steps.
Fit Length
In Fit Length mode you set a Length in Blender units. The modifier works out how many copies fit and uses that count. Blender divides the length by the distance between copies and rounds down. The distance between copies comes from the active offsets: relative, constant, and object offset all contribute.
Suppose a plank is 1 m wide and the relative offset is 1.0 along X, so the step is 1 m. A Length of 4.5 gives 4 copies, because 4.5 divided by 1 is 4.5 and rounding down gives 4. The last copy does not stretch to reach the end.
This mode is useful when the length is fixed by something else, such as a wall that must be 6 m long. If you change the length later, the count updates by itself. You do not have to recalculate it.
A step of zero is a failure case. If every offset is zero, the copies would stack on the same spot. Blender then falls back to one copy, so you see only the original. If Fit Length seems to do nothing, check that at least one offset gives a nonzero step.
Fit Curve
In Fit Curve mode you pick a Curve object. The modifier measures the curve's length and makes as many copies as fit along it, using the same step distance as Fit Length.
Two points are easy to miss:
- The Array modifier only counts copies along the curve. It does not bend them. The copies stay in a straight row along the offset direction.
- To make the row actually follow the curve, add a Curve modifier after the Array modifier and choose the same curve object. The Array modifier sets how many copies exist, and the Curve modifier deforms the whole row onto the path.
This pairing is how you build a chain, a fence along a winding path, or a row of lamps along a road. Order matters here. The Array modifier must come first so the Curve modifier bends all the copies.
Merging: joining the copies into one surface
By default the copies are separate pieces of geometry that sit next to each other. Where one copy ends and the next begins, there are two overlapping or touching sets of vertices. The merge options weld them together.
Turn on Merge to enable this. Two settings control it:
- Distance is the merge threshold. Vertices from neighboring copies closer than this distance are joined into one. The default is 0.01 units.
- First Last also merges the last copy's end with the first copy's start. This closes a loop, as in a ring or a circular fence.
Merge works only between neighboring copies
Merge compares each copy with the next one. It does not weld vertices inside one copy, and it does not weld copies that are not neighbors. This avoids damaging the original mesh. It also means that a Distance larger than your base mesh's own detail does not collapse the mesh.
A merging example
A common use is a pipe or a tube made from one ring segment. Model a short tube section whose end faces line up exactly with the offset distance. Then:
- Set Fit Type to Fixed Count with a count of 6.
- Set the relative offset so that the end of one copy touches the start of the next. For a section exactly one object wide, use 1.0 on the axis it extends along.
- Turn on Merge and keep the Distance small.
The touching end vertices fuse, and you get one continuous tube.
The Merge Distance should be small compared with your mesh detail but larger than any gap from rounding. If vertices stay unmerged, the gap is probably larger than the Distance. Check the offset first. Raising the Distance is the quick fix, but it can also pull together vertices you wanted to keep apart.
In the Python example from the topic plan, use_merge_vertices is set to False. That is the right choice there, because the copies are spaced 1.1 widths apart and leave a visible gap. Nothing touches, so there is nothing to weld. Turning merge on in that case would have no effect.
import bpy
obj = bpy.context.active_object
arr = obj.modifiers.new(name="Array", type='ARRAY')
arr.fit_type = 'FIXED_COUNT'
arr.count = 6
arr.use_relative_offset = True
arr.relative_offset_displace[0] = 1.0
arr.use_merge_vertices = True
arr.merge_threshold = 0.001
arr.use_merge_vertices_cap = TrueThe last line, use_merge_vertices_cap, is the First Last option. It is useful for rings but is set here to show where it lives. For an open tube you would leave it False.
Start and end caps
A cap is a different object that the modifier adds at one end of the row. The Start Cap goes before the first copy. The End Cap goes after the last. Each takes a mesh object that you pick from a list.
Caps solve a common problem. A fence made of repeated posts and rails needs a different shape at each end, such as a finished corner post. A pipe run needs a flange at the end. A cap lets the repeating part stay simple while the ends are special.
How caps behave:
- A cap is placed in the same direction and spacing as the array, using its own bounds to work out where it fits.
- The cap object stays a separate object in the scene. You can move, edit, or hide it. Changes you make to the cap show up in the array.
- Caps are not counted in Count. A Count of 5 with both caps gives seven pieces in total.
- If you turn on Merge, the cap's vertices weld to the neighboring copy when they fall within Distance.
The cap's own origin matters. Blender positions the cap using the cap object's geometry relative to its origin, so place the origin where you want the cap to meet the row. A cap whose origin is far from its geometry appears shifted.
Common problems with caps
| Symptom | Likely cause | Fix |
|---|---|---|
| Cap appears far away from the row | Cap origin is not at its joining edge | Move the origin in Object Mode, or move the geometry in Edit Mode |
| Gap between cap and first copy | Offsets leave space, and Merge is off | Turn on Merge, or adjust the offset |
| Cap seems to do nothing | The chosen object is not a mesh | Caps accept mesh objects only |
| Array shrinks when you hide the cap | Hiding the cap object in the viewport can hide it from the result | Keep the cap visible, or move it to a hidden collection instead |
Choosing between the options
Pick the settings by asking what is fixed in your design:
- If the number of repeats is fixed, use Fixed Count.
- If the total length is fixed, use Fit Length.
- If the path is fixed, use Fit Curve with a Curve modifier after it.
- If the copies touch and should form one surface, turn on Merge.
- If the ends differ from the middle, add caps.
Exercise
A wall must be exactly 6 m long and is built from 1.25 m wide panels with a relative offset of 1.0 on X. You use Fit Length with a Length of 6. How many panels do you get, how long is the finished row, and what could you change so the row fills the 6 m?
Show answer
Blender divides 6 by the step of 1.25 to get 4.8 and rounds down, so you get 4 panels and the row is 5 m long. To fill 6 m, change the panel width or the offset so the step divides 6 evenly, for example a step of 1.2 gives exactly 5 panels, or a step of 1.5 gives exactly 4 panels.
Exercise
You build a chain with Fit Curve, but all the links sit in a straight line instead of following the curve. What is missing, and where must it go in the stack?
Show answer
A Curve modifier that uses the same curve object. It must come after the Array modifier, so that the Curve modifier bends all the copies the Array modifier created.