<p>What you try to do is called "Print in Place". However, it is not done by importing several STLs one after another as cura does remove the origin and recenters each imported object upon importing. However, an STL file can contain more than one body.</p>

<p>To generate a PiP model, you need to export your whole project as <strong>one</strong> STL file containing all the parts and then Cura not only doesn't rip the model apart, it <em>can't</em> do so.</p>

<h2>Workaround</h2>

<p>If you can't export the whole project in one piece from your design software, you could use a workaround by importing it into a software that can export as one item. Among these is blender, so importing all the parts into blender and then exporting the whole project as one STL is a simple fix. Other options would be TinkerCAD or Fusion360.</p>

<p>The Step by step guide for blender is simple and the general idea of this workflow is the same for other options:</p>

<ol>
<li>Open blender</li>
<li>New project</li>
<li>delete the cube via <code>entf</code> + <code>enter</code></li>
<li>Get the files into the workspace via either:<br>

<ul>
<li>Drag &amp; Drop

<ol>
<li><code>File &gt; Import &gt; Stl (.stl)</code></li>
<li>select the file + <code>enter</code></li>
</ol></li>
</ul></li>
<li>Possibly reposition the object, till it is in the right position</li>
<li>Repeat 4. to 6. till all parts are imported</li>
<li><code>File &gt; Export &gt; Stl (.stl)</code> + <code>enter</code></li>
</ol>

