I'm still learning Blender, but I'm most probably experiencing extra problems because certain things under normal circumstances would most probably be acceptable.
My problem at the moment is that I'm importing one of the doors, because I want to make a straight-forward simple door without any bevels, etc. I just want a flat door for the inside doors. So yes, this is easy enough. I use box select, highlight all the vertices I want deleted, delete them. I select the 4 outer vertices, create a face and the convert the quad into two triangles. Everything looks fine until I export. Then I find in the file what I can only describe as 'orphan faces' which no assignment or weight.
Is there a way to find these 'orphan faces' before I export?
With "file" you mean the s3ascg, after you export with your script? Or where are you finding those orphan faces?
I sometimes end up with "stray" faces/edges/vertices when I have "occlude background geometry" turned on, so when there's a duplicate edge/vertex I only select+delete the one in the foreground .. perhaps that's what happened? I'm not sure if I understand your problem correctly, but to find stray orphans try "select linked" and then "select inverse", perhaps?
Apologies. Yes, by file I mean the .s3ascg. I played around after posting the thread, because when this happens in the export and you try to import the export, it errors because of these strays. My last changes to the helps a bit better since i can see where the errors lie.
In any case, I went into the .s3ascg files and deleted the strays by hand and could then imported the export. I will try your suggestion, because I would like to be able to solve this both for myself from a meshing perspective, but also for the scripts so it'll raise an error in Blender rather in the the S3ObjTool.
More fiddling and deleting made me realise the problem wasn't stray faces, but stray vertices/edges as in I deleted one vertices of a faces which in turn deleted two edges, but the third edge still existed. Deleting the second vertex seems to have solved the problem as I was only reusing the third vertex. I still need to check for this in the script though