Hidden line segment removal for meshes [pen plotter rendering]

Hello! I’m trying to modify the SVG renderer to build a mesh wireframe renderer for a specific use case: a physical pen plotting machine.

The core problem is that a pen plotting machine can only draw lines, it cannot paint faces and therefore cannot paint faces over lines to occlude them.

In order to simulate occlusion of mesh lines by mesh faces, I need to determine when a line element is behind a face and delete the occluded part of the line (creating potentially new smaller lines).

My specific question is, given a THREE.RenderableFace and a THREE.RenderableLine, how can I tell where they intersect in screen coordinates so I can delete part of the line.

General commentary on how one might approach the high level problem is welcome, the SVG renderer seems closest to what I want so I’m using that as a starting point.

Where did you find THREE.RenderableFace?

1 Like

THREE.RenderableLine and THREE.RenderableFace are defined in THREE.Projector which is used by THREE.SVGRenderer.

3 Likes