CloudCompare CLI -COMPUTE_NORMALS

Feel free to ask any question here
Post Reply
LukoPaw
Posts: 2
Joined: Sat Apr 26, 2025 9:18 am

CloudCompare CLI -COMPUTE_NORMALS

Post by LukoPaw »

Hello,

I work on point clouds in xyz format with such structure:
10.3, 31.5, 0.1
10.4, 30.1, 0.1
10.4, 30.6, 0.1

To create a mesh out of it I use:
Edit -> Normals -> Compute
and then
Plugins -> PoissonRecon

To use the same functions but with CLI, first I want to compute normals by command:
CloudCompare.exe -COMPUTE_NORMALS -O ".xyz file" -SAVE_CLOUDS FILE ".las file"
but created .las file is no openable by CloudCompare. I get error:
"An error occurred while loading 'tiger-export_macierz_binarna_norm': the third-party library in charge of saving/loading the file has failed to perform the operation"

How can create stl file from xyz file using CLI?

Thank you in advance
Attachments
Capture.PNG
Capture.PNG (5.22 KiB) Viewed 345 times
daniel
Site Admin
Posts: 7939
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare CLI -COMPUTE_NORMALS

Post by daniel »

So the -O option has to appear first, because you want to load the cloud before doing anything ;)

CloudCompare.exe -O ".xyz file" -COMPUTE_NORMALS -SAVE_CLOUDS FILE ".las file"

And you can also use '-C_EXPORT_FMT LAS' before calling anything so as to have the auto save feature automatically export to LAS (and not needing to call -SAVE_CLOUDS manually). If you don't want to use the auto-save feature, you should disable it.

And sadly, PoissonRecon is not accessible via the command line currently. Note that the original project has its own command line tool: https://github.com/mkazhdan/PoissonRecon
Daniel, CloudCompare admin
LukoPaw
Posts: 2
Joined: Sat Apr 26, 2025 9:18 am

Re: CloudCompare CLI -COMPUTE_NORMALS

Post by LukoPaw »

Thank you,
Now I use command:
CloudCompare.exe -C_EXPORT_FMT LAS -O ".xyz file" -COMPUTE_NORMALS -SAVE_CLOUDS FILE ".las file"
and it saves the .xyz file to openable .las file, but When I open it in CloudCompare GUI, it doesn't have normals and I still need to compute them manualy by Edit -> Normals - > Compute.
daniel
Site Admin
Posts: 7939
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare CLI -COMPUTE_NORMALS

Post by daniel »

Which version of CC are you using? Because normally v2.14 should automatically export normals in a LAS file as an Extra field (EB-VLR).

Also, make sure the 'normal' fields (NormalX, NormalY and NormalZ) are loaded as such in the GUI ('Load As Normals' section). Normals are not very standard in LAS files. E57 is probably a better format to store points with normals.

(also, mind that normals are not displayed by default after having been loaded - there's an option to control this behavior in the 'Display > Display settings' dialog)

And of course, maybe something went wrong during normals computation, but you should see that in the command line logs.
Daniel, CloudCompare admin
Post Reply