I would like to select in python the visible perimeter of a mesh. My idea is to get only the external vertices, not all visible.

Any idea or link that can help me?


2 Answers 2



Can select boundary edges using BMEdge.is_boundary Below is a test script, run in edit mode

import bpy
import bmesh
context = bpy.context

obj = context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
bm.select_mode |= {'EDGE'}
for e in bm.edges:
    e.select = e.is_boundary

Not sure here if you are after the "silhouette" verts. As in your question here


If your mesh is not very complex, you can do this manually.

  1. Switch to Edit Vertex mode.
  2. Hold Ctrl and LMB and move the mouse. You will notice the dynamic selection region appears.
  3. Try drawing a circular selection region with some radius. Don't release Ctrl and LMB.
  4. Once the circle is complete, don not release Ctrl and LMB, pick a larger radius and do that again. You will see that the inner circle is now inverted and your selection region looks like a donut. Vertices inside that area are selected.

Second way is to enable the LoopTools add-on in User Preferences (search for it as LoopTools - without space). This extension brings new menu items in the 3d-view.

Select a few consequent vertices that belong to the perimeter and then try Select / Edge Loops. This may or may not work, depends on your mesh. Works well on spheres.

  • $\begingroup$ The mesh can be very complex and I want to do all with python. More or less, I want the same you get when select an object in the viewport and you see a highlight color in the perimeter, including internal holes. $\endgroup$
    – Antonioya
    Commented Feb 18, 2016 at 17:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .