blender/extern/carve
Sergey Sharybin 34c7fd1a11 Fix T38918: Boolean modifier crashes when using specific topology
There were loads of issues in the code still which are mow likely fixed:

- Hole resolver hook had memory leak -- it didn't free face with holes
  when triangulating it.

- Original edge mapping didn't work correct. old code related on the fact
  that loop order is not changing when constructing the MeshSet class, but
  in fact it does change.

  Currently used edge map for this because it was easiest way to do it now,
  but after the release we're to change it. Main reason is that face mapping
  is not correct as well (and it was never correct actually). So we'll need
  to construct Mesh structures by our own to be sure we're using correct
  original index mapping.

- Carve might produce faces with ears, which is forbidden in Blender.
  it wasn't an issue in old integration because triangulation will remove
  the ears. So for now simply added ears removing back as a hook.

  But actual reason of the ears is to be investigated really.

  This hook will only work for NGons, quads are assumed not be able to
  have ears. So this additional hook shouldn't slow down things much.

- Carve's hole resolver produces duplicated faces in some cases. Still not
  sure what is the reason of this. Code here is not so much straightforward,
  this is to be investigated later.

  For now solved the issue as own hole resolver which checks for duplicated
  faces after the hole resolving.

  The additional checks here will only run if the mesh actually have hole
  and wouldn't introduce slowdown for faces which doesn't have holes.

- Made it so if edge user triangulation gets a split (for example, in cases
  when this edge intersects with the second operand) it wouldn't be dissolved.

  This prevents cases of crappy topology after dissolving in several cases.

- Edge dissolver didn't check for whether edge is a non-manifold. We couldn't
  really dissolve open manifold edges.

  The bad thing about this is that mesh triangulation might produce non-manifold
  edges and they wouldn't be dissolved. Not worst case in the world, but would
  be nice to have it solved somehow.

- Exporting mesh form Carve to Blender might have produced duplicated edges
  in cases when several non-manifold faces shared the edge. This is also fixed
  now.

- Mesh triangulation might have produced duplicated faces, which is really bad.
  Fixed by keeping a track on which faces we've created and skipping adding new
  triangle if we already have one.

This all might introduce some slowdown, but we're too close to the release now,
so would rather have it slower but robust. After the release we might look into
ways to speed things up.
2014-03-04 20:18:16 +06:00
..
include/carve Fix T38918: Boolean modifier crashes when using specific topology 2014-03-04 20:18:16 +06:00
lib Update Carve to latest update 2014-01-27 17:04:06 +06:00
patches Update patch for mesh_simplifier 2014-02-28 19:09:22 +06:00
bundle.sh Preserve non-flat faces in boolean modifier 2014-02-24 18:10:33 +06:00
carve-capi.cc Fix T38918: Boolean modifier crashes when using specific topology 2014-03-04 20:18:16 +06:00
carve-capi.h Rework carve integration into boolean modifier 2014-02-13 17:16:53 +06:00
carve-util.cc Fix T38918: Boolean modifier crashes when using specific topology 2014-03-04 20:18:16 +06:00
carve-util.h Fix T38918: Boolean modifier crashes when using specific topology 2014-03-04 20:18:16 +06:00
CMakeLists.txt Preserve non-flat faces in boolean modifier 2014-02-24 18:10:33 +06:00
files.txt Preserve non-flat faces in boolean modifier 2014-02-24 18:10:33 +06:00
LICENSE.GPL2 Carve booleans library integration 2012-01-16 16:46:00 +00:00
mkfiles.sh Carve bundler script cleanup 2013-11-28 14:00:10 +06:00
SConscript Fix scons compiling after carve changes 2014-02-13 23:21:13 +01:00