Hi.
I can’t close this ribon posints at the end there is a gap, I can’t tell why, I tried Ai as well it makes it worse…
// Ribbon mesh creation
let number = 1000;
let frenetFrames = this.curve.computeFrenetFrames(number, true);
let spacedPoints = this.curve.getSpacedPoints(number);
let dimensions = [-0.1, 0.1];
let finalPoints = []; // Using finalPoints instead of vertices
// Iterate over each dimension to create the ribbon effect
dimensions.forEach((d) => {
let binormalShift = new THREE.Vector3();
// Loop through all the points and create finalPoints
for (let i = 0; i < number; i++) {
const point = spacedPoints[i].clone();
binormalShift.copy(frenetFrames.binormals[i]).multiplyScalar(d);
finalPoints.push(point.add(binormalShift));
}
});
// Close the ribbon by connecting the first and last points
for (let d = 0; d < dimensions.length; d++) {
const point = spacedPoints[0].clone();
const binormalShift = frenetFrames.binormals[0].clone().multiplyScalar(dimensions[d]);
finalPoints.push(point.add(binormalShift));
}