Create/Modify a mesh from geometry nodes

I want to create a procedural archway made of bricks using only geometry node. I've done this so far :

What I've done is basically creating an empty mesh and instancing a primitive cube over a line (for the pillars) and over a bezier curve (for the arch)

The problem is this one : The trick of instancing a scaled cube works fine for the pillar but for the arch I need a custom mesh as the top part is always wider than the bottom one and I can't do that with the basic transform node. I want the result to look like this :

I thought about two ways to implement this, I can either use a primitive mesh and access the bottom vertices in geometry node, but I don't know how to do that or I can create a mesh from scratch with eight points but I don't really know how to do that either. Is there a way to do that in geometry node only, or am I requesting to much ?

It might give you more flexibility to deform an array of blocks along a curve, as here, using the X_Array and X_Curve_Deform groups, which are described in this answer. Parameters have been provided to make a 'Block Arch' kit:

.. with these kinds of options:

• Looks like you can now answer 90% of all GN questions with your 2 nodegroups…👍🏻🤗 Dec 12, 2021 at 0:31
• @Chris It's almost embarrassing. The deform is a very handy group. You can use it to Twist, Bend, Taper, Screw.... Maybe you've come across Tom Waits:'Step Right Up' ? :) Dec 12, 2021 at 8:20
• No, didn't know that ;) Dec 12, 2021 at 8:53
• Yes this is a great, I'll definitely use this although since I started up this project to learn how to use GN I'll try to come up with my own implementation, it will make me learn better that way
– meh
Dec 13, 2021 at 13:09

Ok I figured it out, I found a way, turns out the Transfer Attribute node was the solution, I created a primitive cube and got access to the vertices with the Math node and the Boolean Node, the solution is far from perfect and need adjustment and simplification but here it is :

Here's an attempt at simplifying the setup in meh's solution. Create a Selection mask on the primitive cube's bottom vertices, and scale in their Y position.