PolyMesh

Public Methods

shrinkWrap(parts=None, voxelSize=- 1, merge=True, sharpen=False)

Creates a new part/parts from the selected parts with a single isosurface

The shrinkwrap is useful when you want to merge optimized results with non-design-space regions.

You would do this so you can fit a single PolyNURBS over the entire model. By default, the selected parts are merged into a single part. This option can be disabled by setting merge to False.

param parts

A list of parts to be shrink wrapped.

type parts

list[Part]

param voxelSize

Size of each voxel of the shrink wrapped part. Size value should be in the range 0 to 1 Defaults to -1 to auto compute the voxel dimension of the part.

type voxelSize

float

param merge

Merge the shrink wrapped parts into single or multiple parts.

type merge

bool

param sharpen

If set to True, then sharpen the edges of the new shrink wrapped part.

type sharpen

bool

returns

Returns a new shrink wrapped part

rtype

Part

makeSmooth(parts=None, maintainVolume=True, intensity=0.5, iterations=40)

Smoothens parts from the selected parts with passed params.

param parts

A list of parts to smooth

type parts

list[Part]

param maintainVolume

If True part volume is targeted to be preserved. If false smoothening is done more aggressively every iteration

type maintainVolume

bool

param intensity

this control how aggressive the smoothening operation is every iteration.

type intensity

float[0.2, 0.9]

param iterations

The number of iterations algorithm does smoothening. Higher number results in smoother mesh

type iterations

int

removeSmooth(parts=None)

Removes any existing smoothening from passed parts

param parts

A list of parts to removing smooothing from.

type parts

list[Part]

removeIsland(part)

Finds small disconnected regions of a mesh part and delete them.

param part

Part having island.

type part

Part

convertToTriangleMesh(parts)

Convert Parts to triangle mesh.

param parts

Parts to be converted in triangle mesh.

type parts

list[Part]