Back to list

Algo :: decimate


   reduce the polygon count by removing some vertices

GUI Icon


GUI Dialog


Script function

   algo.decimate(occurrences, surfacicTolerance[, lineicTolerance[, normalTolerance[, texCoordTolerance[, releaseConstraintOnSmallArea]]]])


   occurrences (OccurrenceList) : Occurrences of components to process
   surfacicTolerance (Distance) : Maximum distance between surfacic vertices and resulting simplified surfaces
   lineicTolerance (Distance[optional] : Maximum distance between lineic vertices and resulting simplified lines
   normalTolerance (Angle[optional] : Maximum angle between original normals and those interpolated on the simplified surface
   texCoordTolerance (Double[optional] : Maximum distance (in UV space) between original texcoords and those interpolated on the simplified surface
   releaseConstraintOnSmallArea (Boolean[optional] : If True, release constraint of normal and/or texcoord tolerance on small areas (according to surfacicTolerance)


This example is a 3DXML model given by Dassault Systèmes, it contains 140 846 triangles. The decimate function can reduce the polygon count.

Surfacic Tolerance

The surfacic tolerance is the maximum distance between the original model and the simplified one.

Bigger the tolerance is, worse the quality is but better is the polygon reduction.

Decimation with surfacic tolerance = 0.1 mm : the polygon count is reduced to 66636 but the quality is quite good.

Decimation with surfacic tolerance = 1 mm : the polygon count is now reduced to 7155 but the quality is poor due to a lot of lighting problems.

To obtain very low polygon count without destroying visual quality of the model, PiXYZ can control normal distortion during the decimation process.

Normal distortion tolerance

The normal distortion tolerance is the maximum angle between a normal at each point of the original model and its corresponding normal on the simplified one.

Decimation with surfacic tolerance = 1 mm and normal distortion tolerance = 5 degrees : the polygon count is reduced to 9525 with an almost imperceptible quality loss.

Finally, the high surfacic tolerance (1mm) produce a significant aliasing visible on sharp edges.