Issue: Inconsistent Conversion of Curves to Room Boundaries

Hello, I’m trying to adjust the room boundaries that are set within the curtain panels, which are by default set in the mid axis of the curtain panels, and the goal is to adjust it to the outer and inner side of the curtain panels.

So I already added modellines within my curtain panels and our idea was to set it as room boundaries. Dynamo already actually retrieved my modellines, however after I tried to set it as room boundaries, it resulted in some inconsistencies

image

In some rooms, it actually did the job:


image

Here is my script below:

Does anybody know the cause of this issue? Or how does the behaviour of room boundaries work?