Skip to content

Writing files using the Command Line Interface #139

Description

@hvw-001

Hey!
I'm trying use the Command Line Interface to interact with Cloudcompare. There is not much documentation, but I already figured out how to load files:

CC = pycc.GetCmdLineInstance()
gso = CC.GlobalShiftOptions()
CC.importFile(path, gso)
clouds = CC.clouds()  # CLCloudDescVector
cloudDesc = clouds[0]  # CLCloudDesc
pointcloud: pycc.ccPointCloud = cloudDesc.pc

Now, i'd like to put clouds into the list to save, but I have no real idea how. Following code does not work. Without the clouds.append(pycc.CLCloudDesc(pc)) line, it saves the files loaded from file earlier:

xs = np.arange(0.0, 5.0, 0.1, pycc.PointCoordinateType)
ys = np.ones(len(xs), pycc.PointCoordinateType) * 18.5
zs = np.ones(len(xs), pycc.PointCoordinateType) * 17.33
pc = pycc.ccPointCloud(xs, ys, zs) # build a point cloud
clouds.append(pycc.CLCloudDesc(pc)) #??? 
CC.saveCloud(".bin", True, outputpath)

>>>TypeError: pycc_runtime.CLCloudDesc: No constructor defined!

I tried looking in the code, but the PYBIND stuff is way beyond what I understand.
Is there a quick example somewhere I could look at?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions