Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
e0b24a11
Commit
e0b24a11
authored
12 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
remove doubles after booleans
parent
282456e8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_fracture_cell/fracture_cell_setup.py
+25
-18
25 additions, 18 deletions
object_fracture_cell/fracture_cell_setup.py
with
25 additions
and
18 deletions
object_fracture_cell/fracture_cell_setup.py
+
25
−
18
View file @
e0b24a11
...
...
@@ -312,6 +312,7 @@ def cell_fracture_boolean(scene, obj, objects,
use_interior_hide
=
False
,
use_debug_redraw
=
False
,
level
=
0
,
remove_doubles
=
True
):
objects_boolean
=
[]
...
...
@@ -350,22 +351,29 @@ def cell_fracture_boolean(scene, obj, objects,
mesh_new
=
None
# avoid unneeded bmesh re-conversion
bm
=
None
if
clean
and
mesh_new
:
if
bm
is
None
:
# ok this will always be true for now...
bm
=
bmesh
.
new
()
bm
.
from_mesh
(
mesh_new
)
bm
.
normal_update
()
try
:
bmesh
.
ops
.
dissolve_limit
(
bm
,
verts
=
bm
.
verts
,
edges
=
bm
.
edges
,
angle_limit
=
0.001
)
except
RuntimeError
:
import
traceback
traceback
.
print_exc
()
if
bm
is
not
None
:
bm
.
to_mesh
(
mesh_new
)
bm
.
free
()
if
mesh_new
is
not
None
:
bm
=
None
if
clean
:
if
bm
is
None
:
# ok this will always be true for now...
bm
=
bmesh
.
new
()
bm
.
from_mesh
(
mesh_new
)
bm
.
normal_update
()
try
:
bmesh
.
ops
.
dissolve_limit
(
bm
,
verts
=
bm
.
verts
,
edges
=
bm
.
edges
,
angle_limit
=
0.001
)
except
RuntimeError
:
import
traceback
traceback
.
print_exc
()
if
remove_doubles
:
if
bm
is
None
:
bm
=
bmesh
.
new
()
bm
.
from_mesh
(
mesh_new
)
bmesh
.
ops
.
remove_doubles
(
bm
,
verts
=
bm
.
verts
,
dist
=
0.005
)
if
bm
is
not
None
:
bm
.
to_mesh
(
mesh_new
)
bm
.
free
()
del
mesh_new
del
mesh_old
...
...
@@ -429,8 +437,7 @@ def cell_fracture_interior_handle(objects,
for
bm_edge
in
bm
.
edges
:
if
len
({
bm_face
.
hide
for
bm_face
in
bm_edge
.
link_faces
})
==
2
:
bm_edge
.
smooth
=
False
if
use_sharp_edges_apply
:
edges
=
[
edge
for
edge
in
bm
.
edges
if
edge
.
smooth
is
False
]
if
edges
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment