From 3D geometry to 2d Polygon

Hi!
I have this geometry/mesh and I’m trying to extract the points to create the shape in 2D, but I can’t really figure out how I can do it or if it possible, please see the screenshot.
Ideally I want to save the points in the correct order to a database so that we later can draw polygons out of the points
Looked at the convex hull three.js docs
But I couldn’t find any examples of it in use
Sorry I’m quite new to three.js, so any help (preferably with a coding example) is greatly appreciated :slightly_smiling_face: And I hope my question is clear!
Wishing you all a wonderful day!

Asked the same question in the Discord server, will close the question here if I get a reply there and vice versa.


BufferGeometry.json (49.0 KB)

Sometimes a reply is not sufficient to close a question.

Anyway, I don’t have code, but you could try this approach:

  • make the model 2D – by applying mesh transformations into the geometry and then clearing one of the coordinates of each vertex (e.g. z=0)
  • extract the individual triangles (they should all be co-planar) and convert them to shapes
  • combine all shapes into one shape with clipper2-js

Study the source code for SVGRenderer, I seem to recall it does something like what you want to do