BIM software | measurment snapping to corners and edges

Hi guys,
I have recently created a BIM software on the web to load .ifc files and data and walkthrough in the space and choose meshes and I added length, area, and angle measurements by : AngleMeasurement | That Open Docs

The owner of ‘https://thatopen.com/
says that I can use three.js features in it too.
I need to create something like Autodesk Viewer:
https://viewer.autodesk.com/

When I use ‘OBC’ for measurements, it is ok. But I need my software to detect corners and edges.Snapping mouse to corners and edges of meshes.
How Can I do that in three.js?
We need something like a magnet to snap to corners,…

Corners are just vertices. You should be able to just use the raycaster - get the first intersected face, then check whichever vertex of the said face is closest to intersection.point :eyes: (same with edges, but for edges you instead take average point of each vertex pair in the face.)

1 Like

Do you any link can help me?