Convert GUID into BREPS in ghpython with Grasshopper.Kernel.GH_Convert


I am trying to convert some surfaces in the “Walls”-list in my project. I´d like to use ghpythonlib.components (e.g., DeconstructBrep) on the geometry I got with rhinoscriptsyntax.

I try to convert GUIDs into Breps with Grasshopper.Kernel.GH_Convert.ToBrep and get always invalid Breps as result.

Thanks a lot if someone can help me with that one.

Below is the ghpython-code and the .gh file: (70.2 KB)

import rhinoscriptsyntax as rs
from ghpythonlib import components as ghcomp
from Grasshopper import Kernel as K
import Rhino
import Grasshopper

Line_like_Elements = []
Surface_Elements = []

for Element in Element_list:
    if rs.IsCurve(Element):
    elif rs.IsBrep(Element):

Slabs = []
Walls = []

for Surface_Element in Surface_Elements:
    Vertices = []
    Vertices = rs.SurfacePoints(Surface_Element)
    Zcoor = []
    for i in Vertices:
    if Zcoor[0] == Zcoor[1] == Zcoor[2] == Zcoor[3]:

Converted_Walls = []
for Wall in Walls:
    Converted_Wall = K.GH_Convert.ToBrep(Wall,Rhino.Geometry.Brep(),K.GH_Conversion(2))
    Converted_Walls.append(Converted_Wall[1]) # Gives invalid Breps :(

for Converted_Wall in Converted_Walls:
    Deconstructed = ghcomp.DeconstructBrep(Converted_Wall)
    Deconstructed_Vertices = Deconstructed[2] # Gives *None* as output