1

I work with other people who design using CAD program, i convert them using freecad. I import those drawings as DAE files (sometimes as obj or STL, dae works best). I do not know the cause of it, but in general their drawings contain a lot of identical objects in identical locations. So a single screw for example is repeated 4 times at exact same location (however the whole dae import uses 1 shared origin by all objects).

I would like to remove all the duplicates perhaps by a script (set origin to selected object volume) then do a vertex count, and check if a similair object exists at the same location with same vertex count (screq and bolt may contain similair location but have different vertex count) so that would retain both.

Any idea on how to script it ?

Peter
  • 2,344
  • 1
  • 12
  • 26
  • 1
    As of 2.8x you can enter Edit Mode for all objects in selection so I you don't necessarily need a script. Try to: select all meshes, switch to Edit Mode > Alt+M > Merge by Distance. If you want a script have a look into this answer. Does that work for you? – brockmann Mar 13 '20 at 15:22
  • Merge by distance doesnt solve it, it doesnt check if objects are disconnected – Peter Mar 16 '20 at 10:16
  • Hard to guess how the geometry looks like. Can you share a blend containing any example geometry to test? – brockmann Mar 16 '20 at 10:25
  • Sadly no i cannot share those are all copyrighted product files dont belong to me, (NDA) with all technical internals, remove by distances though works by edge length between verticles, it doesnt compare if verticles are near but unconnected. Those files come in many parts (scerws plates electronics mechanics etc) and most parts are repeated multiple times, in exact same position. Think of chair containing 12 legs, but in the normal 4 locations of a chair leg, amount is per leg can be random too. – Peter Mar 17 '20 at 22:42
  • Suggest create any exemplary geometry by yourself showing all the details you're talking about and ideally a list of possible issues so we can go through and don't miss anything. TBH: I don't get what's so special about your chair example: It's not about how many legs there are. If the geometry is equal per leg, merge by distance is your friend... so I guess the geometry is not the same for whatever reason but again that's hard to imagine. – brockmann Mar 18 '20 at 09:23
  • I'm experiencing this issue as well. Every mesh is duplicated 4 times. Every material has 4 different layers inside. Don't know how to fix. – Omar Filippini Feb 07 '22 at 13:44

0 Answers0