Finnish walls corners not joined

Hello;
i have a script that creates wall and floor finishes and then another code that creates wall finishes on window reveals. Both group of codes are in same dyn file and when i run , both are executed.
When i save both these group of codes separately, first run the code for window reveal walls and then run the other code in other dyn file . it is seen as in picture and wall corners are not joined.

This is one problem. Now when i run codes together in one file, or first run the code for normal finish walls and then window reveal walls, the window reveal walls are somehow shortened as shown.

For solution, I can save these codes separately and run first the code for window reveal walls and then the other but the first problem remain there. That means corners of walls are not joined.

I already joined Normal Finish walls (Not window reveal finish walls) to the concrete walls, so that to get openings for doors and windows that are there in concrete walls. So these finish walls are already joined with these concrete walls and may be thats why it cannot join again with other walls (Window reveal finish walls).

PS. Whenever i run script for window reveal finish walls , i came across Warning and error window stating “Elements cannot joined/connected” so i click on “let elements unjoined”.

Try extending the start line of the window reveals by the thickness of the material so it projects long. Should clean up the join.

but i have same material and thickness for both walls. Can you explain a lil more please. I think i didnt understand

Well, if the corner condition is off by the thickness of the wall, extending the return wall by that thickness will provide a flush corner. After that it’s just a matter of joining the two walls.

Actually i cant change material becasue material is same for both. Material information come from room and these both walls are for same room. Also i dont wann do it manually beacsue i wanna do everything in dynamo so that when i run script , these finish walls are created and everything looks fine.

No need to change the material or do anything manually. Extend the curve by the thickness of the wall.

https://dictionary.dynamobim.com/#/Geometry/Curve/Action/Extend