MeshReduce Method (Int32, Boolean, Int32, Boolean, CancellationToken, IProgressDouble, String, Boolean) |
Reduce polygon count
Namespace:
Rhino.Geometry
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 6.15
Syntaxpublic bool Reduce(
int desiredPolygonCount,
bool allowDistortion,
int accuracy,
bool normalizeSize,
CancellationToken cancelToken,
IProgress<double> progress,
out string problemDescription,
bool threaded
)
Public Function Reduce (
desiredPolygonCount As Integer,
allowDistortion As Boolean,
accuracy As Integer,
normalizeSize As Boolean,
cancelToken As CancellationToken,
progress As IProgress(Of Double),
<OutAttribute> ByRef problemDescription As String,
threaded As Boolean
) As Boolean
Parameters
- desiredPolygonCount
- Type: SystemInt32
desired or target number of faces - allowDistortion
- Type: SystemBoolean
If true, faces are removed until desiredPolygonCount is reached, distorting the shape as needed.
If false, only flat (coplanar) regions are simplified, which leaves the shape unchanged and
ignores desiredPolygonCount.
- accuracy
- Type: SystemInt32
Integer from 1 to 10 telling how accurate reduction algorithm
to use. Greater number gives more accurate results
- normalizeSize
- Type: SystemBoolean
If true mesh is fitted to an axis aligned unit cube until reduction is complete - cancelToken
- Type: System.ThreadingCancellationToken
[Missing <param name="cancelToken"/> documentation for "M:Rhino.Geometry.Mesh.Reduce(System.Int32,System.Boolean,System.Int32,System.Boolean,System.Threading.CancellationToken,System.IProgress{System.Double},System.String@,System.Boolean)"]
- progress
- Type: SystemIProgressDouble
[Missing <param name="progress"/> documentation for "M:Rhino.Geometry.Mesh.Reduce(System.Int32,System.Boolean,System.Int32,System.Boolean,System.Threading.CancellationToken,System.IProgress{System.Double},System.String@,System.Boolean)"]
- problemDescription
- Type: SystemString
[Missing <param name="problemDescription"/> documentation for "M:Rhino.Geometry.Mesh.Reduce(System.Int32,System.Boolean,System.Int32,System.Boolean,System.Threading.CancellationToken,System.IProgress{System.Double},System.String@,System.Boolean)"]
- threaded
- Type: SystemBoolean
If True then will run computation inside a worker thread and ignore any provided CancellationTokens and ProgressReporters.
If False then will run on main thread.
Return Value
Type:
BooleanTrue if mesh is successfully reduced and false if mesh could not be reduced for some reason.
See Also