Skip to content
Snippets Groups Projects
Commit 94e23455 authored by Campbell Barton's avatar Campbell Barton
Browse files

increase margin and remove doubles a little, close verts gave issues with convex hull

parent 83243793
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,10 @@ def main_object(scene, obj, level, **kw): ...@@ -59,7 +59,10 @@ def main_object(scene, obj, level, **kw):
use_island_split = kw_copy.pop("use_island_split") use_island_split = kw_copy.pop("use_island_split")
from . import fracture_cell_setup from . import fracture_cell_setup
# not essential but selection is visual distraction.
obj.select = False
if kw_copy["use_debug_redraw"]: if kw_copy["use_debug_redraw"]:
obj_draw_type_prev = obj.draw_type obj_draw_type_prev = obj.draw_type
obj.draw_type = 'WIRE' obj.draw_type = 'WIRE'
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
def points_as_bmesh_cells(verts, points, def points_as_bmesh_cells(verts, points,
margin_bounds=0.01, margin_bounds=0.05,
margin_cell=0.0): margin_cell=0.0):
import mathutils import mathutils
from mathutils import Vector from mathutils import Vector
......
...@@ -216,7 +216,7 @@ def cell_fracture_objects(scene, obj, ...@@ -216,7 +216,7 @@ def cell_fracture_objects(scene, obj,
bm_vert.tag = True bm_vert.tag = True
import mathutils import mathutils
bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=0.0001) bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=0.005)
try: try:
bmesh.ops.convex_hull(bm, input=bm.verts) bmesh.ops.convex_hull(bm, input=bm.verts)
except RuntimeError: except RuntimeError:
...@@ -352,7 +352,7 @@ def cell_fracture_boolean(scene, obj, objects, ...@@ -352,7 +352,7 @@ def cell_fracture_boolean(scene, obj, objects,
if use_debug_redraw: if use_debug_redraw:
_redraw_yasiamevil() _redraw_yasiamevil()
if use_island_split: if apply and use_island_split:
# this is ugly and Im not proud of this - campbell # this is ugly and Im not proud of this - campbell
objects_islands = [] objects_islands = []
for obj_cell in objects_boolean: for obj_cell in objects_boolean:
...@@ -375,4 +375,6 @@ def cell_fracture_boolean(scene, obj, objects, ...@@ -375,4 +375,6 @@ def cell_fracture_boolean(scene, obj, objects,
objects_boolean = objects_islands objects_boolean = objects_islands
scene.update()
return objects_boolean return objects_boolean
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment