Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-09 15:23:07 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-09 15:23:07 +0300
commit120d31a17c0eb571420b828425fc1fe6ef13db2d (patch)
tree0c5a34522c096d3ed14aa288b1d19c27d9c49b33
parentae81bc5c77535a019c3c49ef022551248e7c317b (diff)
3D-Print: remove interior faces with Make Manifold
-rw-r--r--object_print3d_utils/operators.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/object_print3d_utils/operators.py b/object_print3d_utils/operators.py
index 12fca69e..81c72c7f 100644
--- a/object_print3d_utils/operators.py
+++ b/object_print3d_utils/operators.py
@@ -199,7 +199,7 @@ class MESH_OT_print3d_check_degenerate(Operator):
class MESH_OT_print3d_check_distorted(Operator):
bl_idname = "mesh.print3d_check_distort"
bl_label = "3D-Print Check Distorted Faces"
- bl_description = "Check for non-flat faces "
+ bl_description = "Check for non-flat faces"
@staticmethod
def main_check(obj, info):
@@ -428,7 +428,7 @@ class MESH_OT_print3d_clean_distorted(Operator):
class MESH_OT_print3d_clean_non_manifold(Operator):
bl_idname = "mesh.print3d_clean_non_manifold"
bl_label = "3D-Print Clean Non-Manifold and Inverted"
- bl_description = "Cleanup problems, like holes, non-manifold vertices, and inverted normals"
+ bl_description = "Cleanup problems, like holes, non-manifold vertices and inverted normals"
bl_options = {'REGISTER', 'UNDO'}
threshold: bpy.props.FloatProperty(
@@ -450,6 +450,7 @@ class MESH_OT_print3d_clean_non_manifold(Operator):
bm_key_orig = self.elem_count(context)
self.delete_loose()
+ self.delete_interior()
self.remove_doubles(self.threshold)
self.dissolve_degenerate(self.threshold)
self.fix_non_manifold(context, self.sides) # may take a while
@@ -493,6 +494,13 @@ class MESH_OT_print3d_clean_non_manifold(Operator):
bpy.ops.mesh.delete_loose()
@staticmethod
+ def delete_interior():
+ """delete interior faces"""
+ bpy.ops.mesh.select_all(action='DESELECT')
+ bpy.ops.mesh.select_interior_faces()
+ bpy.ops.mesh.delete(type='FACE')
+
+ @staticmethod
def dissolve_degenerate(threshold):
"""dissolve zero area faces and zero length edges"""
bpy.ops.mesh.select_all(action='SELECT')