PointKitPy

Python Bindings for PointKit: Scan

class PointKitPy.Scripting

Bases: pybind11_object

The main scripting interface for PointKitPy.

AlignFast(*args, **kwargs)

Overloaded function.

  1. AlignFast(self: PointKitPy.Scripting) -> bool

Fast alignment on the current mesh list.

  1. AlignFast(self: PointKitPy.Scripting, aMoving: list[PointKitPy.Types.PLGMeshExt], aLocked: list[PointKitPy.Types.PLGMeshExt]) -> bool

Fast alignment on the provided mesh lists.

AlignICP(*args, **kwargs)

Overloaded function.

  1. AlignICP(self: PointKitPy.Scripting) -> bool

Raw ICP alignment on the current mesh list.

  1. AlignICP(self: PointKitPy.Scripting, aMoving: list[PointKitPy.Types.PLGMeshExt], aLocked: list[PointKitPy.Types.PLGMeshExt]) -> bool

Raw ICP alignment on the provided mesh lists.

AlignStandard(*args, **kwargs)

Overloaded function.

  1. AlignStandard(self: PointKitPy.Scripting) -> bool

Standard alignment on the current mesh list.

  1. AlignStandard(self: PointKitPy.Scripting, aMoving: list[PointKitPy.Types.PLGMeshExt], aLocked: list[PointKitPy.Types.PLGMeshExt]) -> bool

Standard alignment on the provided mesh lists.

Cleanup(self: PointKitPy.Scripting) bool

Cleanup meshes, removing invalid geometry and data.

ClearMeshList(self: PointKitPy.Scripting) None

Clear the list of meshes.

Combine(self: PointKitPy.Scripting, voxelSize: float = 0.0, scanCount: int = 0) bool

Combine the meshes.

CutPlane(self: PointKitPy.Scripting, planePoint: PointKitPy.Types.V3, planeNormal: PointKitPy.Types.V3) bool

Cut the meshes with a plane, removing points above the normal

DecimateByRadius(self: PointKitPy.Scripting, radius: float = 0.0, voxelDownsample: bool = False) bool

Decimate the meshes by radius. If radius is 0, auto-calculates.

DecimateMaxDetail(self: PointKitPy.Scripting, keepPercentage: float = 30.0) bool

Decimate meshes, maximizing detail.

DecimateRandom(self: PointKitPy.Scripting, keepPercentage: float = 30.0) bool

Decimate the meshes randomly, keeping a given percentage of vertices

Erode(self: PointKitPy.Scripting, nIter: int = 1) bool

Erode the meshes.

Finalize(self: PointKitPy.Scripting, **kwargs) bool

Finalize the current mesh list.

Keyword Arguments:

  • enableCombine (bool, default=True): Whether to combine meshes before finalizing. If false, finalize meshes individually.

  • clusterRemoval (bool, default=True): Whether to remove small clusters after performing reconstruction.

  • enableErosion (bool, default=False): Whether to erode the mesh after performing reconstruction.

  • enableHoleFilling (bool, default=False): Whether to fill holes in the mesh after performing reconstruction.

  • enableSmooth (bool, default=True): Whether to smooth the mesh after performing reconstruction.

  • enableEnhanceColor (bool, default=False): Whether to enhance color in the mesh after performing reconstruction.

  • combineVoxelSize (float, default=0.0): The voxel size to use for combining.

  • combineScanCount (int, default=0): Minimum scan count required to keep voxels.

  • combineMethod (str, default= “Voxel”): Combination method, “Voxel” or “MaximizeDetail”.

  • meshResolution (str, default= “Low”): Resolution, “Low”, “Standard”, or “High”.

  • pointsToMeshMethod (str, default= “Poisson”): Conversion method, “Poisson” or “Triangulation”.

  • trimFactor (int, default=1): Trim factor for Poisson reconstruction.

  • minLargestClusterPerc (float, default=0.0): Minimum percentage size of the largest cluster to keep.

  • maxClustersCount (int, default=1): Maximum number of clusters to retain.

  • erosionIterations (int, default=0): Number of erosion iterations.

  • maxHoleFillArea (float, default=0.0): Maximum hole size to fill.

  • smoothIter (int, default=2): Number of smoothing iterations after finalization.

Example:

`interface.Finalize(enableCombine=True, meshResolution="High", pointsToMeshMethod="Poisson", combineVoxelSize=0.1)`

GetMeshes(self: PointKitPy.Scripting) list[PointKitPy.Types.PLGMeshExt]

Get the list of meshes (deep copy).

HoleFill(self: PointKitPy.Scripting, maxArea: float) bool

Fill holes in the meshes that are smaller than maxArea.

Load(self: PointKitPy.Scripting, path: str, filter: str = '') bool

Load a single mesh, or a directory of meshes, into the PointKitPy scripting object.

MonitorDirectory(self: PointKitPy.Scripting, path: str, numFiles: int, filter: str = '') bool

Monitor a directory for numFiles files that match filter.

property Normals
OptimizeAlignment(*args, **kwargs)

Overloaded function.

  1. OptimizeAlignment(self: PointKitPy.Scripting) -> bool

Optimize the alignment of the current mesh list.

  1. OptimizeAlignment(self: PointKitPy.Scripting, aMeshes: list[PointKitPy.Types.PLGMeshExt]) -> bool

Optimize the alignment of the provided mesh list.

PoissonReconstruction(self: PointKitPy.Scripting, depth: int = 9) bool

Perform Poisson reconstruction.

property Remove
Reset(self: PointKitPy.Scripting) None

Reset the scripting object to its initial state.

Save(self: PointKitPy.Scripting, path: str, ext: str = 'ply') bool

Save all meshes to disk.

SetLogLevel(self: PointKitPy.Scripting, level: str) None

Set the log level. Options are ‘None’, ‘Errors’, ‘Actions’, ‘Results’, or ‘All’.

Smooth(self: PointKitPy.Scripting, nIter: int = 1) bool

Smooth the meshes.

Subdivide(self: PointKitPy.Scripting, desiredEdgeLength: float, maxSubdivisions: int = 0) bool

Subdivide the meshes.

property Transform
Triangulate(self: PointKitPy.Scripting) bool

Triangulate the meshes.

property mLog

The log string

property mLogToStdout

Disable to only log to the log string.

property mMeshList

Mesh list (getter returns value copies; setter accepts None or a list, deep-copying inputs).

Next »