0

i have a shirt displayed as a 3D model in the file format „obj“ or „fbx“ . I would like to calculate the object width at a specific height. It would be best, when i have the coordinates from all points at a specific height. Can anyone tell me, a python or javascript framework for that or a suggestion, how i can calculate this manually.

enter image description here

Maxi Dietz
  • 31
  • 2
  • As you have `three.js` in your tags, have a look at these SO answers: https://stackoverflow.com/a/42353447/4045502 and https://stackoverflow.com/a/46811485/4045502. Maybe they will be useful. – prisoner849 Jul 06 '20 at 14:27

1 Answers1

0

If you're using the OBJ format, then you have no unit data. It's triangles but no absolute scale.

What you're looking for should be easy to moderately difficult to determine. 3D Printing slicing software does exactly what you want to calculate the path for 3d printers. You'll take your 3D model and make sure it's oriented so "up" makes sense - the neck of the shirt in your example, then run the slicer on it at various heights.

You'll get a 2D slice of a 3D object as the intersection of a plane with the model at that height. You'll then have to compute the bounding box around the slices and adjust the width to fit whatever units high your model is.

A good place to start might be this library: https://pypi.org/project/meshcut/

or else look for open source 3D printer slicing software.

Great Turtle
  • 3,315
  • 7
  • 32
  • 36