polygonMesh

class itom.polygonMesh

polygonMesh([mesh, polygons]) -> creates a polygon mesh.

This constructor either creates an empty polygon mesh, a shallow copy of another polygon mesh (mesh parameter only) or a deep copy of another polygon mesh where only the polygons, given by the list of indices in the parameter ‘polygons’, are taken. In this case, the containing cloud is reduced and no longer organized (height=1, dense=false)

Parameters:

mesh : {polygonMesh}, optional

another polygon mesh instance (shallow or deep copy depending on polygons-parameter)

polygons : {sequence or array-like}, optional

If given, polygons must be a sequence or one-dimensional array-like structure, where all values can be transformed into unsigned integer values. Polygons must contain a list of indices pointing to all polygon from the given mesh that should be copied to this new instance.

data()

prints content of polygon mesh

static fromCloudAndPolygons(cloud, polygons) → creates a polygon mesh from cloud and polygons.
Parameters:

cloud : {pointCloud}

the input point cloud

polygons : {array-like, MxN}

an array-like matrix with the indices of the polygons. The array contains M polygons and every row gives the indices of the vertices of the cloud belonging to the polygon.

getCloud(pointType = point.PointInvalid) → returns the point cloud of this polygon mesh converted to the desired type.

If the pointType is not given or point.PointInvalid, the type of the internal pointCloud is guessed with respect to available types.

Parameters:

pointType : {int, enum point.PointXXX}, optional

the point type value of the desired type, the point cloud should be converted too (default: point.PointInvalid)

getPolygons()
name()
nrOfPolygons

returns the number of polygons in this mesh

Previous topic

pointCloud

Next topic

region

This Page