Thanks for the reply. I have two main questions that are a bit lengthy, but if I can work this stuff out this could be a very big tool for us to use in our organization.
1. Requirements for Command Line processing:
Pardon my lack of experience with this question please. To run command line directly I would need to add the path to the CC executable to my computer's environmental variables, correct? Once that is complete, then I should be able to type commands directly as the Wiki describes into Windows cmd.
I'm assuming this is what is meant by "Command Line Mode".
2. Python Subprocess through the CC executable. Maybe I can just call the executable (no to answer above)?
I've made some slight progress in that when I run my code CC opens and loads the file. This leads me to believe that all the other tasks in the code should run as well but there are some complications.
Here's my revised line of code that does the work:
Code: Select all
openFile=subprocess.Popen([CCPath, "CloudCompare", "-SILENT -O ", filePath, " -C_EXPORT_FMT LAS -SAVE_CLOUDS" ])
Here's what happens:
- Even though I have Silent on, the CC program opens. My guess is because I have to give some answers to CC about "Can't guess file type from extension" with the .ply. So I have to say "Apply" to the Type and PLY mapping params. I hit apply (all the CC guesses are correct).
- Global shift/scale menu pops so I also have to make a decision. I simply hit yes based on CC guesses.
- I get a "[Load]" error, "Can't guess file format: no file extension". But, the PLY file load window opens and the file loads no problem.
{Edit from my original: Note that when I add the .ply from the GUI, I do not get the file format errors. }
My question is really with the second part of the code where I want to export the PLY as LAS, which does not happen. I can save the clouds from the GUI and works no problem.
However, Python hangs while the CC GUI is open and quits as soon as I close the GUI.
I can imagine several different things that can be happening. Maybe you have an idea about how to move a little further toward the end result of being able to use CC to batch convert .ply to .las (and worry about other stuff later ;-).
Thank you for taking the time to look and consider.
Rich