CC BY-SA 4.0
2019-10-13T19:16:46.413Z
My issue is that the program I'm using to create the objects is not able to export them as a single file, but only as separate ones. They do indeed need to be in one single STL file, but the question is about how to do that, given that the program will always output them in separate files.
N. Virgo
CC BY-SA 4.0
2019-10-13T19:17:43.387Z
Which program? Fusion360 can export a whole project.
Trish
CC BY-SA 4.0
2019-10-13T19:18:06.030Z
I wrote the program myself. The C++ library I used does not have the functionality to put more than one object in an STL file.
N. Virgo
CC BY-SA 4.0
2019-10-13T19:20:05.117Z
@Nathaniel then you might want to combine via blender by just importing all before exporting.
Trish
CC BY-SA 4.0
2019-10-13T19:20:11.980Z
Thanks for the edit. (+1) I'm not a blender user, and it is quite a complicated program - if you have time, step-by-step instructions would be super helpful.
N. Virgo
CC BY-SA 4.0
2019-10-13T19:26:17.423Z
@Nathaniel the step by step is simple and added.
Trish
CC BY-SA 4.0
2019-10-13T19:34:53.973Z
another option is to import them into Tinkercad, position them, export all in one group. Tinkercad is free and substantially less complex than the magic of Blender
fred_dot_u
CC BY-SA 4.0
2019-10-13T19:53:12.043Z
@Trish cool, that worked, thank you. (I didn't need to reposition them, as you said, it respected their positions in the original files.) The only disadvantage is, Blender for some reason uses its own special file dialog, which uses different conventions from my OS and is therefore mildly painful to use. However, I found I could drag to select multiple files, and thus avoid importing them one by one. I'll accept this in a day or two.
N. Virgo
CC BY-SA 4.0
2019-12-20T11:40:49.687Z
@Nathaniel Just came back to this question as I was looking for this workflow to link to, thanks for choosing your preferred workflow!
Trish
CC BY-SA 4.0
2019-10-13T19:13:34.290Z
2019-12-20T11:43:10.490Z
2019-12-20T11:43:10.490Z
Trish
<p>Similarly to @R..'s answer, you can easily concatenate the contents of each file if you have ASCII .stls.</p>

<ol>
<li>Make sure the .stls are in ASCII format: Open them in any text editor (like Notepad++). If it's readable, you're fine, proceed to (3)</li>
<li>If not readable, convert them to ASCII .stl format using a converter tool (<a href="https://www.meshconvert.com/" rel="nofollow noreferrer">like this</a>)</li>
<li>Open each ASCII .stl file</li>
<li>Copy together the contents of the files, except for the "solid" and "endsolid" statements where the files meet</li>
</ol>

CC BY-SA 4.0
2019-10-14T07:39:53.357Z
They're binary unfortunately. I'd have written a Python script to concatenate them otherwise. Sorry to be awkward!
N. Virgo
CC BY-SA 4.0
2019-10-14T06:20:07.857Z
2019-10-14T06:20:07.857Z
towe
<p>The operation you want is <em>almost</em> just cat'ing the files together. However you need to remove the 80 byte header from all but the first, and add up the 32-bit triangle count from each file immediately after that. Output should be:</p>

<ol>
<li>Copy of first 80 bytes of file 1</li>
<li>Sum of int32 from offset 80 of each file.</li>
<li>Bytes 84-end from each file.</li>
</ol>

<p>See <a href="https://en.m.wikipedia.org/wiki/STL_(file_format)" rel="noreferrer">https://en.m.wikipedia.org/wiki/STL_(file_format)</a></p>

CC BY-SA 4.0
2019-10-14T01:21:32.227Z
2019-10-14T01:21:32.227Z
R.. GitHub STOP HELPING ICE
<p>Import them to Tinkercad and then output your combined file from there. You can go into Tinkercad and on the top right side you will see "import", click that to import your file (you can repeat the process as desired) and it will put the files on the workspace .. on the screen. When you have your workspace all set the way you want select them all the click "export" and it will export all of them to one file for your use. </p>

CC BY-SA 4.0
2019-12-24T08:18:59.817Z
Hi Nate and welcome to 3D Printing.SE! Please expand the answer how one would do that, this is too short for an answer.
0scar
CC BY-SA 4.0
2020-01-14T14:41:30.510Z
My response has been edited per your request.
Nate E.
CC BY-SA 4.0
2019-12-24T01:54:14.103Z
2020-01-14T14:40:55.823Z
2020-01-14T14:40:55.823Z
Nate E.
<p>I have a collection of STL files, each containing a separate moving part of an object I want to print. (Imagine a set of gears, or similar, that prints as a single object with multiple moving parts.)</p>

<p>My plan was to import them all into Cura, then hit print, then take my fully assembled object off the build plate. However, Cura ignores the coordinate system in the STL files and automatically separates the components from each other on the build plate. This is usually helpful, but it isn't what I want in this case.</p>

<p>So I'm looking for a quick and simple way to combine my multiple STL files into a single STL file. I know that the objects don't overlap, so I don't need to do a CSG union operation - it's enough just to concatenate the objects.</p>

<p>I tried OpenSCAD, which works, but it takes a really long time, because the meshes are fairly complex and it does the full Boolean operation. Is there another quick and simple way to perform this task?</p>

<p>I'd prefer a command line utility, but I'd also be happy if there's a quick and simple way to do it in some free graphical software. (However, I don't want to spend time manually positioning the objects - they're already in the right places in the STL files, so I just want to import them and go.)</p>

<p><strong>Edit</strong> I've accepted Trish's answer (use Blender), but I'd still appreciate a command-line option if anyone knows one.</p>

CC BY-SA 4.0
2019-10-13T17:45:55.297Z
How would you expect the 3D printer to print the parts movable and at their position at the same time? If they are not placed on the build platform there will be a lot of support needed.
Klaus D.
CC BY-SA 4.0
2019-10-13T17:46:26.347Z
@KlausD. they are all in contact with the build platform and none of them have overhangs that would need support. However, they nevertheless interlock with each other in 3D space in such a way that they can't be separated.
N. Virgo
CC BY-SA 4.0
2019-10-13T17:50:58.777Z
(If that sounds impossible, imagine that one object is an hourglass and the other is a torus that surrounds it, with only a small gap between the inner surface of the torus and the neck of the egg timer. Both contact the build plate and no overhang is more than 45 degrees, but the hourglass can't be removed from the torus.)
N. Virgo
CC BY-SA 4.0
2019-10-13T18:25:01.827Z
@Pᴀᴜʟsᴛᴇʀ2 exactly that. But with the important provision that I know the parts don't overlap, so a Boolean union operation isn't needed.
N. Virgo
CC BY-SA 4.0
2019-10-13T18:30:10.543Z
It is funny you ask about this ... [Koenigsegg has to 3d print the turbochargers](https://www.gizmodo.com.au/2014/05/the-koenigsegg-one1s-3d-printed-variable-turbo-is-a-design-masterpiece/) for his ultra-supercars called "One:1". Can it be done, yes. I'd bet it lends back to how it's designed more so than how the print is setup after design.
Pᴀᴜʟsᴛᴇʀ2
CC BY-SA 4.0
2019-10-13T19:15:22.560Z
@Pᴀᴜʟsᴛᴇʀ2 it's abut how the file is stored.
Trish
CC BY-SA 4.0
2019-10-15T17:42:13.027Z
It's trivial to position separate objects in MeshMixer and export the result as a single STL.  I think you're trying to force a square solution into a round hole
Carl Witthoft
CC BY-SA 4.0
2019-10-15T17:50:33.243Z
@CarlWitthoft the objects are positioned already, just in separate files, and the idea is to *not* need to reposition them. No square pegs here, just a beautiful round one produced by homegrown C++ code, which needs a little polishing before it will fit.
N. Virgo
CC BY-SA 4.0
2019-10-15T17:53:47.140Z
(Well, to the extent that using a C++ library with overly restrictive I/O possibilities is a square solution, I agree that's the case here. Please take that up with the authors of CGAL, not me. It may be a square solution in that respect, but it's the only viable one in my case.)
N. Virgo
<3d-models><software><stl>
Combining multiple STL files
N. Virgo
# Combining multiple STL files

(Asked by: username_0 on 2019-10-13)

I have a collection of STL files, each containing a separate moving part of an object I want to print. (Imagine a set of gears, or similar, that prints as a single object with multiple moving parts.)

My plan was to import them all into Cura, then hit print, then take my fully assembled object off the build plate. However, Cura ignores the coordinate system in the STL files and automatically separates the components from each other on the build plate. This is usually helpful, but it isn't what I want in this case.

So I'm looking for a quick and simple way to combine my multiple STL files into a single STL file. I know that the objects don't overlap, so I don't need to do a CSG union operation - it's enough just to concatenate the objects.

I tried OpenSCAD, which works, but it takes a really long time, because the meshes are fairly complex and it does the full Boolean operation. Is there another quick and simple way to perform this task?

I'd prefer a command line utility, but I'd also be happy if there's a quick and simple way to do it in some free graphical software. (However, I don't want to spend time manually positioning the objects - they're already in the right places in the STL files, so I just want to import them and go.)

**Edit** I've accepted Trish's answer (use Blender), but I'd still appreciate a command-line option if anyone knows one.

**Tags:** 3d-models, software, stl
> **Comments:**
> **username_1**: How would you expect the 3D printer to print the parts movable and at their position at the same time? If they are not placed on the build platform there will be a lot of support needed.  
> **username_0**: @KlausD. they are all in contact with the build platform and none of them have overhangs that would need support. However, they nevertheless interlock with each other in 3D space in such a way that they can't be separated.  
> **username_0**: (If that sounds impossible, imagine that one object is an hourglass and the other is a torus that surrounds it, with only a small gap between the inner surface of the torus and the neck of the egg timer. Both contact the build plate and no overhang is more than 45 degrees, but the hourglass can't be removed from the torus.)  
> **username_0**: @Pᴀᴜʟsᴛᴇʀ2 exactly that. But with the important provision that I know the parts don't overlap, so a Boolean union operation isn't needed.  
> **username_2**: It is funny you ask about this ... [Koenigsegg has to 3d print the turbochargers](https://www.gizmodo.com.au/2014/05/the-koenigsegg-one1s-3d-printed-variable-turbo-is-a-design-masterpiece/) for his ultra-supercars called "One:1". Can it be done, yes. I'd bet it lends back to how it's designed more so than how the print is setup after design.  
> **username_3**: @Pᴀᴜʟsᴛᴇʀ2 it's abut how the file is stored.  
> **username_4**: It's trivial to position separate objects in MeshMixer and export the result as a single STL.  I think you're trying to force a square solution into a round hole  
> **username_0**: @CarlWitthoft the objects are positioned already, just in separate files, and the idea is to *not* need to reposition them. No square pegs here, just a beautiful round one produced by homegrown C++ code, which needs a little polishing before it will fit.  
> **username_0**: (Well, to the extent that using a C++ library with overly restrictive I/O possibilities is a square solution, I agree that's the case here. Please take that up with the authors of CGAL, not me. It may be a square solution in that respect, but it's the only viable one in my case.)  

---

## 4 answers

### Answer by username_3 on 2019-10-13. Score: 3 | Accepted answer

What you try to do is called "Print in Place". However, it is not done by importing several STLs one after another as cura does remove the origin and recenters each imported object upon importing. However, an STL file can contain more than one body.

To generate a PiP model, you need to export your whole project as **one** STL file containing all the parts and then Cura not only doesn't rip the model apart, it *can't* do so.

## Workaround

If you can't export the whole project in one piece from your design software, you could use a workaround by importing it into a software that can export as one item. Among these is blender, so importing all the parts into blender and then exporting the whole project as one STL is a simple fix. Other options would be TinkerCAD or Fusion360.

The Step by step guide for blender is simple and the general idea of this workflow is the same for other options:

1. Open blender
2. New project
3. delete the cube via `entf` + `enter`
4. Get the files into the workspace via either:  
   * Drag & Drop
     1. `File > Import > Stl (.stl)`
     2. select the file + `enter`
5. Possibly reposition the object, till it is in the right position
6. Repeat 4. to 6. till all parts are imported
7. `File > Export > Stl (.stl)` + `enter`

> **Comments:**
> **username_0**: My issue is that the program I'm using to create the objects is not able to export them as a single file, but only as separate ones. They do indeed need to be in one single STL file, but the question is about how to do that, given that the program will always output them in separate files.  
> **username_3**: Which program? Fusion360 can export a whole project.  
> **username_0**: I wrote the program myself. The C++ library I used does not have the functionality to put more than one object in an STL file.  
> **username_3**: @Nathaniel then you might want to combine via blender by just importing all before exporting.  
> **username_0**: Thanks for the edit. (+1) I'm not a blender user, and it is quite a complicated program - if you have time, step-by-step instructions would be super helpful.  
> **username_3**: @Nathaniel the step by step is simple and added.  
> **username_5**: another option is to import them into Tinkercad, position them, export all in one group. Tinkercad is free and substantially less complex than the magic of Blender  
> **username_0**: @Trish cool, that worked, thank you. (I didn't need to reposition them, as you said, it respected their positions in the original files.) The only disadvantage is, Blender for some reason uses its own special file dialog, which uses different conventions from my OS and is therefore mildly painful to use. However, I found I could drag to select multiple files, and thus avoid importing them one by one. I'll accept this in a day or two.  
> **username_3**: @Nathaniel Just came back to this question as I was looking for this workflow to link to, thanks for choosing your preferred workflow!  

---

### Answer by username_7 on 2019-10-14. Score: 6

The operation you want is *almost* just cat'ing the files together. However you need to remove the 80 byte header from all but the first, and add up the 32-bit triangle count from each file immediately after that. Output should be:

1. Copy of first 80 bytes of file 1
2. Sum of int32 from offset 80 of each file.
3. Bytes 84-end from each file.

See <https://en.m.wikipedia.org/wiki/STL_(file_format)>


---

### Answer by username_6 on 2019-10-14. Score: 4

Similarly to @R..'s answer, you can easily concatenate the contents of each file if you have ASCII .stls.

1. Make sure the .stls are in ASCII format: Open them in any text editor (like Notepad++). If it's readable, you're fine, proceed to (3)
2. If not readable, convert them to ASCII .stl format using a converter tool ([like this](https://www.meshconvert.com/))
3. Open each ASCII .stl file
4. Copy together the contents of the files, except for the "solid" and "endsolid" statements where the files meet

> **Comments:**
> **username_0**: They're binary unfortunately. I'd have written a Python script to concatenate them otherwise. Sorry to be awkward!  

---

### Answer by username_8 on 2019-12-24. Score: 1

Import them to Tinkercad and then output your combined file from there. You can go into Tinkercad and on the top right side you will see "import", click that to import your file (you can repeat the process as desired) and it will put the files on the workspace .. on the screen. When you have your workspace all set the way you want select them all the click "export" and it will export all of them to one file for your use.

> **Comments:**
> **username_9**: Hi Nate and welcome to 3D Printing.SE! Please expand the answer how one would do that, this is too short for an answer.  
> **username_8**: My response has been edited per your request.  

---

