Bake to Layer error + Curve.PointAt not working in 'Brep.CreateFromLoft'

I am getting some odd behavior (possibly on my end) from two aspects of this script. First, the rg.Curve.PointAt method should be returning two Point3d objects which I am using in the 'Brep.CreateFromLoft' method. (This working just fine in Rhino Python btw). Furthermore, currently, only the ‘Point3d.UnSet’ option is working in this function.

Currently only one point is displayed in the GH preview and the print method is not showing that they are Point3d objects.

Second, there must be an error in my logic when baking to a layer as my code will only bake to the default layer.

What am I missing? Thank you.

import Rhino.Geometry as rg
import Rhino.DocObjects as rd
import scriptcontext as sc
import Rhino as rh

no_pt = rg.Point3d.Unset
crv_lst = []
pts = []

for crv in crvs:
    crv.Domain = rg.Interval(0,1)
    ptOnCrv = rg.Curve.PointAt(crv, 0)

    print ptOnCrv
    #pointAt is not returning Point3D objects in GH    

loft = rg.Brep.CreateFromLoft(crv_lst, no_pt, no_pt, 0, False)
loft = loft[0]

sc.doc = rh.RhinoDoc.ActiveDoc

if bake:
    atts = rd.ObjectAttributes()
    #create layer object
    layer = rd.Layer() 
    layer.Name = 'foo'
    layerInd = sc.doc.Layers.Add(layer)
    atts.LayerIndex = layerInd
    print layer.Name
    #bake the object
    sc.doc.Objects.Add(loft, atts)

out = loft
pts = ptOnCrv

Hi @brobes05,

Can you post your .gh file, so we can run your solution here? Include any required .3dm file too (or internalize our geometry - thanks),

– Dale