How can I generate 3d wall from 2d lines in three.js?

I am going to build 3d wall from 2d lines given as following.
I tried to create shape geometry from the lines and extruded it using Extrude geometry.
This causes a gap at the edge.
How can I get a shape that overcome this issue?
I expect something like this one.
Maybe it is one kind of polygon offset.
I have already worked around polygon offset, but I hope threejs has easier way for this problem.

Have a look at this forum topic: ProfiledContourGeometry

@prisoner849, thanks for quick reply.
I have already checked it but not sure it is helpful.
Does it work for the case when a vertex has more than 3 lines?

No, it doesn’t, but feel free to modify it for your needs.

Maybe, thanks anyway.

But I think, as you need to build walls like you showed, that topic is inappropriate for you in general. You need a different approach.

I think it’s the easier and fastest way, but do you have any other suggestion about it?