Features
Support
Community
Downloads
Buy
About
Forum
Home
Search
Login
Register
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
Get number of model faces
« previous
next »
Print
Pages: [
1
]
Author
Topic: Get number of model faces (Read 4066 times)
james.herbst
Newbie
Posts: 12
Get number of model faces
«
on:
January 28, 2022, 10:51:53 AM »
Hi All,
I'm trying to get the number of faces of the model in the active chunk. I have done it by accessing the model statistics as in this thread (
https://www.agisoft.com/forum/index.php?topic=11026.0
) but this code analyses the mesh each time taking 60 seconds or so. However, the 'faces' value is already calculated and displayed in the workplace/3D Model sidebar, in the properties pane, and in "Show Info..."
Is there a way to access the metadata of the model to get the number of faces without having to reanalyse the mesh each time?
Thanks so much!
James
Logged
Paulo
Hero Member
Posts: 1529
Re: Get number of model faces
«
Reply #1 on:
January 28, 2022, 11:50:00 AM »
james,
I think an easy way to get number of faces is:
Code:
[Select]
chunk = Metashape.app.document.chunk
len(chunk.model.faces) # no. of faces in model
Logged
Best Regards,
Paul Pelletier,
Surveyor
james.herbst
Newbie
Posts: 12
Re: Get number of model faces
«
Reply #2 on:
January 28, 2022, 02:41:04 PM »
yes, easy and fast! Exactly what I'm looking for.
Thanks, Paulo!
James
Logged
Print
Pages: [
1
]
« previous
next »
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
Get number of model faces
Features
Support
Community
Downloads
Buy
About
Features
Support
Community
Downloads
Buy
About
Metashape presentation
(PDF, 5 Mb)