How can I convert a BoxGeometry to a cubic curve?

Hi every body could some one solve this:


here is my code :thinking:

      var curveXZ = new THREE.CatmullRomCurve3([
new THREE.Vector3(-38.8449927886845,1.8669828327677678,17.507457522774423),
new THREE.Vector3(-6.157122481236054,1.1931843749128959,13.271761949456877),
new THREE.Vector3(18.562482582405302, -0.5366276788296602, -2.897052748134101),
new THREE.Vector3(35.262388700051574, 1.2061116327635304, 2.101495186392203),
]);
    var Cubic = curveXZ.getPoints(100);
  const kerbgeo=new THREE.BoxGeometry(100,1,1,100,1,1);
const Kerbmat=new THREE.MeshBasicMaterial({color:'red',wireframe:true});
const KerbMesh=new THREE.Mesh(kerbgeo,Kerbmat);
scene.add(KerbMesh);
for (var j = 0; j <4; j++) {
for (var i = 0; i <101; i++) {
let kerbZ=kerbgeo.vertices[i+101*j].z > 0 ? Cubic[i].z : Cubic[i].z+1;
kerbgeo.vertices[i+101*j].x=Cubic[i].x;
kerbgeo.vertices[i+101*j].z=kerbZ;
}}