Finish wall on sides of window openings and finish floor under door, while making finish walls and floor from room

I created a script that creates finish walls and finish floors in a building by taking input as rooms. The code is big and will be confusing to upload. If it felt necessary i ll upload then. But here is what code deos:

Taking rooms, its boundary curves , offseting a little inward and making it as base for finish walls and so as for room. Then i join the finish walls with original walls so that can have opening for windows and doors as seen in attached pictures.
Room in Revit is from wall face to another wall face and that why create finish walls there and i want to create finish wall on sides of window openings too, as seen in a picture.

Also, on partition wall between two rooms is door and under door is no floor made obviously as it comes under wall and do not come in room boundaries. I want my finish floor to be there too.

I could upload the script … it would be very helpful