Forum

Author Topic: Are the stats from "View Mesh Statistics" accessible via Python?  (Read 2751 times)

reperry

  • Newbie
  • *
  • Posts: 19
    • View Profile
I would like to use the number of connected components in my script to decide whether or not to remove any components. I can see the number of connected components by manually going:
Tools --> Mesh ---> View mesh statistics...

But, I can't figure out how to get the number of connected components from within my script.

Here's what I have in mind:

numtriangles = 1000
connectedComponets = chunk.model.GET CONNECTED COMPONENT COUNT
while connectedComponents > 1:
    chunk.model.removeComponents(numtriangles)
    connectedComponents = chunk.model.GET CONNECTED COMPONENT COUNT
    numtriangles+=1000

Thanks for your help!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: Are the stats from "View Mesh Statistics" accessible via Python?
« Reply #1 on: May 10, 2016, 02:31:56 PM »
Hello reperry,

At the moment it is not possible to get this statistics via Python, but we'll try to implement something like that in the next updates.
Best regards,
Alexey Pasumansky,
Agisoft LLC

reperry

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Are the stats from "View Mesh Statistics" accessible via Python?
« Reply #2 on: September 15, 2016, 03:47:19 AM »
Thank you for your reply!