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
8aa0fcd8
Commit
8aa0fcd8
authored
5 years ago
by
Mikhail Rachinskiy
Browse files
Options
Downloads
Patches
Plain Diff
3D-Print: remove Clean Isolated tool
This is already handeled by Make Manifold.
parent
3d1eb9c2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
object_print3d_utils/__init__.py
+0
-1
0 additions, 1 deletion
object_print3d_utils/__init__.py
object_print3d_utils/operators.py
+0
-62
0 additions, 62 deletions
object_print3d_utils/operators.py
object_print3d_utils/ui.py
+1
-3
1 addition, 3 deletions
object_print3d_utils/ui.py
with
1 addition
and
66 deletions
object_print3d_utils/__init__.py
+
0
−
1
View file @
8aa0fcd8
...
...
@@ -143,7 +143,6 @@ classes = (
operators
.
MESH_OT_print3d_check_sharp
,
operators
.
MESH_OT_print3d_check_overhang
,
operators
.
MESH_OT_print3d_check_all
,
operators
.
MESH_OT_print3d_clean_isolated
,
operators
.
MESH_OT_print3d_clean_distorted
,
# operators.MESH_OT_print3d_clean_thin,
operators
.
MESH_OT_print3d_clean_non_manifold
,
...
...
This diff is collapsed.
Click to expand it.
object_print3d_utils/operators.py
+
0
−
62
View file @
8aa0fcd8
...
...
@@ -337,68 +337,6 @@ class MESH_OT_print3d_check_all(Operator):
return
{
'
FINISHED
'
}
class
MESH_OT_print3d_clean_isolated
(
Operator
):
bl_idname
=
"
mesh.print3d_clean_isolated
"
bl_label
=
"
3D-Print Clean Isolated
"
bl_description
=
"
Cleanup isolated vertices and edges
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
def
execute
(
self
,
context
):
obj
=
context
.
active_object
bm
=
mesh_helpers
.
bmesh_from_object
(
obj
)
change
=
False
def
face_is_isolated
(
ele
):
for
loop
in
ele
.
loops
:
loop_next
=
loop
.
link_loop_radial_next
if
loop
is
not
loop_next
:
return
False
return
True
def
edge_is_isolated
(
ele
):
return
ele
.
is_wire
def
vert_is_isolated
(
ele
):
return
not
bool
(
ele
.
link_edges
)
# --- face
elems_remove
=
[
ele
for
ele
in
bm
.
faces
if
face_is_isolated
(
ele
)]
remove
=
bm
.
faces
.
remove
for
ele
in
elems_remove
:
remove
(
ele
)
change
|=
bool
(
elems_remove
)
face_count
=
len
(
elems_remove
)
del
elems_remove
# --- edge
elems_remove
=
[
ele
for
ele
in
bm
.
edges
if
edge_is_isolated
(
ele
)]
remove
=
bm
.
edges
.
remove
for
ele
in
elems_remove
:
remove
(
ele
)
change
|=
bool
(
elems_remove
)
edge_count
=
len
(
elems_remove
)
del
elems_remove
# --- vert
elems_remove
=
[
ele
for
ele
in
bm
.
verts
if
vert_is_isolated
(
ele
)]
remove
=
bm
.
verts
.
remove
for
ele
in
elems_remove
:
remove
(
ele
)
change
|=
bool
(
elems_remove
)
vert_count
=
len
(
elems_remove
)
del
elems_remove
# ---
self
.
report
({
'
INFO
'
},
f
"
Removed Verts:
{
vert_count
}
, Edges:
{
edge_count
}
, Faces:
{
face_count
}
"
)
if
change
:
mesh_helpers
.
bmesh_to_object
(
obj
,
bm
)
return
{
'
FINISHED
'
}
return
{
'
CANCELLED
'
}
class
MESH_OT_print3d_clean_distorted
(
Operator
):
bl_idname
=
"
mesh.print3d_clean_distorted
"
bl_label
=
"
3D-Print Clean Distorted
"
...
...
This diff is collapsed.
Click to expand it.
object_print3d_utils/ui.py
+
1
−
3
View file @
8aa0fcd8
...
...
@@ -109,9 +109,7 @@ class VIEW3D_PT_print3d_cleanup(Panel, Setup):
print_3d
=
context
.
scene
.
print_3d
col
=
layout
.
column
(
align
=
True
)
col
.
operator
(
"
mesh.print3d_clean_isolated
"
,
text
=
"
Isolated
"
)
row
=
col
.
row
(
align
=
True
)
row
=
layout
.
row
(
align
=
True
)
row
.
operator
(
"
mesh.print3d_clean_distorted
"
,
text
=
"
Distorted
"
)
row
.
prop
(
print_3d
,
"
angle_distort
"
,
text
=
""
)
layout
.
operator
(
"
mesh.print3d_clean_non_manifold
"
,
text
=
"
Make Manifold
"
)
...
...
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