4. M3C2 plugin
M3C2 is a standard plugin of cloudComPy.
The availability of the plugin can be tested with the cloudComPy.isPluginM3C2()
function:
isM3C2_available = cc.isPluginM3C2()
M3C2 is a submodule of cloudCompy:
import cloudComPy as cc
# ...
if cc.isPluginM3C2():
import cloudComPy.M3C2
cc.M3C2.computeM3C2(...)
- cloudComPy.M3C2.computeM3C2(clouds: list[_cloudComPy.ccHObject], paramFilename: QString, precisionMaps: list[_cloudComPy.ccScalarField] = [], scales: list[float] = []) _cloudComPy.ccPointCloud
Compute Multiscale Model to Model Cloud Comparison (plugin M3C2) The computation parameters are regrouped in a text file: see
M3C2guessParamsToFile()
or the GUI to get a first version.To compute the uncertainty with precision maps, 6 scalar fields are required (3 components for first cloud then 3 components for second cloud). Two scales are also required (to take into account different units). When these fields and scales are given, the computation uses the precision maps and supersedes the options in the parameter file.
- Parameters:
clouds (list) – two or three clouds to compare. If a 3rd cloud is present, it will be used as core points.
paramFilename (string) – full path of the parameter file
precisionMaps (list,optional) – list of 6 scalar fields (3 components for first cloud then 3 components for second cloud), default empty list
scales (list,optional) – list of two doubles (scale for first and second cloud), default empty list
- Returns:
output cloud with computed scalar fields
- Return type:
- cloudComPy.M3C2.initTrace_M3C2() None
Debug trace must be initialized for each Python module.
Done in module init, following the value of environment variable _CCTRACE_ (“ON” if debug traces wanted)
- cloudComPy.M3C2.M3C2guessParamsToFile(arg0: list[_cloudComPy.ccHObject], arg1: QString, arg2: bool) bool
Guess the parameters for compute_M3C2 and save them to a file.
- Parameters:
clouds (list) – two or three clouds to compare. If a 3rd cloud is present, it will be used as core points.
paramFilename (string) – full path of the parameter file
fastMode (bool) – True corresponds to the values of the GUI dialog before Guess params button, False corresponds to the values of the GUI dialog after Guess params button.
- Returns:
success
- Return type:
bool