How to define boundary conditions on an irregular geometry?

For more complicated geometries , its common to use external software, like gmsh/pygmsh. With these softwares, you can set physical markers for cells snd facets, Which can be loaded into dolfin as described here: