Forum

Author Topic: Split in Chunks - Copy Model  (Read 2981 times)

SimonBrown

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • AccuPixel Ltd - Dealer and Training Centre
Split in Chunks - Copy Model
« on: August 26, 2017, 03:46:49 PM »
Scripting newbie question:

I use the split_in_chunks script quite a lot (thank you to whoever authored it!) and its very useful.

I now have a situation where I want to split a chunk into separate chunks, duplicating not only the dense cloud/cameras but the 3D model as well.

I *think* I have found the section in the script:
 new_chunk = chunk.copy()
      new_chunk.label = "Chunk "+ str(i)+ "\\" + str(j) + "\\" + str(k)
      new_chunk.model = None
      doc.addChunk(new_chunk)

With the command that deals with the model in bold. I have checked the reference manual, but cannot find an example? I am guessing the None needs to be something else, and have tried a few guesses but no luck.

Can anyone help?
Agisoft endorsed online Metashape training - see: https://accupixel.co.uk/metashape-training-courses

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Split in Chunks - Copy Model
« Reply #1 on: August 26, 2017, 06:53:51 PM »
Hello SimonBrown,

chunk.copy() function accepts the parameters to be copied (by default the chunk is fully duplicated). The line that you have highlighted means that the model for the new_chunk is discarded after duplicating.
Best regards,
Alexey Pasumansky,
Agisoft LLC

SimonBrown

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • AccuPixel Ltd - Dealer and Training Centre
Re: Split in Chunks - Copy Model
« Reply #2 on: September 03, 2017, 01:20:20 PM »
Thanks Alexey - much appreciated.
Agisoft endorsed online Metashape training - see: https://accupixel.co.uk/metashape-training-courses