Forum

Author Topic: Metashape.Viepoint not writeable  (Read 8379 times)

mcstieg

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Metashape.Viepoint not writeable
« on: July 25, 2021, 03:36:29 PM »
Hello Alexey!

After rotating and scaling my model I calculate the middle of my model (vector "c") because I want to set the viewpoint there.
But the console tells me it is not writeable:

Metashape.app.model_view.viewpoint.center = c
2021-07-25 14:29:55 AttributeError: attribute 'center' of 'Metashape.Viewpoint' objects is not writable
2021-07-25 14:29:55 Error: attribute 'center' of 'Metashape.Viewpoint' objects is not writable   


Can you please tell me how to change the viewpoint?
Thank you very much!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15354
    • View Profile
Re: Metashape.Viepoint not writeable
« Reply #1 on: July 25, 2021, 04:41:05 PM »
Hello mcstieg,

Please try to define .coo as center of orbit (i.e. the point of interest), .mag and .rot.
Best regards,
Alexey Pasumansky,
Agisoft LLC

mcstieg

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Metashape.Viepoint not writeable
« Reply #2 on: August 17, 2021, 05:04:54 PM »
Thank you very much! Works perfectly for me!  ;D

The last challenge is to "zoom" in/out so that the model fits the size of the model pane ("mouse wheel function") (fov=0)

Do you have any idea how solve this?   
I'm searching for a way to find out it a point on my mesh is visible in the model pane or not.

Thanks again

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15354
    • View Profile
Re: Metashape.Viepoint not writeable
« Reply #3 on: August 17, 2021, 08:45:48 PM »
Hello mcstieg,

Do you want to do that automatically?
Best regards,
Alexey Pasumansky,
Agisoft LLC

mcstieg

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Metashape.Viepoint not writeable
« Reply #4 on: August 17, 2021, 10:03:16 PM »
Yes, that's what I try.
I hope to find a way to find a perfect fit for the pane automatically.

mcstieg

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Metashape.Viepoint not writeable
« Reply #5 on: August 26, 2021, 07:32:22 AM »
up  :)

mcstieg

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Metashape.Viepoint not writeable
« Reply #6 on: October 04, 2021, 07:14:20 AM »
Dear Alexey,

can you please give me an advice how to solve the task?
How can I "zoom" automatically, so that all the mesh faces are shown?

Thank you!