How to model curved grid with triangle windows and keep it smooth? I tried to model everything and then snap (project) it to main mesh, but it causes a lot of wird shading at corners. The mesh's on pic.
The shading issue is coming from the subdivision modifier trying to average out all those cuts into the surface. The explanation for how to resolve that issue is a bit lengthy and took me quite a while so please consider upvoting this solution if it helps.
Please note, I've assumed you're trying to build these windows and attach them to the outside of the curved surface. If you intend to use the Boolean modifier to cut these windows into the curved surface, there's another world of hurt coming.
Also, the final model isn't 100% perfect, there are still some minor shading defections which could still be cleaned up.
I've made this by modelling a window as its own, separate object and using an array and mirror modifier to duplicate it.
The window itself is rather simple. I took a plane and inset it (the shortcut key is I. From there, I cut out the center triangles and applied a Solidify modifier. Since I intended to use the Simple Deform modifier to bend the window, I needed there to be sufficient geometry for the bend to work properly. To add that geometry, I used the Subdivision Surface modifier.
To maintain the shape of the window cutout while using subsurf, I added a few support loops and a slight bevel modifier. To keep the face shading from getting messy, I marked the edges of the outer/inner perimeter of the window frame as sharp (you can do this in Edit mode by selecting the edges, pressing Ctrl+E and selecting Mark Sharp. This will cause the edges to appear blue by default in Editing mode, but is not shown in my wireframe screenshot).
As mentioned earlier, I used the Bevel, Subdivision Surface, and Simple Deform modifiers to bend the window shown below.
In the process of replicating the window, I need to move the origin which screwed up the Simple Deform modifier. I would thus need to apply the modifiers, but before doing so< I saved the original window without the modifiers applied and hid it. Backing up your models before applying destructive editing can save your life if it turns out there was a problem with the model before applying those modifiers.
Noting that your model has a forward-facing window than a horizontally flipped window, I took the object and added a Mirror modifier with an object offset before applying the Simple Deform modifier. Doing it after the fact would mess up the mirror line. Admittedly, this could have also been done by hiding all the modifiers, duplicating it and rotating the duplicate 180 degrees.
At this point, I applied all the modifiers. To duplicate the object and rotate it around the curved surface, in my case an open cylinder, I used an Array modifier with just an object offset (make sure you disable the relative offset). The object, in this case, add an Empty Axis at the origin and use that as the target object.
When you do that, you'll find that all the array modifier isn't working yet. Move the 3D cursor back to the origin (Shift+S - Cursor to World Origin), select the window, right-click and Set Origin > Origin to 3D Cursor.
Now, select the empty axis and rotate it on the Z-axis only, and each additional window from the Array modifier will be rotated that angle around the origin. Rotate it so that the windows line up just right.
Finally, just to keep things neat, parent to the empty axis to the window so that you can move the windows around without messing up the array modifier then hide the empty axis.
I've included the blend file below.