【MSCE VBA】 沿B样条曲线阵列共享单元时,设置横向偏移

沿B样条曲线放置共享单元时,想要设置横向偏移,应该如何设置变换矩阵呢,试了好多都是按照全局坐标系去偏移的,并没有沿着曲线法线方向偏移;我已经通过EvaluatePointTangent方法得到了曲线在某点处的切矢量,但是不知道如何与Transform3d结合使用,得到法向量并设置偏移值。

For i = 0 To 10
    oBCurve.EvaluatePointTangent tangent, u(i)
    matrix = Matrix3dFromRotationBetweenVectors(Point3dFromXYZ(0, 1, 0), tangent)
    Set oCell = CreateSharedCellElement2(CellName, pts(i), Point3dFromXYZ(1, 1, 1), True, matrix)
    '  创建用于移动元素的变换
    trnsMove = Transform3dFromXYZ(-5, 0, 0)
    oCell.Transform trnsMove
                    
    ActiveModelReference.AddElement oCell
Next