I am trying to prepare a surface mesh for use in a simulation. I need a surface with open ends that are perpendicular to the centerlines of the vessels.
The issue here is that there is no centerline associated with the aneurysm so the logic does not recognize it as a separate region and hence exclude it from the clipping. It may work if you are able to add a centerline to the tip of the aneurysm. Otherwise I think you will have to clip it above the aneurysm.
The reason for computing the surface normals is that the normals on the extrusions were in the opposite direction to those on the artery and aneurysm wall which causes problems when trying to create a volume mesh.
The VMTK extension for Slicer (https://github.com/vmtk/SlicerExtension-VMTK) has several examples of using VMTK features from python. For example, https://github.com/vmtk/SlicerExtension-VMTK/blob/master/ExtractCenterline/ExtractCenterline.py shows how to extract a centerline using VMTK and is a python module. It will take a little work to unpack the code there, but it and the other modules of the VMTK Slicer extension are definitely working examples you could start from. Perhaps there are other more straightforward resources that others could point you to.