Delete Internal Geometry - Remove vertices help


I am writing an automated process to optimise a large number of 3d models. For part of the process i want to remove all the internal geometry and keep the shell only. To do this i am trying to perform ray casts from each vertex to see if they are internal or external, i then create a list of theese vertices. My question is how do i delete a vertices from a mesh? I can see no option to do this. I have tried using: = True
and then calling bpy.ops.mesh.delete()

but nothing happens.

Any suggestions on how to delete a vert and also any better ideas for removing internal geometry?



I don’t know much about python, but I think it shoud be bpy.ops.mesh.delete(selection), or something else.
Just guessing, but I hope it helps.

If it doesn’t work, you should go into edit mode yourself, select some vertices, hit x and hover over the option you want. Look at the python tooltip, there stands the operation you’re looking for.


Thanks patmo, that seems to solve my problem. Doing this manually would take forever. I have 10,000 files!