Forum

Author Topic: Mesh: Select faces by "Polygon size"  (Read 230 times)

geo_enth3

  • Newbie
  • *
  • Posts: 26
    • View Profile
Mesh: Select faces by "Polygon size"
« on: May 17, 2022, 11:41:59 AM »
Dear all,

I was wondering if it is possible to perform something like the Gradual Selection -> polygon size also with the Python API (please find the corresponding GUI screenshot attached). I would like to remove very large faces from my model as they are usually erroneous. I didn't find any function in the API docs that would allow me to do this but maybe somebody has some code already to perform a similar operation.

Thanks in advance,

geo_enth
« Last Edit: May 18, 2022, 03:38:23 PM by geo_enth3 »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13729
    • View Profile
Re: Mesh: Select faces by "Polygon size"
« Reply #1 on: May 23, 2022, 04:57:55 PM »
Hello geo_enth,

Currently there's no instrument for fast polygon selection using Python API based on the polygon size.

So the workaround would be only custom function creation that estimates the size of the mesh faces (as the triangle area based on the vertex coordinates) in the model, calculates the min/max values and then selects and removes the faces based on the input threshold. However, this approach would likely work slow for high-poly models.
Best regards,
Alexey Pasumansky,
Agisoft LLC

geo_enth3

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Mesh: Select faces by "Polygon size"
« Reply #2 on: May 25, 2022, 01:40:03 PM »
Thanks Alexey,

I tried exactly this but it is indeed taking much too long...
not a big deal, I solved it for me by adapting the bounding box before generating the mesh.

Cheers!