Résumé : Computational homogenization has been used extensively over the past two decades for the analysis of masonry structures based on various averaging schemes (periodic homogenization, transformation field analysis,..), focusing on regular periodic masonry. Irregular masonry has subsequently also been scrutinized using multiscale approaches. In such efforts, an efficient strategy is required for the generation and meshing of realistic representative volume elements (RVEs) geometries. In complement to existing generation approaches, the present contribution deals with a level set-based methodology to generate irregular masonry RVE geometries. Starting from inclusion-based RVEs, combinations of distance fields are used to produce typical geometries of irregular masonry RVEs. The resulting geometries are described by implicit functions. Such implicit geometry descriptions are next exploited in an automated procedure for producing high quality conformal 2D finite element meshes on implicit geometries. This automated RVE generation and discretization procedure is then illustrated by producing failure envelopes for irregular masonry, using an implicit gradient damage formulation. The interest of recently developed gradient models with decreasing interaction length parameters is also illustrated on a specific example.