How to build a cube with 8 vertex or a plane with 4 points in point cloud

All about Windows versions
Post Reply
zzwbeyond
Posts: 15
Joined: Wed Mar 16, 2016 1:16 pm

How to build a cube with 8 vertex or a plane with 4 points in point cloud

Post by zzwbeyond »

HI, I want to build a cube in cloudcompare with 8 points in point cloud, and the 8 points is the vertex of the cube. But CC now use the "dimensions" and a transformation matrix to build the "box" primitive. Or how to build a plane with 4 points, so I can build the cube with 6 planes.
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to build a cube with 8 vertex or a plane with 4 points in point cloud

Post by daniel »

The 'Box' and 'Plane' primitives really are primitives. And they can build a 3D tesselated representation just for display.

If you want to build a box from some given vertices, then you should create a standard triangular mesh (ccMesh). There are a few examples of creation of custom ccMesh instances in the code. Basically you create a point cloud (with 8 vertices), then you create a mesh with this point cloud as 'vertices' and you add the triangles (as 3 indexes referring to the vertices). You can also add per-triangle normals, etc. (in this case you can take a look at how a ccBox instance creates its own representation).
Daniel, CloudCompare admin
Post Reply