You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,I want to ask a question.
When I stroke the mesh obtained after the operation, it shows the lines I don't want, how should I combine csg to solve this problem.
const material = new MeshBasicMaterial( {color: 0x00ff00} );
const box = new Mesh(new BoxBufferGeometry(1, 1, 0.1), material);
box.position.set(0, 0, 0);
const hole = new Mesh(new BoxBufferGeometry(0.2, 0.2, 1), material);
hole.position.set(0.1, 0.1, 0);
const csg = new CSG();
csg.subtract([box, hole]);
const resultMesh = csg.toMesh();
const edges = new EdgesGeometry(resultMesh.geometry, 45);
const wideEdges = new LineSegmentsGeometry().fromEdgesGeometry(edges);
const mt = new LineMaterial({
color: 0xff0000,
linewidth: 2
});
mt.resolution.set(window.innerWidth, window.innerHeight);
const line = new LineSegments2(wideEdges, mt);
scene.add(line)
The text was updated successfully, but these errors were encountered:
hi,I want to ask a question.
When I stroke the mesh obtained after the operation, it shows the lines I don't want, how should I combine csg to solve this problem.
The text was updated successfully, but these errors were encountered: