The code I wrote is a function that creates a rectangle connecting two points
I created two faces from a point and a cylinder connecting them, got their IDs and used the rs.BooleanUnion function, but the return value(solidID) was None!

def mkLong(a,b): #a,b=id

   

    vectorAB = rs.VectorCreate(a,b)
   
    lengthAB = rs.VectorLength(vectorAB)
   
    width = 50  
    depth = 50  
    height = lengthAB  
   
    aa = rs.PointCoordinates(a)
    bb = rs.PointCoordinates(b)
    abottom_points = [
        aa,
        (aa[0] + width, aa[1], aa[2]),
        (aa[0] + width, aa[1] + depth, aa[2]),
        (aa[0], aa[1] + depth, aa[2]),
        aa
    ]
    bbottom_points = [
        bb,
        (bb[0] + width, bb[1], bb[2]),
        (bb[0] + width, bb[1] + depth, bb[2]),
        (bb[0], bb[1] + depth, bb[2]),
        bb
    ]
    Q=[abottom_points[0],abottom_points[1],abottom_points[2],abottom_points[3]]
    L=[bbottom_points[0],bbottom_points[1],bbottom_points[2],bbottom_points[3]]

    bottom_polyline = rs.AddPolyline(abottom_points)
   
    extrusion_path = rs.AddLine(a,b)
    asurfaceID=rs.AddSrfPt(Q)
   
    bsurfaceID=rs.AddSrfPt(L)
    solidID = rs.ExtrudeCurve(bottom_polyline, extrusion_path)
    group=[solidID,asurfaceID,bsurfaceID]
    rs.DeleteObjects([extrusion_path,bottom_polyline,a,b])

    solidID = rs.BooleanUnion(group,True)
   
    return solidID

New contributor

Kii is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.