<p>I'm not aware of a way to do this in LeoCAD directly, but assuming that your overlapping brick is an exact duplicate (same element, same position, same rotation, etc) it will show up as a duplicate line in the LDraw file. Something as simple as this should show you what it is:</p>

<pre><code>uniq -d model.ldr
</code></pre>

<p>You could also use any other tool for finding duplicate lines.</p>

<p>If you find a duplicate, it will look something like this:</p>

<pre><code>1 4 -70 -48 -40 1 0 0 0 1 0 0 0 1 3005.DAT
</code></pre>

<p>The 3rd, 4th, and 5th items are the x,y, and z coordinates, which you can use to track down duplicate elements and remove them inside LeoCAD. Alternatively, you can remove all but one of the duplicate lines from the file directly.</p>

CC BY-SA 4.0
2018-09-18T20:03:33.537Z
2018-09-19T18:09:56.717Z
2018-09-19T18:09:56.717Z
jncraton
<p>I've just started using <a href="https://www.leocad.org/" rel="noreferrer">LeoCAD</a> to generate instructions for a model I want to share.  I've been able to get it working despite the sparse tutorials.  But in looking at my results so far I see that I've got an extra part in one step.  I'm pretty sure this is a left over from duping the same part over and over again.  One benefit of this is that the part must be overlapping with another part.  How can I find and remove this extraneous part?</p>

CC BY-SA 4.0
2018-09-17T03:17:40.767Z
The author of LeoCAD also helped me work around a bug I was experiencing to get this far.  https://github.com/leozide/leocad/issues/255  Kudos for excellent free software support.
chicks
<software>
How can I find overlapping bricks in LeoCAD?
chicks
# How can I find overlapping bricks in LeoCAD?

(Asked by: username_0 on 2018-09-17)

I've just started using [LeoCAD](https://www.leocad.org/) to generate instructions for a model I want to share. I've been able to get it working despite the sparse tutorials. But in looking at my results so far I see that I've got an extra part in one step. I'm pretty sure this is a left over from duping the same part over and over again. One benefit of this is that the part must be overlapping with another part. How can I find and remove this extraneous part?

**Tags:** software

> **Comments:**
> **username_0**: The author of LeoCAD also helped me work around a bug I was experiencing to get this far.  https://github.com/leozide/leocad/issues/255  Kudos for excellent free software support.  

---

## 1 answers

### Answer by username_1 on 2018-09-18. Score: 4 | Accepted answer

I'm not aware of a way to do this in LeoCAD directly, but assuming that your overlapping brick is an exact duplicate (same element, same position, same rotation, etc) it will show up as a duplicate line in the LDraw file. Something as simple as this should show you what it is:
uniq -d model.ldr

You could also use any other tool for finding duplicate lines.
If you find a duplicate, it will look something like this:
1 4 -70 -48 -40 1 0 0 0 1 0 0 0 1 3005.DAT

The 3rd, 4th, and 5th items are the x,y, and z coordinates, which you can use to track down duplicate elements and remove them inside LeoCAD. Alternatively, you can remove all but one of the duplicate lines from the file directly.


---

