I got the issue on number of groups in ExtrudeGeometry

private generateCurvedCube2(): void {
const shape = new THREE.Shape();
shape.moveTo(0,0);
shape.lineTo(0,3);
shape.absarc(1.5, 1.5, 1.65, 26.2, 5.2, true);
shape.lineTo(0,0);
const extrudeSetting = {
depth: 3,
bevelEnabled: false,
bevelSegments: 0,
steps: 1,
bevelSize: 0,
bevelThickness: 0,
}
const geometry = new THREE.ExtrudeGeometry(shape, extrudeSetting);
console.log(“geometry group”, geometry.groups);

const materials = this.createShapeLabelMaterials(this.availableShapes.CurvedCube2, this.selectedColour);
this.curvedCube2 = new THREE.Mesh(geometry, materials);
this.scene.add(this.curvedCube2);
this.outlineService.addOutline(this.curvedCube2, this.availableShapes.CurvedCube2);

}

This is my code for creating a curved cube with labels on each face. However, I’m currently getting only 2 groups, which is why I see only 2 labels. For example, the ‘Front’ label appears on the opposite side, and the ‘Back’ label appears on the other side. I have 5 faces in total, including one curved face, but the labels for the other faces are not showing up. How can I fix this issue?
For other geometry it is coming properly but for extrude geomtery it is not coming properly.

That’s how extrude geometry is designed to work. One group is for the primary face, and another group is for all extruded faces.

You need another way for positioning labels. If you know you have 5 labels, you can just define them at the correct positions, taking into account the size of your object.



I want to have label like this. For cube it is coming properly but the another shape, label is not coming properly because of tht group, there is repetition label. The opposite faces of label front is also coming front and rest of the faces are coming as label back. Can i have the label in this shape like i did in cube using extrudeGeometry.