To separate an object, I use the edge split modifier in the object mode:
then I go into edit mode, put my mouse over the external face and press L. This operation select all the external part and I can separate it from the rest :
However when I try to do it with a script it doesn't work because I have to manually put my mouse over the external surface... Have you any ideas on how to seperate this object in two parts (the external part and the rest) with a python script ?
me = bpy.context.object.data bm = bmesh.new() bm.from_mesh(me) for face in bm.faces: center = face.calc_center_median() for i in range (100,0): if center.z >= i : face.select_set(True) if face.select_set(True): return bm.to_mesh(me) bm.free()
$\endgroup$