Giter VIP home page Giter VIP logo

Comments (2)

DavidBoja avatar DavidBoja commented on May 26, 2024

Hi, sorry for the late reply!

To measure the distance between two arbitrary points A and B on the body, you could do:

  1. something like this where they follow the shortest path along the edges between two vertices of the mesh:
    • Find the closest mesh vertices on the body to A and B
    • find their distance between these vertices using the code
    • add the distance from the mesh vertices and the points A and B
  2. something similar to the measure_circumference in measure.py:
    • define a plane with three points: points A and B, and a third random point (would be better if this third point was on the "opposite" side of the body than the first two)
    • use the trimesh.intersections.mesh_plane to find the slice segments between the plane and mesh
    • use the segments to find your distance
    • you could first find the closest point in the segments to point A
    • then start from this point and iteratively find the next closest segment, forming a loop measurement until you reach the closest segment to point B
    • Note1: you need to define a method to know if you're measuring from A to B or from B to A
    • Note2: points A and B might be on a segment, so if you need a precise measurements, take that into consideration
    • Note3: if you slice the body with a plane, you can get multiple slices - you should know the region of your measurement so you can eliminate the unnecessary slices

from smpl-anthropometry.

DavidBoja avatar DavidBoja commented on May 26, 2024

Closing issue -- feel free to re-open if you will have further questions.

from smpl-anthropometry.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.