Forum

Author Topic: duplicate model in one chunk  (Read 2469 times)

mcstieg

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
duplicate model in one chunk
« on: July 10, 2020, 03:37:42 PM »
Hello everybody,

does anybody know how to duplicate model within one chunk?
I want to calculate the mesh with high face count and automatically build a duplication of it, where mesh is decimated without loosing the original one.

THANK YOU!  ;D

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15029
    • View Profile
Re: duplicate model in one chunk
« Reply #1 on: July 10, 2020, 03:48:14 PM »
Hello mcstieg,

At first you need to use chunk.buildModel(...) with the high number of polygons, then duplicate the model:
old_model = chunk.model
new_model = chunk.model.copy()
it will automatically set the duplicated model active. Then decimate it:
chunk.decimateModel(...)

To switch back to the high poly model:
chunk.model = old_model
or
chunk.model = chunk.models[0] #or any other index in range.
Best regards,
Alexey Pasumansky,
Agisoft LLC

mcstieg

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: duplicate model in one chunk
« Reply #2 on: July 10, 2020, 03:55:12 PM »
Thank you!  :)