Use model.component(<ctag>).geom(<tag>).create(<ftag>,"MergeEdges") to merge edges adjacent to face.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("keepedg") to select the edges to keep. The default selection is empty.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("removeedg") to select the edges to remove. The default selection is empty.