fixed a bug where automerge would cause the mesh to collapse

reported by Ian Lloyd Costa Dela Cruz
support for single sided and flat extractions
support for offsets