ExtrudeGeometry has extra faces and not closed like the curve

Hello!

In this screenshot, I am having two issues with this extruded geometry.

  1. There are some extra geometries that I did not intend to be drawn upon creation of the THREE.Shape.

Here is the shape I was expecting to be drawn:

And here is the code that I wrote to draw the shape:

    const shape = new THREE.Shape();
    // left half
    shape.moveTo(-.123, -.0135);
    shape.lineTo(-.123, .0135)
    shape.lineTo(-.115, .0135)
    shape.lineTo(-.115, .025)
    shape.lineTo(-.135, .025)
    shape.lineTo(-.135, -.025)
    shape.lineTo(-.115, -.025)
    shape.lineTo(-.115, -.0135)
    shape.lineTo(-.123, -.0135)

    // right half
    shape.moveTo(.123, -.0135);
    shape.lineTo(.123, .0135)
    shape.lineTo(.115, .0135)
    shape.lineTo(.115, .025)
    shape.lineTo(.135, .025)
    shape.lineTo(.135, -.025)
    shape.lineTo(.115, -.025)
    shape.lineTo(.115, -.0135)
    shape.lineTo(.123, -.0135)

    // props.line is the CatmullRomCurve3
    const geometry = new THREE.ExtrudeGeometry( shape, {steps: 300, 
    bevelEnabled: false, extrudePath: props.line})
  1. One end of the extruded geometry does not join together with the other end, despite the curve being closed.
// The CatmullRomCurve3 data
{
    "metadata": {
        "version": 4.6,
        "type": "Curve",
        "generator": "Curve.toJSON"
    },
    "arcLengthDivisions": 200,
    "type": "CatmullRomCurve3",
    "points": [
        [
            1.9841800928115845,
            0.5334839820861816,
            1.0582462549209595
        ],
        [
            1.6753532886505127,
            0.5593564510345459,
            1.0589643716812134
        ],
        [
            1.4491666555404663,
            0.697923481464386,
            1.0587162971496582
        ],
        [
            1.3111166954040527,
            0.9186244010925293,
            1.0582331418991089
        ],
        [
            1.2667001485824585,
            1.1908986568450928,
            1.0582462549209595
        ],
        [
            1.1812900304794312,
            1.5252690315246582,
            1.0673372745513916
        ],
        [
            0.9781750440597534,
            1.7057092189788818,
            1.0242031812667847
        ],
        [
            0.7563002109527588,
            1.8089666366577148,
            0.8255313634872437
        ],
        [
            0.6146100759506226,
            1.9117887020111084,
            0.368009090423584
        ],
        [
            0.5726678371429443,
            1.9956049919128418,
            0.18548542261123657
        ],
        [
            0.4700773060321808,
            2.130831718444824,
            0.022279858589172363
        ],
        [
            0.2809561789035797,
            2.2566030025482178,
            -0.09508982300758362
        ],
        [
            -0.020577847957611084,
            2.3120527267456055,
            -0.14010587334632874
        ],
        [
            -0.3296802341938019,
            2.281888723373413,
            -0.09030210971832275
        ],
        [
            -0.5734552145004272,
            2.1982598304748535,
            0.063102126121521
        ],
        [
            -0.7143107652664185,
            2.0714614391326904,
            0.32609623670578003
        ],
        [
            -0.714654803276062,
            1.9117887020111084,
            0.704669713973999
        ],
        [
            -0.6603711843490601,
            1.6230847835540771,
            1.0399469137191772
        ],
        [
            -0.7036638259887695,
            1.2259819507598877,
            1.1522256135940552
        ],
        [
            -0.8844012022018433,
            0.8598360419273376,
            1.1333403587341309
        ],
        [
            -1.2424516677856445,
            0.6640021800994873,
            1.07512629032135
        ],
        [
            -1.5709213018417358,
            0.710712730884552,
            0.9744400978088379
        ],
        [
            -1.7952327728271484,
            0.9225581288337708,
            0.7847572565078735
        ],
        [
            -1.918294906616211,
            1.2473043203353882,
            0.5570305585861206
        ],
        [
            -1.9430160522460938,
            1.632717251777649,
            0.34221315383911133
        ],
        [
            -1.9179303646087646,
            1.7906527519226074,
            0.2413727045059204
        ],
        [
            -1.8539397716522217,
            1.9498507976531982,
            0.08201402425765991
        ],
        [
            -1.7422277927398682,
            2.074662685394287,
            -0.1307205855846405
        ],
        [
            -1.5739785432815552,
            2.12943959236145,
            -0.39168858528137207
        ],
        [
            -1.4084653854370117,
            2.101039409637451,
            -0.6227225065231323
        ],
        [
            -1.2622238397598267,
            2.018277645111084,
            -0.7576898336410522
        ],
        [
            -1.062330961227417,
            1.9084441661834717,
            -0.8094995021820068
        ],
        [
            -0.7358642816543579,
            1.7988282442092896,
            -0.791060745716095
        ],
        [
            -0.3141660988330841,
            1.636258602142334,
            -0.7310407757759094
        ],
        [
            -0.11715522408485413,
            1.4371027946472168,
            -0.6912686824798584
        ],
        [
            0.0005134642124176025,
            1.210427165031433,
            -0.674283504486084
        ],
        [
            0.18418511748313904,
            0.9652981162071228,
            -0.6826245188713074
        ],
        [
            0.541795551776886,
            0.7710164189338684,
            -0.713899552822113
        ],
        [
            0.8791866898536682,
            0.8175182938575745,
            -0.7456703782081604
        ],
        [
            1.1301640272140503,
            1.0657851696014404,
            -0.7703192234039307
        ],
        [
            1.2285329103469849,
            1.4767986536026,
            -0.7802283763885498
        ],
        [
            1.270639419555664,
            1.7391345500946045,
            -0.7550599575042725
        ],
        [
            1.4038491249084473,
            1.9311418533325195,
            -0.6573927402496338
        ],
        [
            1.638497233390808,
            2.011077642440796,
            -0.45398378372192383
        ],
        [
            1.984919548034668,
            1.9371986389160156,
            -0.11159008741378784
        ],
        [
            2.377054452896118,
            1.6190400123596191,
            0.35915905237197876
        ],
        [
            2.5386343002319336,
            1.1714740991592407,
            0.7284424304962158
        ],
        [
            2.4231719970703125,
            0.7558417916297913,
            0.9701688289642334
        ]
    ],
    "closed": true,
    "curveType": "centripetal",
    "tension": 0.5
}

I am unsure of how to fix these two things. If anyone knows what went wrong, please let me know.

Thank you!

I found out that it is possible to include an array of shapes when extruding geometry.

Hello, I cannot seem to figure out how to close the extruded geometry, despite the catmullromcurve indicating it’s closed.

Can anyone please help me?

Thank you!