daign / gaps.js

Algorithm for computing a useful set of measure lines between rectangles
MIT License
6 stars 0 forks source link

[Question] reusing this library to measure size of clipping caps on Threejs #1

Closed PlopTheReal closed 2 years ago

PlopTheReal commented 2 years ago

Hey, I was wondering if that library could be reused or transformed in some way to compute the size of Threejs geometries, particularly caps on clipped meshes. This demo shows LineSegments created on the caps : https://gkjohnson.github.io/three-mesh-bvh/example/bundle/clippedEdges.html I was wondering if we could measure the geometries created then. For instance measuring automatically the distances between the two dots here: image

But also the other distances within the geomtry.

daign commented 2 years ago

You would have to make sure that all edges are orthogonal, because the algorithm here was only created for rectangles.