3D Print Toolbox: Add hollow out #105194

Merged
Mikhail Rachinskiy merged 9 commits from usfreitas/blender-addons:hollow into main 2024-03-18 12:24:30 +01:00
Showing only changes of commit fe33b8edf2 - Show all commits

View File

@ -909,6 +909,9 @@ class MESH_OT_print3d_hollow(Operator):
# Generate offset surface
if self.offset_direction == 'INSIDE':
newverts, newquads = levelset.convertToQuads(-self.offset)
if newquads.size == 0:
self.report({"ERROR"}, "Make sure target mesh has closed surface and offset value is less than half of target thickness")
MikhailRachinskiy marked this conversation as resolved Outdated

Again, you don't need to comment on every line, there is a check above if create_hollow and you are using bpy.data.objects.new right after it, the code is self-explanatory.

Same with offset check.

Again, you don't need to comment on every line, there is a check above `if create_hollow` and you are using `bpy.data.objects.new` right after it, the code is self-explanatory. Same with offset check.
return {'FINISHED'}
MikhailRachinskiy marked this conversation as resolved Outdated

That's unnecessary, just check if in edit mode in invoke method and if true switch to object mode, switching back is not needed here.

That's unnecessary, just check if in edit mode in `invoke` method and if true switch to object mode, switching back is not needed here.
else:
newverts, newquads = levelset.convertToQuads(self.offset)