Extruded arc shape geometry not closing

Can someone please tell me why the geometry isn’t closing properly? I just spent over an hour on what was supposed to be “aesthetic”. My brain has officially stopped functioning. (I’m out, touching some asphalt)

I’ve isolated the extrudeDisc function in this jsFiddle.

Thanks in advance. (Yes, Pavel, I know… but couldn’t resist! :sweat_smile:)

UV islands prevent merging of vertices.

mesh.geometry.deleteAttribute( “uv” )

mergeVertices( … )

(Just spitballin here…)

1 Like

Usually bevels make problems. If bevelEnabled is false, or if bevelSize is 0 there should be no crack in the shape.

If you want bevel, try reducing the circle size by some small value and not closing the path:

    const shape = new THREE.Shape();
    shape.moveTo(outerRadius, 0);
    shape.absarc(0, 0, outerRadius, 0, Math.PI * 2-0.001, false);
    //shape.closePath()

    const holePath = new THREE.Path();
    holePath.absarc(0, 0, innerRadius, 0, Math.PI * 2-0.001, !true);
    //holePath.closePath(); 
    shape.holes.push(holePath);

(Yeah, you know the link)

4 Likes

Is the answer if you already have a full continuum of circular points

1 Like

That did the trick! I tried +epsilon, but it gave me a messed-up result. The fresh air was good too :blush:

Thanks, everyone!

2 Likes

A bit late to the party, as usual :slight_smile:
Bumped into the same issue, building a gear, with gear’s inner hole.

The Gear itself:

The solution was exaclty what @PavelBoytchev said - not to close the path.
In my case, I simply built a set of points in circular formation, missing the step, where angle is exactly Math.PI * 2.

4 Likes