Forum

Author Topic: script exportPoints in .ply with coordinate?  (Read 9854 times)

gorin

  • Newbie
  • *
  • Posts: 5
    • View Profile
script exportPoints in .ply with coordinate?
« on: September 05, 2013, 03:14:04 PM »
hello, i try to make a script to export all my chunk in .ply with real coordinate.
The script run but i have no result. The new file is not created.
Someone can tell me where is my mistake? I'm not sure of my script. I use some sample to make this. (i'm beginner)

Code: [Select]
import PhotoScan
doc = PhotoScan.app.document
proj = PhotoScan.CoordinateSystem("EPSG::2154")

for chunk in doc.chunks:
    filename = chunk.label
    pathd = "D:\diag_preventif\rd9_2013\photoscan_carriere_rd9\export\cor_"+filename+".ply"
    chunk.exportPoints(pathd, format='ply', dense=True, projection=proj)

And how can i use shift mode in this script ?

Thank's

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: script exportPoints in .ply with coordinate?
« Reply #1 on: September 05, 2013, 03:35:46 PM »
Hello gorin,

And what is the message you've got in the Console pane after script execution?

Dense point cloud export works only if depth maps have been calculated for the chunk.

Unfortunately, Shift parameter is not yet implemented for .exportPoints function. We'll try to add it in the future updates.
Best regards,
Alexey Pasumansky,
Agisoft LLC

gorin

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: script exportPoints in .ply with coordinate?
« Reply #2 on: September 05, 2013, 03:49:10 PM »
Thank you for your answer.
I have this message :
Code: [Select]
Finished processing in 715.889 sec (exit code 1)
When i go to file/Export Points..., with dense in export parameters, i have a result.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: script exportPoints in .ply with coordinate?
« Reply #3 on: September 05, 2013, 03:58:06 PM »
Then the problem could be in the path string.
Please try to replace all back-slash symbols with slashes ("\" -> "/"). I believe that using print(pathd) command will give to two lines, since "\r" symbol is used as "carriage return".
Best regards,
Alexey Pasumansky,
Agisoft LLC

gorin

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: script exportPoints in .ply with coordinate?
« Reply #4 on: September 05, 2013, 04:29:40 PM »
Thanks.
my problem is resolved.
But i need to use Shift parameter, so i wait the next update.

Have a good day

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: script exportPoints in .ply with coordinate?
« Reply #5 on: September 24, 2013, 09:58:24 PM »
Hello gorin,

"Shift" should be now accessible from Python API.
Best regards,
Alexey Pasumansky,
Agisoft LLC