removeAllVerticesFromFace2 method

VertexNode? removeAllVerticesFromFace2(
  1. Face2 face
)

Implementation

VertexNode? removeAllVerticesFromFace2(Face2 face) {
  if (face.outside != null) {
    // reference to the first and last vertex of this face

    final start = face.outside!;
    var end = face.outside!;

    while (end.next != null && end.next!.face == face) {
      end = end.next!;
    }

    assigned.removeSubList(start, end);

    // fix references

    start.prev = end.next = null;
    face.outside = null;

    return start;
  }
  return null;
}