Error creating solids from multiple corridors using Corridor.SolidsByRange 2025.1

Good evening, everyone,

I have created a script to extract solids from multiple corridors simultaneously and assign the name of the shapes as the layer names for these solids. However, I’ve encountered issues with the extraction; in some cases, the solids are incomplete. I’ve tested it in several DWG files, and it works well in some cases but not in others. Could you help me review where I might be going wrong?

In the images above, I have the assemblies used for the corridors, and below are the incomplete solids after running the script.

PRUEBA_CREA_SOLIDOS.dwg (1.8 MB)
CREA_SOLIDOS_CORREDOR_v2.dyn (26.1 KB)
Drawing1.dwg (4.3 MB)
PRUEBA_CREA_SOLIDOS - 2.dwg (2.0 MB)

https://www.flexclip.com/es/share/7320456fabe5f46dda33f94341b51e6b8d71c75.html

Thank you very much in advance.