1. A method, comprising: sampling a plurality of points and a plurality of segments of a curve on a surface of a three-dimensional model; storing each sampled point as a respective vertex of a plurality of vertices and each sampled segment as a respective half-edge in a curve network of the model surface; upon determining that a first half-edge and a second half-edge connect two of the plurality of vertices, generating a first halfchain connecting the first half-edge and the second half-edge, wherein each connected vertex comprises either a corner or an open endpoint; and upon determining that three consecutive halfchains form a loop comprising at least three corners, generating a first patch for a space enclosed by the loop, wherein the first patch is represented as a quad mesh with a respective set of vertices, faces, and half-edges.