Click or drag to resize
Ab4d.SharpEngine logo

SlicerDuplicatePositionsPrecisionBitsCount Property

Gets or sets a number of bits in the uint value that are used to hash the positions when the code combines duplicate positions (used to generate closed mesh). See remarks for more info.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public int DuplicatePositionsPrecisionBitsCount { get; set; }

Property Value

Int32
Remarks

When combining duplicate positions, the float x, y and z values are normalized to values from 0 to 1 based the bounding box of the positions. Then the normalized value is multiplied by a factor that is generated from this value (for example for the default 18 bits the value 0x3FFFF is generated) and the result is converted into uint. This value is then used to calculate the hash of the positions.

The reason why not all bits are used (32) is that this helps combine positions that should be on the same 3D space, but are slightly different because of floating point imprecision (for example, when using Boolean operations or Slice).

By default, this value is set to 18 bits. If you still find that some closed meshes are not generated, you can decrease this number. But be aware that too low precision can lead to wrong results, especially for meshes with positions that are very close to each other. Max value is 31 bits.

See Also