-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
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)
Metadata
Metadata
Assignees
Labels
No labels