3D Print Around Captive Parts

Unique advantage:

The process of fused filament fabrication (FFF) allows, like no other process that I know, an access to the interior of the part during fabrication. It is then possible to stop printing in order to insert parts into the cavities before resuming printing. This method allows you to combine a wider palette of materials, including metal.



It may be advantageous to conceal the inside components of a casing.

  • Mechanism

  • Magnet (for the fridge)

  • Weight (higher density)

  • Electronic

  • Metallic fasteners

  • Everything you can imagine …


Usually to design a case you need at least two parts, the box and the cover. In addition you have to think how they will fit together, if they are glued or if they need a hinge, fasteners, etc. By using the captive part idea you avoid having to use the design of multiple and complex parts. You only have to design a closed box. The end result stands in one block and prevents you from losing parts along the way. This is a simple way to protect sensitive equipment from dust, fingers or even water. The reliability of the device is increased.


In terms of the maintenance, it is impossible. You have to break the part to access its contents. It is better to plan using components whose reliability has been demonstrated. In the worst case, the part has to be sacrificed and another one printed. PLA is probably more suited for this kind of scenario because it is reusable and biodegradable.


If you have to firmly fix two parts together and only have a limited space (high constraint) then the weakness of the thermoplastic may become a limitation. It is not always possible or practical to bolt parts side to side and fillets tapped into the plastic have limited resistance and working life. Based on the principle of captive parts it becomes easier to use inserts to solve the fixation problem. There you can have the resistance of the steel where you need it.

Design Guidelines:

The insertion must be done when the cavity is deep enough to completely cover the highest point of the part. Otherwise the print head might collide with the top of the part. Consider also non-extruding movements.


The opening must be wide enough for the part.

This means that the opening may not be narrower than the widest section of the part to be inserted. In the example of the hexagonal nut, the lower part of the cavity follows the hexagonal shape of the nut, but on the upper part, the sides are vertical or wider. Only the ceiling can close the cavity.

The opening must not be too large. This is for the printer to build a bridge of filament from one edge to the other and if the hole is too large, the filament may not hold up to the other side. This limits the size of the parts that can be inserted.


How to proceed:

We will find the layer where the ceiling is printed and we will insert a stop in the G code before its execution.


  1. On the 3D model, measure the distance between the floor (Z0) and the ceiling closing the cavity. We will stop the printer at this height.


  1. Generate G code by disabling the support material.


  1. Open the G code file using an editor like Notepad or Notepad + + and search (Ctrl + F) for Z <Distance Measurement>

It is possible that the measured distance is not reflected accurately in the code. It may round the Z value to the next full layer. For example it may not have made a layer at Z16mm exactly as measured, so the roof will be built on the next layer. Continue the search with fewer significant digits.


  1. In the G code, you will find a line similar to this one:

G1 Z16.060 F12000.000


  1. Just before the line with a Z value, insert the following two lines:

G1 X5 Y5



G1 X5 Y5 will move the print head to the coordinates (5, 5) to clear the area.

M0 will stop the printer to standby intervention. “Wait for user…”


  1. Insert the prisoner part and ensure its highest point doesn’t exceed.


  1. Press the button next to the LCD screen to resume the print.


And voilà!

 2014-03-27 15.36.10

*If you have a beeper, it is even possible to use the M300 command to alert you when the machine is ready for the insert. Like this:

G1 X5 Y5



If printing doesn’t resume… Do not close the printer! As the printer remains on, it retains its position. You can then edit the code and remove the G M0 command and all that lies before it. Send this file to the printer, make sure of the temperatures and continue printing with the new file without homing.


I hope you enjoyed this tip and I would be interested to hear about your opinions and experiments.

What do you think?