We classify possible boundary conditions of a 6d Dirac fermion Ψ on a rectangle under the requirement that the 4d Lorentz structure is maintained, and derive the profiles and spectrum of the zero modes and nonzero KK modes under the two specific boundary conditions, (i) 4d-chirality positive components being zero at the boundaries and (ii) internal chirality positive components being zero at the boundaries. In the case of (i), twofold degenerated chiral zero modes appear which are localized towards specific directions of the rectangle pointed by an angle parameter θ. This leads to an implication for a new direction of pursuing the origin of three generations in the matter fields of the standard model, even though triple-degenerated zero modes are not realized in the six dimensions. When such 6d fermions couple with a 6d scalar with a vacuum expectation value, θ contributes to a mass matrix of zero-mode fermions consisting of Yukawa interactions. The emergence of the angle parameter θ originates from a rotational symmetry in the degenerated chiral zero modes on the rectangle extra dimensions since they do not feel the boundaries. In the case of (ii), this rotational symmetry is promoted to the two-dimensional conformal symmetry though no chiral massless zero mode appears. We also discuss the correspondence between our model on a rectangle and orbifold models in some details. © 2017 The Author(s)