Page MenuHome

Destructive Extrude Operator
Needs ReviewPublic

Authored by D. N. (CandleComet) on Wed, Jul 24, 9:18 PM.
"Burninate" token, awarded by jfmatheu."Like" token, awarded by astrand130."Like" token, awarded by johnpdelacruz26."Love" token, awarded by rl.amorato."Love" token, awarded by brilliant_ape."Love" token, awarded by JulienKaspar."Love" token, awarded by amonpaike."Love" token, awarded by jendrzych."Love" token, awarded by xrg."Love" token, awarded by TheRedWaxPolice."Love" token, awarded by Okavango."Like" token, awarded by ace_dragon."Love" token, awarded by Otilla."Love" token, awarded by HooglyBoogly."Like" token, awarded by meta-androcto."Like" token, awarded by campbellbarton.


Group Reviewers
Mesh Modeling

This code adds an extrude variant which functions by first extruding normally then joining and dissolving certain geometry. The operator makes it extremely quick and simple to block out environments, complex buildings, stairs, doors, etc.

This tool has three options:

  • Original Loop determines whether to keep the original boundary edges of the extrusion.
  • Successive Loops determines whether to insert loops after contacting new geometry.
  • Destroy End determines whether to delete open faces after the extrusion, simulating a boolean operation.

These options are hard to explain, try using a subdivided cube to see exactly what I mean. 🙂
Also, there is the ability to snap to existing loops while holding ctrl.

Demonstrates the use of the tool and some of the options.

Design Points:

  • This operator does not use boolean. It accesses only local geometry. Disconnected and in-adjacent geometry is basically ignored. This means that it is usually impossible to create a hole by extruding 'all the way through.'
  • Vertices that are not aligned to the extruded geometry are ignored. For example, here the circled edge will cause an unwanted result after extruding into it.

Here's another example where vertices will not align once extruded up, past the top face:

This is a fairly common circumstance, and it can be hard to see when this will or has occurred, because much of the resulting geometry will be overlapping. How to handle this case?

Diff Detail

rB Blender

Event Timeline

D. N. (CandleComet) edited the summary of this revision. (Show Details)Thu, Jul 25, 12:56 AM

Nice functionality, don't have time for review now.

Seems useful for low poly modeling, users may quickly want this to perform more advanced boolean-like operation.

Added to T63731: Modeling Module to review for 2.81.


BM_edge_is_boundary can be used here.

Really nice functionality. We have this in addon form missing the ability to set depth in mesh tools addon's "Extrude and Reshape" by @Germano Cavalcante (mano-wii)
There's also an external Destructive Extrude addon with same/similar functionality. It would be great to have this built in.

D. N. (CandleComet) edited the summary of this revision. (Show Details)Thu, Jul 25, 5:19 AM
  • In bmo_extrude_destructive: Used BM_edge_is_boundary rather than checking BM_edge_face_count is 1.
  • In bmesh_opdefines: Deleted 2 unused slots which had somehow slipped by.
D. N. (CandleComet) marked an inline comment as done.Fri, Jul 26, 5:53 AM
D. N. (CandleComet) updated this revision to Diff 16605.

Code cleanup, renaming, simplifying.

@D. N. (CandleComet)
What You mean by "it is usually impossible to create a hole by extruding 'all the way"? Rare, exceptional cases, or rather most of the situations?
Making holes by extruding part of a geometry all the way its volume is one of the main potential strength of this tool! Lack of it makes it less useful than it could be. Sketchup's Push'n'Pull works this way and makes modeling super fast, elegant and enjoyable.

D. N. (CandleComet) added a comment.EditedSat, Aug 3, 7:25 PM

@Andrzej Ambroz (jendrzych)
Basically, it can never create an actual hole. It only works where faces lie along the boundary. For example, in a subdivided cube:

  • extruding down a corner all the way through works
  • extruding down a face on the side also works
  • extruding a center face completely through does not create a hole. That would be very useful, though. The geometry on the bottom side is not taken into account.

This is the case because this operator isn't based on a boolean operation, I mean it does not take volumes into account. It's based more on the actual boundary topology, like regular extrude. So accessing separated faces on the other side is difficult. The benefit, however, is that this gives the ability for more topological options like Original Loop and Successive Loops.

Hello guys. I would like to propose an additional type of extrude function.

here is the link. Thanks.

Had a look at @John Paul Anthony G. Dela Cruz (johnpdelacruz26) 's idea and saw that it'd be quite simple to code.

  • Added it as an option called Keep Sides. Thanks, johnpdelacruz26

I'll update the recording soon to demonstrate this option.