Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

AlgoInterface

Class
Read time 72 minutesLast updated 21 hours ago

Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Algo
public class AlgoInterface : Interface

Methods

GetLastError

public static string GetLastError()
Returns

Type

Description

string

AssembleCAD

Assemble faces of CAD shapes.
[HandleProcessCorruptedStateExceptions]public void AssembleCAD(OccurrenceList occurrences, double tolerance, bool removeDuplicatedFaces = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to assemble.
doubletoleranceAssembling tolerance.
boolremoveDuplicatedFacesIf True, duplicated faces will be removed.

BackToInitialBRep

Create the BRep shape from a Tessellated shape with Domain Patch Attributes (after tessellate).
[HandleProcessCorruptedStateExceptions]public void BackToInitialBRep(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

BakeImpostor

Bakes impostors textures.
[HandleProcessCorruptedStateExceptions]public OctahedralImpostor BakeImpostor(uint occurrence, int XFrames, int YFrames, bool hemi = false, int resolution = 1024, int padding = 0, bool roughness = false, bool metallic = false, bool ao = false)
Parameters

Type

Name

Description

uintoccurrence
intXFrames
intYFrames
boolhemi
intresolution
intpadding
boolroughness
boolmetallic
boolao
Returns

Type

Description

OctahedralImpostor

BakeVertexAttributes

Bake vertex attributes on meshes from other meshes.
[HandleProcessCorruptedStateExceptions]public void BakeVertexAttributes(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, bool skinnedMesh, bool positions, bool useCurrentPositionAsTPose = false)
Parameters

Type

Name

Description

OccurrenceListdestinationOccurrencesOccurrences of the meshes where to store the baked vertex attributes.
OccurrenceListsourceOccurrencesOccurrences of components from which to bake vertex attributes.
boolskinnedMeshEnabling skinned mesh baking (joint assignation for animation transfer).
boolpositionsEnabling vertex position baking.
booluseCurrentPositionAsTPoseUse the current position as the T-Pose.

CalculateNormalsInPointClouds

WARNING: this function is tagged as 'EXPERIMENTAL'
calculate the normal of each point of a Point Cloud.
[HandleProcessCorruptedStateExceptions]public void CalculateNormalsInPointClouds(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.

ConfigureFunctionLogger

[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters

Type

Name

Description

stringfunctionName
boolenableFunction
boolenableParameters
boolenableExecutionTime

CrackCADMoebiusStrip

Detect Moebius strip and crack them if there is somme of them in the selection.
[HandleProcessCorruptedStateExceptions]public void CrackCADMoebiusStrip(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to check.

CrackEdges

Crack polygonal edges according to given criteria (deprecated, use crackMeshEdges instead).
[Obsolete][HandleProcessCorruptedStateExceptions]public void CrackEdges(OccurrenceList occurrences, bool useAttributesFilter = true, double sharpAngleFilter = 45, bool useNonManifoldFilter = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
booluseAttributesFilterFilters by attribute.
doublesharpAngleFilterSharp angle in degree to filter by edges sharpness, if the angle is negative do not filter.
booluseNonManifoldFilterFilters by manifold-ness.

CrackMeshEdges

Crack polygonal edges according to given criteria.
[HandleProcessCorruptedStateExceptions]public void CrackMeshEdges(OccurrenceList occurrences, bool normal = false, bool uvs = false, IntList uvChannels = null, bool loi = false, bool patches = false, bool nman = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolnormalCrack on sharp normals.
booluvsCrack on UV seams.
IntListuvChannelsIf empty and uvs=true, crack all UV channel, else only channel specified in the list.
boolloiCrack on identifier Lines of Interests.
boolpatchesCrack on patch borders.
boolnmanCrack on non-manifolds.

CreateFreeEdgesFromPatches

Create free edges from patch borders.
[HandleProcessCorruptedStateExceptions]public void CreateFreeEdgesFromPatches(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

CreateIdentifiedPatchesFromPatches

Create identified patch from existing patch (this is useful before cloning for baking).
[HandleProcessCorruptedStateExceptions]public void CreateIdentifiedPatchesFromPatches(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

CreateIndexMapFromOccurrences

Create an IndexMap and add an UVSet so that each mesh will have UVs refering to one different pixel of the index map and that pixel will have the value i for occurrences[i]. Warning: all occurrences will be singularized.
[HandleProcessCorruptedStateExceptions]public uint CreateIndexMapFromOccurrences(OccurrenceList occurrences, int uvChannel, bool createTexture1D)
Parameters

Type

Name

Description

OccurrenceListoccurrences
intuvChannel
boolcreateTexture1DIf true, the texture will have a resolution of 1 x occurrences.size, else a square power of two image will be created to fit occurrences.size pixels.
Returns

Type

Description

uint

CreateNormals

Create normal attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void CreateNormals(OccurrenceList occurrences, double sharpEdge = 45, bool overriding = true, bool useAreaWeighting = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.
doublesharpEdgeEdges with an angle between their polygons greater than sharpEdge will be considered sharp. If negative, smooth normals only.
booloverridingIf true, override existing normals, else only create normals on meshes without normals.
booluseAreaWeightingIf true, normal computation will be weighted using polygon areas.

CreatePointCloudKDTree

Create a KD-Tree from some point clouds occurrence, the given occurrences are deleted (even if they contains triangles) and the KD-Tree is represented in a new occurrence sub tree.
[HandleProcessCorruptedStateExceptions]public uint CreatePointCloudKDTree(OccurrenceList occurrences, int depth, bool addToScene = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to process.
intdepthKd tree depth.
booladdToSceneAdd the KD-Tree to the current scene.
Returns

Type

Description

uint

CreateTangents

Create tangent attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void CreateTangents(OccurrenceList occurrences, int uvChannel = 0, bool overriding = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.
intuvChannelUV channel to use for the tangents creation.
booloverridingIf true, override existing tangents, else only create tangents on meshes without tangents.

CreateVertexColorFromMaterials

Bake vertex colors using main material color. May duplicate some vertices.
[HandleProcessCorruptedStateExceptions]public void CreateVertexColorFromMaterials(OccurrenceList occurrenceList)
Parameters

Type

Name

Description

OccurrenceListoccurrenceList

CreateVisibilityPatchesFromPatch

Create visibility patches from existing patches.
[HandleProcessCorruptedStateExceptions]public void CreateVisibilityPatchesFromPatch(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

Decimate

Reduce the polygon count by removing some vertices.
[HandleProcessCorruptedStateExceptions]public void Decimate(OccurrenceList occurrences, double surfacicTolerance, double lineicTolerance = 0.1, double normalTolerance = 5, double texCoordTolerance = -1, bool releaseConstraintOnSmallArea = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doublesurfacicToleranceMaximum distance between surfacic vertices and resulting simplified surfaces.
doublelineicToleranceMaximum distance between lineic vertices and resulting simplified lines.
doublenormalToleranceMaximum angle between original normals and those interpolated on the simplified surface.
doubletexCoordToleranceMaximum distance (in 3D space) between original texcoords and those interpolated on the simplified surface.
boolreleaseConstraintOnSmallAreaIf True, release constraint of normal and/or texcoord tolerance on small areas (according to surfacicTolerance).

DecimateEdgeCollapse

WARNING: this function is tagged as 'EXPERIMENTAL'
reduce the polygon count by collapsing some edges to obtain an simplified mesh.
[HandleProcessCorruptedStateExceptions]public void DecimateEdgeCollapse(OccurrenceList occurrences, double surfacicTolerance, double boundaryWeight = 1, double normalWeight = 1, double UVWeight = 1, double sharpNormalWeight = 1, double UVSeamWeight = 10, double normalMaxDeviation = -1, bool forbidUVOverlaps = true, double UVMaxDeviation = -1, double UVSeamMaxDeviation = -1, bool protectTopology = false, QualitySpeedTradeoff qualityTradeoff = QualitySpeedTradeoff.PreferQuality)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doublesurfacicToleranceError max between the simplified mesh et the old one.
doubleboundaryWeightBoundary importance during the decimation.
doublenormalWeightNormal importance during the decimation.
doubleUVWeightUV importance during the decimation.
doublesharpNormalWeightImportance of sharp edges during the decimation.
doubleUVSeamWeightImportance of UV seams during the decimation.
doublenormalMaxDeviationConstraint the normals deviation on decimated model.
boolforbidUVOverlapsForbid UV to fold over and overlap during the decimation.
doubleUVMaxDeviationConstraint the uv deviation on decimated model.
doubleUVSeamMaxDeviationConstraint the uv seams deviation on decimated model.
boolprotectTopologyIf false, the topology of the mesh can change and some edges can become non-manifold. But the visual quality will be better on model with complex topology.
QualitySpeedTradeoffqualityTradeoffFor big models it is recommended to choose PreferSpeed tradeoff. In PreferSpeed mode, quadrics are computed only on position (and not on other vertex attributes).

DecimatePointClouds

Decimate Point Cloud Occurrences according to tolerance.
[HandleProcessCorruptedStateExceptions]public void DecimatePointClouds(OccurrenceList occurrences, double tolerance = 500)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doubletoleranceAvarage distance between points.

DecimateTarget

Reduce the polygon count by collapsing some edges to obtain a target triangle count (iterative version that use less memory).
[HandleProcessCorruptedStateExceptions]public void DecimateTarget(OccurrenceList occurrences, DecimateOptionsSelector targetStrategy, UVImportanceEnum UVImportance = UVImportanceEnum.PreserveSeamsAndReduceDeformation, bool protectTopology = false, ulong iterativeThreshold = 5000000, bool processMeshIndependently = false, int maxQuadricAge = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences to process.
DecimateOptionsSelectortargetStrategySelect between targetCount or ratio to define the number of triangles left after the decimation process.
UVImportanceEnumUVImportanceSelect importance of texture coordinates.
boolprotectTopologyIf False, the topology of the mesh can change and some edges can become non-manifold.
ulongiterativeThresholdNumber of triangles above which the iterative algorithm is used to limit the memory usage (disabled if processMeshIndependently=True).
boolprocessMeshIndependentlyIf true, each mesh will be processed independently and the triangleCount or ratio will apply by mesh (disable iterative method).
intmaxQuadricAgeIf >0, define the maximum memory (number of collapse) of a vertex before a new evaluation of its quadric.

DeleteAttibute

Delete designed attribute on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeleteAttibute(uint occurrence, AttributType type)
Parameters

Type

Name

Description

uintoccurrenceOccurrence to detele attribute from.
AttributTypetypeAttribute type.

DeleteBRepShapes

Delete BRep representation on parts.
[HandleProcessCorruptedStateExceptions]public void DeleteBRepShapes(OccurrenceList occurrences, bool onlyTessellated = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolonlyTessellatedIf True, delete only BRep represensation on part with a tessellated shape.

DeleteFreeVertices

Delete all free vertices of the mesh of given parts.
[HandleProcessCorruptedStateExceptions]public void DeleteFreeVertices(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

DeleteLines

Delete all free line of the mesh of given parts.
[HandleProcessCorruptedStateExceptions]public void DeleteLines(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

DeleteNormals

Remove normal attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeleteNormals(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete.

DeletePatches

Delete patches attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeletePatches(OccurrenceList occurrences, bool keepOnePatchByMaterial = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolkeepOnePatchByMaterialIf set, one patch by material will be kept, else all patches will be deleted and materials on patches will be lost.

DeletePolygons

Delete all polygons of the mesh of given parts.
[HandleProcessCorruptedStateExceptions]public void DeletePolygons(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

DeleteTangents

Remove tangent attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeleteTangents(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete.

DeleteTextureCoordinates

Delete texture coordinates on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeleteTextureCoordinates(OccurrenceList occurrences, int channel = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
intchannelChoose Texture coordinates channel to delete (-1 for all channels).

DeleteVisibilityPatches

Delete the visibility patches of given occurrences.
[HandleProcessCorruptedStateExceptions]public void DeleteVisibilityPatches(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

EvalDecimateErrorForTarget

Returns the max error to set to reach a given target.
[HandleProcessCorruptedStateExceptions]public double EvalDecimateErrorForTarget(OccurrenceList occurrences, DecimateOptionsSelector TargetStrategy, double boundaryWeight = 1, double normalWeight = 1, double UVWeight = 1, double sharpNormalWeight = 1, double UVSeamWeight = 10, bool forbidUVFoldovers = true, bool protectTopology = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesList of occurrences to process.
DecimateOptionsSelectorTargetStrategySelect between targetCount or ratio to define the number of triangles left after the decimation process.
doubleboundaryWeightDefines how important the edges defining the mesh boundaries (free edges) are during the decimation process, to preserve them from distortion.
doublenormalWeightDefines how important vertex normals are during the decimation process, to preserve the smoothing of the mesh from being damaged.
doubleUVWeightDefines how important UVs (texture coordinates) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs).
doublesharpNormalWeightDefines how important sharp edges (or hard edges) are during the decimation process, to preserve them from being distorted.
doubleUVSeamWeightDefines how important UV seams (UV islands contours) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs).
boolforbidUVFoldoversForbids UVs to fold over and overlap each other during the decimation.
boolprotectTopologyIf False, the topology of the mesh can change and some edges can become non-manifold; but the visual quality will be better on model with complex topology.
Returns

Type

Description

double

ExtractNeutralAxis

Extract neutral axis from tessellations.
[HandleProcessCorruptedStateExceptions]public void ExtractNeutralAxis(OccurrenceList occurrences, double maxDiameter, bool removeOriginalMesh)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doublemaxDiameterMaximum diameter of beams.
boolremoveOriginalMeshRemove or not the original mesh at the end of the algorithm.

FilletMesh

WARNING: this function is tagged as 'EXPERIMENTAL'
Fillet a mesh according to its Lines of Interest.
[HandleProcessCorruptedStateExceptions]public void FilletMesh(OccurrenceList occurrences, double value, FilletingMode filletingMode = FilletingMode.Width, int subdivisionNb = 0, bool createFlatChamfer = false, uint material = 0, int uvChannel = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.
doublevalueValue (mm).
FilletingModefilletingModeFilleting mode.
intsubdivisionNbNumber of subdivision.
boolcreateFlatChamferIf there is 0 subdivision, should the fillet be a planar flat chamfer?.
uintmaterialMaterial to apply to created fillets. Default: use a random neighbor material.
intuvChannelUV Channel for the created fillet polygons. Defaults: Use an existing channel if there is one.

FilterHiddenPolygons

Remove hidden polygons using voxels and cavities.
[HandleProcessCorruptedStateExceptions]public void FilterHiddenPolygons(OccurrenceList occurrences, double voxelSize)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublevoxelSizeSize of voxels.

FilterMeshVertexColors

Smooth mesh vertex colors by applying to adjacent vertices a combination of different Gaussian filters for feature preservation.
[HandleProcessCorruptedStateExceptions]public void FilterMeshVertexColors(OccurrenceList occurrences, double sigmaPos = 5, double sigmaValue = 0.2, double sigmaNormal = 15)
Parameters

Type

Name

Description

OccurrenceListoccurrencesMesh occurrences the filter must be applied on.
doublesigmaPosVariance of the Gaussian filter applied to distances between adjacent vertex positions.
doublesigmaValueVariance of the Gaussian filter applied to differences between adjacent vertex colors (in [0, 1]).
doublesigmaNormalVariance of the Gaussian filter applied to angular differences between adjacent vertex normals (in degree).

FindBestPivotBetweenOccurrences

Try to compute the pivot point between 2 sets of occurrences.
[HandleProcessCorruptedStateExceptions]public Matrix4 FindBestPivotBetweenOccurrences(OccurrenceList assembly1, OccurrenceList assembly2, double precision = -1)
Parameters

Type

Name

Description

OccurrenceListassembly1Set occurrences 1.
OccurrenceListassembly2Set occurrences 2.
doubleprecisionPrecision used to determine if elements are similar.
Returns

Type

Description

Matrix4

GetAllAxisFromCADModel

Return all the main axis contained in the CAD models given.
[HandleProcessCorruptedStateExceptions]public GetAllAxisFromCADModelReturn GetAllAxisFromCADModel(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to check.
Returns

GetMeshVertexColors

Returns arrays containing the vertex colors of all meshes being children of the provided occurrence list.
[HandleProcessCorruptedStateExceptions]public ColorAlphaListList GetMeshVertexColors(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences from which meshes are gathered.
Returns

Type

Description

ColorAlphaListList

GetOptimalTextureResolution

WARNING: this function is tagged as 'EXPERIMENTAL'
Returns the optimal resolution based on a number of texels per 3D space units (e.g : mm).
[HandleProcessCorruptedStateExceptions]public int GetOptimalTextureResolution(OccurrenceList occurrences, double texelPerMm)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences on which to compute optimal texture resolution.
doubletexelPerMmNumber of texel per millimeter in a 3D space.
Returns

Type

Description

int

GetTessellations

Returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh).
[HandleProcessCorruptedStateExceptions]public TessellationList GetTessellations(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
Returns

Type

Description

TessellationList

GetUV3dRatio

WARNING: this function is tagged as 'EXPERIMENTAL'
Returns the ratio of size between UV and 3D (max value, actually at the 90th percentil).
[HandleProcessCorruptedStateExceptions]public double GetUV3dRatio(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences on which to compute optimal texture resolution.
Returns

Type

Description

double

GetVisibilityStats

Returns the visibility statistics for some occurrences.
[HandleProcessCorruptedStateExceptions]public GetVisibilityStatsReturn GetVisibilityStats(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
Returns

GetVisualComparisonFootprint

Compute the visual footprint of the difference between two sets of occurrences.
[HandleProcessCorruptedStateExceptions]public double GetVisualComparisonFootprint(OccurrenceList originalOccurrences, OccurrenceList comparedOccurrences, int resolution = 512, int viewpointCount = 256, double threshold = 0.2, bool onHemisphereOnly = false)
Parameters

Type

Name

Description

OccurrenceListoriginalOccurrencesSet of occurrences representing the ground truth.
OccurrenceListcomparedOccurrencesSet of occurrences to compare with the ground truth.
intresolutionResolution of the viewer.
intviewpointCountNumber of viewpoints generated around the bounding sphere of all occurrences.
doublethresholdTolerance for pixel comparison.
boolonHemisphereOnlyCreate viewpoints only in the Y+ hemisphere of the bounding sphere.
Returns

Type

Description

double

IdentifyLinesOfInterest

Identify LoI according to given criteria. It will create a new LoI attribute on the mesh that can be used afterward by some functions.
[HandleProcessCorruptedStateExceptions]public void IdentifyLinesOfInterest(OccurrenceList occurrences, bool normal = false, bool uvs = false, IntList uvChannels = null, bool border = false, bool patches = false, bool nman = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolnormalAdd LoI on sharp normals.
booluvsAdd LoI on UV seams.
IntListuvChannelsIf empty and uvs=true, add LoI using all UV channels, else only channel specified in the list.
boolborderAdd LoI on boundary edges.
boolpatchesAdd LoI on submesh borders.
boolnmanAdd LoI on non-manifolds edges.

IdentifyPatches

Create patches (submeshes) on meshes (needed by some functions).
[HandleProcessCorruptedStateExceptions]public void IdentifyPatches(OccurrenceList occurrences, bool useAttributesFilter = true, double sharpAngleFilter = 45, bool useBoundaryFilter = true, bool useNonManifoldFilter = true, bool useLineEdgeFilter = true, bool useQuadLineFilter = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
booluseAttributesFilterFilters by attributes.
doublesharpAngleFilterSharp angle in degree to filter by edges sharpness, if the angle is negative do not filter.
booluseBoundaryFilterFilters by boundaries.
booluseNonManifoldFilterFilters by manifold-ness.
booluseLineEdgeFilterFilters by edge.
booluseQuadLineFilterFilters by quad lines.

IdentifySharpEdges

WARNING: this function is tagged as 'EXPERIMENTAL'
Mark as Lines Of Interest the sharp edges.
[HandleProcessCorruptedStateExceptions]public void IdentifySharpEdges(OccurrenceList occurrences, double minSharpAngle, double maxSharpAngle = 180, ConvexityFilter convexity = ConvexityFilter.OnConvexAndConcave, bool onlyExplicitSharp = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.
doubleminSharpAngleThe angle between the normals - all edges sharpest than this will be filleted.
doublemaxSharpAngleAll edges sharpest than this won't be filleted.
ConvexityFilterconvexityFillet sharp edges that are convex, concave or both.
boolonlyExplicitSharpIf toggled, if the explicit normals of an edge says the transition is smooth, the edge won't be selected.

InvertTangents

Invert tangents orientation (usefull to switch between right-handed/left-handed normal maps.
[HandleProcessCorruptedStateExceptions]public void InvertTangents(OccurrenceList occurrences, bool invertW = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to invert tangents on.
boolinvertWIf true, only inverse the w components of tangent. Else, inverse the xyz vector.

LineToTexture

WARNING: this function is tagged as 'EXPERIMENTAL'
Generate a textured quadrangle over an existing mesh of coplanar lines.
[HandleProcessCorruptedStateExceptions]public void LineToTexture(OccurrenceList lines, UseColorOption useColor, int resolution = 512, int thickness = 5)
Parameters

Type

Name

Description

OccurrenceListlinesLines to select.
UseColorOptionuseColorSet color policy.
intresolutionTexture resolution.
intthicknessThe thickness of the lines in pixels.

ListFeatures

List features from tessellations.
[HandleProcessCorruptedStateExceptions]public OccurrenceFeaturesList ListFeatures(OccurrenceList occurrences, bool throughHoles = true, bool blindHoles = false, double maxDiameter = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolthroughHolesList through holes.
boolblindHolesList blind holes.
doublemaxDiameterMaximum diameter of the holes to be list (-1=no max diameter).
Returns

Type

Description

OccurrenceFeaturesList

LoopSubdivMesh

Apply Loop Subdivision on Triangle-only Mesh.
[HandleProcessCorruptedStateExceptions]public void LoopSubdivMesh(OccurrenceList occurrences, int depth)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
intdepthSubdivision depth.

MergeVertices

Merge near vertices according to the given distance.
[HandleProcessCorruptedStateExceptions]public void MergeVertices(OccurrenceList occurrences, double maxDistance, TopologyCategoryMask mask)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doublemaxDistanceMaximum distance between two vertex to merge.
TopologyCategoryMaskmaskTopological category of the vertices to merge.

MeshBooleanOperation

WARNING: this function is tagged as 'EXPERIMENTAL'
Computes the boolean operation between the meshes of two occurrence lists.
[HandleProcessCorruptedStateExceptions]public uint MeshBooleanOperation(OccurrenceList occurrencesA, OccurrenceList occurrencesB, MeshBooleanOperation operation)
Parameters

Type

Name

Description

OccurrenceListoccurrencesAOccurrences A.
OccurrenceListoccurrencesBOccurrences B.
MeshBooleanOperationoperationThe operation to perform.
Returns

Type

Description

uint

MeshComparison

WARNING: this function is tagged as 'EXPERIMENTAL'
compare two meshes.
[HandleProcessCorruptedStateExceptions]public double MeshComparison(uint mesh_1, uint mesh_2)
Parameters

Type

Name

Description

uintmesh_1
uintmesh_2
Returns

Type

Description

double

MeshComparisonBatch

WARNING: this function is tagged as 'EXPERIMENTAL'
compare each couple of meshes and returns the maximum for each couple.
[HandleProcessCorruptedStateExceptions]public DistanceList MeshComparisonBatch(OccurrenceList meshes1, OccurrenceList meshes2)
Parameters

Type

Name

Description

OccurrenceListmeshes1
OccurrenceListmeshes2
Returns

Type

Description

DistanceList

MeshIntersections

WARNING: this function is tagged as 'EXPERIMENTAL'
Computes the list of polylines at the intersections of the meshes of two occurrence lists.
[HandleProcessCorruptedStateExceptions]public Point3ListList MeshIntersections(OccurrenceList occurrencesA, OccurrenceList occurrencesB)
Parameters

Type

Name

Description

OccurrenceListoccurrencesAOccurrences A.
OccurrenceListoccurrencesBOccurrences B.
Returns

Type

Description

Point3ListList

NoiseMesh

Apply noise to vertex positions along their normals.
[HandleProcessCorruptedStateExceptions]public void NoiseMesh(OccurrenceList occurrences, double maxAmplitude)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrencess to noise.
doublemaxAmplitudeMaximum distance between original vertex and noisy vertex.

OptimizeCADLoops

Optimize CAD Face loops by merging useless loop edges.
[HandleProcessCorruptedStateExceptions]public void OptimizeCADLoops(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to optimize.

OptimizeForRendering

Optimize mesh for rendering (lossless, only reindexing).
[HandleProcessCorruptedStateExceptions]public void OptimizeForRendering(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to optimize.

OptimizeSubMeshes

Sort sub meshes by materials.
[HandleProcessCorruptedStateExceptions]public void OptimizeSubMeshes(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrencess to process.

OptimizeTextureSize

WARNING: this function is tagged as 'EXPERIMENTAL'
Resizes scene textures based on a number of texels per 3D space units (e.g: mm).
[HandleProcessCorruptedStateExceptions]public void OptimizeTextureSize(uint root, double texelPerMm)
Parameters

Type

Name

Description

uintrootRoot from which texture resizing will process.
doubletexelPerMmNumber of texel per millimeter in a 3D space.

RemoveHoles

Remove some features from tessellations.
[HandleProcessCorruptedStateExceptions]public void RemoveHoles(OccurrenceList occurrences, bool throughHoles, bool blindHoles, bool surfacicHoles, double maxDiameter, uint fillWithMaterial = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolthroughHolesRemove through holes.
boolblindHolesRemove blind holes.
boolsurfacicHolesRemove surfacic holes.
doublemaxDiameterMaximum diameter of the holes to be removed (-1=no max diameter).
uintfillWithMaterialIf set, the given material will be used to fill the holes.

RepairCAD

Repair CAD shapes, assemble faces, remove duplicated faces, optimize loops and repair topology.
[HandleProcessCorruptedStateExceptions]public void RepairCAD(OccurrenceList occurrences, double tolerance, bool orient = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to clean.
doubletoleranceTolerance.
boolorientIf true reorient the model.

SegmentMesh

WARNING: this function is tagged as 'EXPERIMENTAL'
Segment Mesh into clusters guided by edge sharpnesses.
[HandleProcessCorruptedStateExceptions]public void SegmentMesh(OccurrenceList occurrences, bool overwriteLoI = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
booloverwriteLoIOverwrite the lines-of-interest parameters if true, else add them.

SetFeatureComponentMaxIndex

Remap Index map of each FeatureComponent of selected occurrences.
[HandleProcessCorruptedStateExceptions]public void SetFeatureComponentMaxIndex(OccurrenceList occurrences, int maxIndex)
Parameters

Type

Name

Description

OccurrenceListoccurrences
intmaxIndex

SetMeshVertexColors

Specify vertex colors for all meshes being children of the provided occurrence list.
[HandleProcessCorruptedStateExceptions]public void SetMeshVertexColors(OccurrenceList occurrences, ColorAlphaListList vertexColors)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences from which meshes are gathered.
ColorAlphaListListvertexColorsList of vertex color arrays for each occurrence.

SmoothMesh

[HandleProcessCorruptedStateExceptions]public void SmoothMesh(OccurrenceList occurrences, CostEvaluation mode, int maxIterations = 100, bool lockSignificantEdges = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
CostEvaluationmodeComputation of cost.
intmaxIterationsMaximum number of swapping iteration.
boollockSignificantEdgesForbid to swap significant edges (e.g. UV seams, sharp edges, patch borders, ...).

SplitUVForAtlas

[HandleProcessCorruptedStateExceptions]public void SplitUVForAtlas(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.

Sweep

WARNING: this function is tagged as 'EXPERIMENTAL'
Extrudes a circular section along an underlying polyline (curve).
[HandleProcessCorruptedStateExceptions]public void Sweep(OccurrenceList occurrences, double radius, int sides, bool createNormals, bool keepLines, bool generateUV)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to check.
doubleradiusRadius of cylinders.
intsidesNumber of points to create cylinders.
boolcreateNormals
boolkeepLines
boolgenerateUV

Tessellate

Create a tessellated representation from a CAD representation for each given part.
[HandleProcessCorruptedStateExceptions]public void Tessellate(OccurrenceList occurrences, double maxSag, double maxLength, double maxAngle, bool createNormals = true, UVGenerationMode uvMode = UVGenerationMode.NoUV, int uvChannel = 1, double uvPadding = 0, bool createTangents = false, bool createFreeEdges = false, bool keepBRepShape = true, bool overrideExistingTessellation = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to tessellate.
doublemaxSagMaximum distance between the geometry and the tessellation.
doublemaxLengthMaximum length of elements.
doublemaxAngleMaximum angle between normals of two adjacent elements.
boolcreateNormalsIf true, normals will be generated.
UVGenerationModeuvModeSelect the texture coordinates generation mode.
intuvChannelThe UV channel of the generated texture coordinates (if any).
doubleuvPaddingThe UV padding between UV island in UV coordinate space (between 0-1). This parameter is handled as an heuristic so it might not be respected.
boolcreateTangentsIf true, tangents will be generated.
boolcreateFreeEdgesIf true, free edges will be created for each patch borders.
boolkeepBRepShapeIf true, BRep shapes will be kept for Back to Brep or Retessellate.
booloverrideExistingTessellationIf true, already tessellated parts will be re-tessellated.

TessellatePointClouds

WARNING: this function is tagged as 'EXPERIMENTAL'
Tessellate point clouds to replace the geometry with a polygonal connect mesh.
[HandleProcessCorruptedStateExceptions]public void TessellatePointClouds(OccurrenceList occurrences, int kNeighbors = 20, bool keepPoints = false, bool colorize = true)
Parameters

Type

Name

Description

OccurrenceListoccurrences
intkNeighborsThe number of neighbor points used to compute normals.
boolkeepPointsKeep points after meshing if enabled.
boolcolorizeIf enabled, vertex colors will be generated on the resulting mesh.

TessellateRelativelyToAABB

Creates a tessellated representation from a CAD representation for each given part. It multiplies the length of the diagonal of the bounding box by the sagRatio. If the output value is above maxSag, then maxSag is used as tessellation value. Else if the output value is below maxSag, it is used as tessellation value.
[HandleProcessCorruptedStateExceptions]public void TessellateRelativelyToAABB(OccurrenceList occurrences, double maxSag, double sagRatio, double maxLength, double maxAngle, bool createNormals = true, UVGenerationMode uvMode = UVGenerationMode.NoUV, int uvChannel = 1, double uvPadding = 0, bool createTangents = false, bool createFreeEdges = false, bool keepBRepShape = true, bool overrideExistingTessellation = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to tessellate.
doublemaxSagMaximum distance between the geometry and the tessellation.
doublesagRatioMaximum ratio distance between the geometry and the tessellation.
doublemaxLengthMaximum length of elements.
doublemaxAngleMaximum angle between normals of two adjacent elements.
boolcreateNormalsIf true, normals will be generated.
UVGenerationModeuvModeSelect the texture coordinates generation mode.
intuvChannelThe UV channel of the generated texture coordinates (if any).
doubleuvPaddingThe UV padding between UV island in UV coordinate space (between 0-1). This parameter is handled as an heuristic so it might not be respected.
boolcreateTangentsIf true, tangents will be generated.
boolcreateFreeEdgesIf true, free edges will be created for each patch borders.
boolkeepBRepShapeIf true, BRep shapes will be kept for Back to Brep or Retessellate.
booloverrideExistingTessellationIf true, already tessellated parts will be re-tessellated.

TransferUV

Transfer UV from a mesh to another mesh.
[HandleProcessCorruptedStateExceptions]public void TransferUV(uint source, uint destination, int sourceChannel = 0, int destinationChannel = 0, double tolerance = 0.001)
Parameters

Type

Name

Description

uintsourceOccurrence of the source mesh.
uintdestinationOccurrence of the destination mesh.
intsourceChannelSource UV channel to bake.
intdestinationChannelDestination UV channel to bake to.
doubletoleranceGeometric tolerance for point projection.

VoxelizePointClouds

Explode point clouds to voxels.
[HandleProcessCorruptedStateExceptions]public void VoxelizePointClouds(OccurrenceList occurrences, double voxelSize = 500)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublevoxelSizeSize of voxels.

BakeAOMap

Ray tracing based ambient occlusion computation.
[HandleProcessCorruptedStateExceptions]public ImageList BakeAOMap(uint sessionId, int samples = 32, bool bentNormals = false, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
intsamplesNumber of rays cast for occlusion detection (must be a power of two in the range [8, 4096]).
boolbentNormalsIf true, bent normals are baked in addition to AO.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeDepthMap

Depth map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeDepthMap(uint sessionId, double normalizeValue = 1, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
doublenormalizeValueDivisor applied to depth values before storage to texture.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeDiffuseMap

Diffuse map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeDiffuseMap(uint sessionId, bool withTransparency = false, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
boolwithTransparencyIf true, surface transparency is stored in the alpha channel.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeDisplacementMap

Displacement map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeDisplacementMap(uint sessionId, bool normalize = true, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
boolnormalizeIf true, displacement vectors are remapped to [-1,1].
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeEmissiveMap

Emissive map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeEmissiveMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeFeatureMap

Feature map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeFeatureMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeMaterialAOMap

AO baking from the source material.
[HandleProcessCorruptedStateExceptions]public ImageList BakeMaterialAOMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeMaterialIdMap

Color map baking based on source material Ids.
[HandleProcessCorruptedStateExceptions]public ImageList BakeMaterialIdMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeMaterialPropertyMap

Baking of custom material properties.
[HandleProcessCorruptedStateExceptions]public ImageList BakeMaterialPropertyMap(uint sessionId, string propertyName, int nComponents = 3, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
stringpropertyNameName of the material property to bake (must be a color, a coeff or a texture).
intnComponentsExpected number of components per pixel for the resulting maps.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeMetallicMap

Metallic map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeMetallicMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeNormalMap

Normal map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeNormalMap(uint sessionId, Space sourceSpace = Space.Tangent, Space destinationSpace = Space.Tangent, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
SpacesourceSpaceThe space in which source normal vectors are defined.
SpacedestinationSpaceThe space in which destination normal vectors are defined.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeOccurrencePropertyMap

Occurrence property map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeOccurrencePropertyMap(uint sessionId, string propertyName, int nComponents = 3, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
stringpropertyNameName of the occurrence property to bake (must be a color, a coeff or a texture).
intnComponentsExpected number of components per pixel for the resulting maps.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeOpacityMap

Opacity map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeOpacityMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakePartIdMap

Color map baking based on the source part Ids.
[HandleProcessCorruptedStateExceptions]public ImageList BakePartIdMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakePositionMap

Position map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakePositionMap(uint sessionId, bool local = false, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
boollocalIf true, position is baked in local space, otherwise in global space.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeRoughnessMap

Roughness map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeRoughnessMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeSpecularMap

Specular map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeSpecularMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeUVMap

Source UV coordinates baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeUVMap(uint sessionId, int uvChannel = 0, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
intuvChannelThe channel from which UVs are baked.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeValidityMap

Validity map baking, distinguishing baked pixels from non baked pixels.
[HandleProcessCorruptedStateExceptions]public ImageList BakeValidityMap(uint sessionId, double validValue = 1, double invalidValue = 0)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
doublevalidValueValue used for filling baked texels.
doubleinvalidValueValue used for filling unbaked texels.
Returns

Type

Description

ImageList

BakeVertexColorMap

Vertex color map baking.
[HandleProcessCorruptedStateExceptions]public ImageList BakeVertexColorMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
ColorAlphadefaultColorColor used for filling unbaked texels.
Returns

Type

Description

ImageList

BeginBakingSession

Start a new baking session. This must be called prior to any of the bake*Something*Map function.
[HandleProcessCorruptedStateExceptions]public uint BeginBakingSession(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, int uvChannel = 0, int resolution = 1024, double rayOffset = 0, double rayMaxDist = -1, double opacityThreshold = -1, bool useCurrentPosition = false, bool shareMaps = true, ElementFilter sourceElements = ElementFilter.Polygons)
Parameters

Type

Name

Description

OccurrenceListdestinationOccurrencesOccurrences of the meshes where to store the baked map.
OccurrenceListsourceOccurrencesOccurrences of components from which to bake maps (if empty use destination).
intuvChannelUV channel of destOccurrence to use for the map generation.
intresolutionMap resolution.
doublerayOffsetOffset from source mesh.
doublerayMaxDistMaximum search distance for ray tracing during baking computation (-1 means infinity).
doubleopacityThresholdIf the opacity is under this threshold, considers as fully transparent and store the color behind the intersection.
booluseCurrentPositionUse the current position instead of the T-Pose of the input occurrence.
boolshareMapsIf true, all the destinationOccurrences will share the same maps.
ElementFiltersourceElementsDefines the type of elements from which baking is performed (polygons or points).
Returns

Type

Description

uint

BeginVertexBakingSession

Start a new baking session. This must be called prior to any of the bake*Something*Map function.
[HandleProcessCorruptedStateExceptions]public uint BeginVertexBakingSession(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, double rayOffset = 0, double rayMaxDist = -1, double opacityThreshold = -1, bool useCurrentPosition = false, ElementFilter sourceElements = ElementFilter.Polygons)
Parameters

Type

Name

Description

OccurrenceListdestinationOccurrencesOccurrences of the meshes where to store the baked map.
OccurrenceListsourceOccurrencesOccurrences of components from which to bake maps (if empty use destination).
doublerayOffsetOffset from source mesh.
doublerayMaxDistMaximum search distance for ray tracing during baking computation (-1 means infinity).
doubleopacityThresholdIf the opacity is under this threshold, considers as fully transparent and store the color behind the intersection.
booluseCurrentPositionUse the current position instead of the T-Pose of the input occurrence.
ElementFiltersourceElementsDefines the type of elements from which baking is performed (polygons or points).
Returns

Type

Description

uint

CombineMaterials

Combine materials found on occurrences subtrees into one baked material and assign it to part occurrences.
[HandleProcessCorruptedStateExceptions]public void CombineMaterials(OccurrenceList occurrences, BakeOption bakingOptions, bool overrideExistingUVs = true, bool singularizeOnAO = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesRoot occurrences to process.
BakeOptionbakingOptionsBaking options.
booloverrideExistingUVsIf true, use axis-aligned bounding box mapping to regenerate new UVs, instead of repacking existing ones from channel 0.
boolsingularizeOnAOIf true, singularize all instances in the selected subtree if we want to bake AO in the texture.

EndBakingSession

End and destroy an existing baking session.
[HandleProcessCorruptedStateExceptions]public void EndBakingSession(uint sessionId)
Parameters

Type

Name

Description

uintsessionIdId of the baking session to end.

FetchBakedMap

Returns information about one texel of a baked map (occurrence, polygon ID, parametric coordinates, material ID). Must be called inside a (begin/end)BakingSession block.
[HandleProcessCorruptedStateExceptions]public BakedValue FetchBakedMap(uint sessionId, uint x, uint y, uint mapId = 0)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
uintxX coordinate of the map pixel to fetch.
uintyY coordinate of the map pixel to fetch.
uintmapIdId of the map to fetch, if several are available.
Returns

Type

Description

BakedValue

FetchBakedVertex

Returns information about a baked vertex (occurrence, polygon ID, parametric coordinates, material ID). Must be called inside a (begin/end)BakingSession block.
[HandleProcessCorruptedStateExceptions]public BakedValue FetchBakedVertex(uint sessionId, uint n, uint dstId = 0)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
uintnID of the vertex to check.
uintdstIdId of the destination occurrence the vertex belongs to, if several are provided.
Returns

Type

Description

BakedValue

SetBakingSessionPadding

Change the dilation applied to maps baked from the given session. All maps baked after the call to this function will be affected by the new value. The default value of a newly created session is 2.
[HandleProcessCorruptedStateExceptions]public void SetBakingSessionPadding(uint sessionId, int padding)
Parameters

Type

Name

Description

uintsessionIdBaking session Id.
intpaddingNumber of pixels to fill around baked islands. -1 means infinite dilation.

ConvexDecomposition

WARNING: this function is tagged as 'EXPERIMENTAL'
Explode each mesh to approximated convex decomposition.
[HandleProcessCorruptedStateExceptions]public OccurrenceList ConvexDecomposition(OccurrenceList occurrences, int maxCount, int vertexCount, bool approximate, int resolution = 100000, double concavity = 0.001)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intmaxCountMaximum number of convex hull to generated.
intvertexCountMaximum number of vertices per convex hull.
boolapproximateApproximate method.
intresolutionResolution.
doubleconcavityConcavity.
Returns

Type

Description

OccurrenceList

ExplodeBodies

Explode all CAD Parts by body. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void ExplodeBodies(OccurrenceList occurrences, bool groupOpenShells = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
boolgroupOpenShellsGroup all open shells in one part.

ExplodeByMaterials

Explode all parts by material. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void ExplodeByMaterials(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.

ExplodeByTopoDimension

Separate polygons, lines and points into different occurrences.
[HandleProcessCorruptedStateExceptions]public OccurrenceList ExplodeByTopoDimension(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Returns

Type

Description

OccurrenceList

ExplodeByVertexCount

Explode part occurrences to respect a maximum vertex count.
[HandleProcessCorruptedStateExceptions]public void ExplodeByVertexCount(OccurrenceList occurrences, int maxVertexCount, int maxTriangleCount, bool countMergedVerticesOnce = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intmaxVertexCountThe maximum number of vertices by part.
intmaxTriangleCountThe maximum number of triangles by part (quadrangles count twice).
boolcountMergedVerticesOnceIf true, one vertex used in several triangles with different normals will be counted once (for Unity must be False).

ExplodeByVoxel

WARNING: this function is tagged as 'EXPERIMENTAL'
Explode parts by voxel. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void ExplodeByVoxel(OccurrenceList occurrences, double voxelSize)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublevoxelSizeVoxel size.

ExplodeConnectedMeshes

Explode connected set of polygons to part occurrences. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void ExplodeConnectedMeshes(OccurrenceList occurrences, bool explodeNonManifoldEdges = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
boolexplodeNonManifoldEdgesSplit connected components along non-manifold edges.

ExplodePatches

Explode all parts by patch.
[HandleProcessCorruptedStateExceptions]public void ExplodePatches(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.

CreateVisibilityInformation

Create visilibity information on part occurrences viewed from a set of camera automatically placed on a sphere around the scene.
[HandleProcessCorruptedStateExceptions]public void CreateVisibilityInformation(OccurrenceList occurrences, SelectionLevel level, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, uint root = 0, bool onHemisphereOnly = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to create visibility information on: Parts, Patches or Polygons.
intresolutionResolution of the visibility viewer.
intsphereCountNumber of viewpoints generated around the bounding sphere.
doublefovXHorizontal field of view (in degree).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
uintrootSpecify another root for occluder scene.
boolonHemisphereOnlyCreate viewpoints only in the Y+ hemisphere of the bounding sphere.

CreateVisibilityInformationAdvanced

Create visilibity information on part occurrences viewed from a set of voxel based view points.
[HandleProcessCorruptedStateExceptions]public void CreateVisibilityInformationAdvanced(OccurrenceList occurrences, SelectionLevel level, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = false, uint root = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to create visibility information on: Parts, Patches or Polygons.
doublevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
doubleminimumCavityVolumeMinimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are).
intresolutionResolution of the visibility viewer.
InnerOuterOptionmodeSelect where to place camera (all cavities, only outer or only inner cavities).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
uintrootSpecify another root for occluder scene.

CreateVisibilityInformationFromViewPoints

Create visilibity information on parts viewed from a given set of camera.
[HandleProcessCorruptedStateExceptions]public void CreateVisibilityInformationFromViewPoints(OccurrenceList occurrences, Point3List cameraPositions, Point3List cameraDirections, Point3List cameraUps, int resolution, double fovX = 90, bool considerTransparentOpaque = false, uint root = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
Point3ListcameraPositionsList of camera positions.
Point3ListcameraDirectionsList of camera directions.
Point3ListcameraUpsList of camera up vectors.
intresolutionResolution of the visibility viewer.
doublefovXHorizontal field of view (in degree).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
uintrootSpecify another root for occluder scene.

FindOccludedPartOccurrences

Get part occurrences not viewed from a sphere around the scene.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindOccludedPartOccurrences(OccurrenceList occurrences, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, uint root = 0, bool onHemisphereOnly = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
intresolutionResolution of the visibility viewer.
intsphereCountNumber of viewpoints generated around the bounding sphere.
doublefovXHorizontal field of view (in degree).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
uintrootSpecify another root for occluder scene.
boolonHemisphereOnlyCreate viewpoints only in the Y+ hemisphere of the bounding sphere.
Returns

Type

Description

OccurrenceList

FindOccludedPartOccurrencesAdvanced

Get part occurrences not viewed from a set of voxel based view points.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindOccludedPartOccurrencesAdvanced(OccurrenceList occurrences, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = false, uint root = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doublevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
doubleminimumCavityVolumeMinimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are).
intresolutionResolution of the visibility viewer.
InnerOuterOptionmodeSelect where to place camera (all cavities, only outer or only inner cavities).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
uintrootSpecify another root for occluder scene.
Returns

Type

Description

OccurrenceList

RemoveOccludedGeometries

Delete part occurrences, patches or polygons not viewed from a sphere around the scene.
[HandleProcessCorruptedStateExceptions]public BoolList RemoveOccludedGeometries(OccurrenceList occurrences, SelectionLevel level, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null, bool onHemisphereOnly = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to remove : Parts, Patches or Polygons.
intresolutionResolution of the visibility viewer.
intsphereCountNumber of viewpoints generated around the bounding sphere.
doublefovXHorizontal field of view (in degree).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
intadjacencyDepthMark neighbors polygons as visible.
OccurrenceListoccludersSpecify other occurrences for occluder scene.
boolonHemisphereOnlyCreate viewpoints only in the Y+ hemisphere of the bounding sphere.
Returns

Type

Description

BoolList

RemoveOccludedGeometriesAdvanced

Delete part occurrences, patches or polygons not seen from voxel based view points.
[HandleProcessCorruptedStateExceptions]public BoolList RemoveOccludedGeometriesAdvanced(OccurrenceList occurrences, SelectionLevel level, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to remove : Parts, Patches or Polygons.
doublevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
doubleminimumCavityVolumeMinimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are).
intresolutionResolution of the visibility viewer.
InnerOuterOptionmodeSelect where to place camera (all cavities, only outer or only inner cavities).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
intadjacencyDepthMark neighbors polygons as visible.
OccurrenceListoccludersSpecify other occurrences for occluder scene.
Returns

Type

Description

BoolList

RemoveOccludedGeometriesFromPoints

Delete part occurrences, patches or polygons not viewed from spheres generated with a set of camera position.
[HandleProcessCorruptedStateExceptions]public BoolList RemoveOccludedGeometriesFromPoints(OccurrenceList occurrences, SelectionLevel level, Point3List positions, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of parts to remove : Parts, Patches or Polygons.
Point3ListpositionsList of positions.
intresolutionResolution of the visibility viewer.
intsphereCountNumber of viewpoints generated around the bounding sphere.
doublefovXHorizontal field of view (in degree).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
intadjacencyDepthMark neighbors polygons as visible.
OccurrenceListoccludersSpecify other occurrences for occluder scene.
Returns

Type

Description

BoolList

RemoveOccludedGeometriesFromViewPoints

Delete part occurrences, patches or polygons not viewed from a set of camera position/orientation.
[HandleProcessCorruptedStateExceptions]public BoolList RemoveOccludedGeometriesFromViewPoints(OccurrenceList occurrences, SelectionLevel level, Point3List positions, Point3List directions, Point3List ups, int resolution, double fovX = 90, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to remove : Parts, Patches or Polygons.
Point3ListpositionsList of positions.
Point3ListdirectionsList of directions.
Point3ListupsList of up vectors.
intresolutionResolution of the visibility viewer.
doublefovXHorizontal field of view (in degree).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
intadjacencyDepthMark neighbors polygons as visible.
OccurrenceListoccludersSpecify other occurrences for occluder scene.
Returns

Type

Description

BoolList

CreateOcclusionMesh

WARNING: this function is tagged as 'EXPERIMENTAL'
Compute an occluder or an occludee with the occurrences selected.
[HandleProcessCorruptedStateExceptions]public uint CreateOcclusionMesh(OccurrenceList occurrences, CreateOccluder type, double voxelSize, int gap)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
CreateOccludertypeType of what we create.
doublevoxelSizeSize of voxels.
intgapDilation iterations on the voxel grid.
Returns

Type

Description

uint

DualContouring

WARNING: this function is tagged as 'EXPERIMENTAL'
Replace the tessellations of the selected parts by a retopology based on a dual-contouring.
[HandleProcessCorruptedStateExceptions]public uint DualContouring(OccurrenceList occurrences, double filteringSize, double voxelSize, double tolerance, bool sameSizeOnAllAxis)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of part to process.
doublefilteringSizeFiltering size - must be a multiple of 2 of voxelSize.
doublevoxelSizeVoxel size used for the reconstruction.
doubletoleranceTolerance for the quadric error used for the simplification of the octree.
boolsameSizeOnAllAxisIf true, use the maximum axis length of the AABB for all axis.
Returns

Type

Description

uint

MarchingCubes

Replace the tessellations of the selected parts by a marching cube representation.
[HandleProcessCorruptedStateExceptions]public uint MarchingCubes(OccurrenceList occurrences, double voxelSize, ElementFilter elements = ElementFilter.Polygons, int dilation = 0, bool surfacic = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublevoxelSizeSize of voxels.
ElementFilterelementsType of elements used to detect the voxels, polygons or points or hybrid.
intdilationDilation iterations on the voxel grid (only if surfacic=false).
boolsurfacicPrefer this mode if the source is surfacic, the result is not guaranteed to be watertight.
Returns

Type

Description

uint

ProxyMesh

Replace the tessellations of the selected parts by a proxy mesh based on a voxelization.
[HandleProcessCorruptedStateExceptions]public uint ProxyMesh(OccurrenceList occurrences, double voxelSize, ElementFilter elements = ElementFilter.Polygons, int dilation = 0, bool surfacic = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublevoxelSizeSize of voxels.
ElementFilterelementsType of elements used to detect the voxels, polygons or points or hybrid.
intdilationDilation iterations on the voxel grid (only if surfacic=false).
boolsurfacicPrefer this mode if the source is surfacic, the result is not guaranteed to be watertight.
Returns

Type

Description

uint

Retopologize

WARNING: this function is tagged as 'EXPERIMENTAL'
Replace the tessellations of the selected parts by a retopology of the external hull.
[HandleProcessCorruptedStateExceptions]public uint Retopologize(OccurrenceList occurrences, int targetTriangleCount, bool pureQuad, bool pointCloud, double precision = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
inttargetTriangleCountTarget triangle count.
boolpureQuadRetopologize to a pure quad mesh if True, else the resulting mesh will be quad dominant but can contains triangles.
boolpointCloudSet to true if occurrences are point cloud, else False.
doubleprecisionIf set, define the precision of the features to preserve.
Returns

Type

Description

uint

Voxelize

Replace the tessellations of the selected parts by a voxelization of the external skin.
[HandleProcessCorruptedStateExceptions]public uint Voxelize(OccurrenceList occurrences, double voxelSize, ElementFilter elements = ElementFilter.Polygons, int dilation = 0, bool useCurrentAnimationPosition = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublevoxelSizeSize of voxels.
ElementFilterelementsType of elements used to detect the voxels, polygons or points or hybrid.
intdilationDilation iterations on the voxel grid.
booluseCurrentAnimationPositionUse the current animation position instead of the t-pose.
Returns

Type

Description

uint

ReplaceBy

Replace geometries by other shapes, or primitives.
[HandleProcessCorruptedStateExceptions]public void ReplaceBy(OccurrenceList occurrences, ReplaceByOption replaceBy)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.
ReplaceByOptionreplaceByShape replacement option.

ReplaceByBox

Replace objects by a bounding box.
[HandleProcessCorruptedStateExceptions]public void ReplaceByBox(OccurrenceList occurrences, ReplaceByBoxType boxType)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.
ReplaceByBoxTypeboxTypeBounding box type, oriented, axis-aligned, ...

ReplaceByConvexHull

WARNING: this function is tagged as 'EXPERIMENTAL'
Replace objects by convex hull.
[HandleProcessCorruptedStateExceptions]public void ReplaceByConvexHull(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.

ReplaceByPrimitive

Replace objects by a primitive shapes.
[HandleProcessCorruptedStateExceptions]public void ReplaceByPrimitive(OccurrenceList occurrences, PrimitiveShapeParameters primitive, bool generateUV = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.
PrimitiveShapeParametersprimitivePrimitive type and parameters.
boolgenerateUVPrimitive type and parameters.

SawWithAABB

Saw the mesh with an axis-aligned bounding box. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void SawWithAABB(OccurrenceList occurrences, AABB aabb, SawingMode mode, string innerSuffix = "_inner", string outerSuffix = "_outer")
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
AABBaabbAxis-Aligned Bounding Box.
SawingModemodeThe sawing mode.
stringinnerSuffixOnly if mode is set to SawAndSplit, set the suffix of the inner part.
stringouterSuffixOnly if mode is set to SawAndSplit, set the suffix of the outer part.

SawWithOBB

Saw the mesh with an oriented bounding box. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void SawWithOBB(OccurrenceList occurrences, OBB obb, SawingMode mode, string innerSuffix = "_inner", string outerSuffix = "_outer")
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
OBBobbMinimum Bounding Box.
SawingModemodeThe sawing mode.
stringinnerSuffixOnly if mode is set to SawAndSplit, set the suffix of the inner part.
stringouterSuffixOnly if mode is set to SawAndSplit, set the suffix of the outer part.

SawWithOctree

Saw and split the mesh with an octree. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public uint SawWithOctree(OccurrenceList occurrences, AABB aabb, int maxDepth, int maxTrianglesByLeaf = -1, double sawTolerance = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
AABBaabbOctree Bounding Box.
intmaxDepthDepth of the octree.
intmaxTrianglesByLeafSet the maximum triangle count on the leaf of the octree ( -1 to not use ).
doublesawToleranceSize in mm of the tolerance of the saw.
Returns

Type

Description

uint

SawWithPlane

Saw the mesh with a plane. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions]public void SawWithPlane(OccurrenceList occurrences, Point3 planeOrigin, Point3 planeNormal, SawingMode mode, string innerSuffix = "_inner", string outerSuffix = "_outer", double tolerance = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Point3planeOriginThe plane origin.
Point3planeNormalThe plane normal.
SawingModemodeThe sawing mode.
stringinnerSuffixOnly if mode is set to SawAndSplit, set the suffix of the inner part.
stringouterSuffixOnly if mode is set to SawAndSplit, set the suffix of the outer part.
doubletoleranceSet a tolerance to make the saw lose.

ConvertSimilarPartOccurrencesToInstances

Create instances from similar part occurrences with an accurate method based on topology checksums. This can be used to repair instances or to simplify a model that has similar parts that could be instantiated instead to reduce the number of unique meshes (reduces drawcalls, GPU memory usage and file size).
[HandleProcessCorruptedStateExceptions]public void ConvertSimilarPartOccurrencesToInstances(OccurrenceList occurrences, bool checkMeshTopo, bool checkVertexPositions, int vertexPositionPrecision, bool checkUVTopo, bool checkUVVertexPositions, int UVPositionprecision)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrence for which we want to find similar parts and create instances using prototypes.
boolcheckMeshTopo
boolcheckVertexPositions
intvertexPositionPrecision
boolcheckUVTopo
boolcheckUVVertexPositions
intUVPositionprecision

ConvertSimilarPartOccurrencesToInstancesFast

Create instances from similar part occurrences with a fast but approximate method. This can be used to repair instances or to simplify a model that has similar parts that could be instantiated instead to reduce the number of unique meshes (reduces drawcalls, GPU memory usage and file size). Using 1.0 (100%) in all similarity criteria is non destructive. Using lower values will help finding more similar parts, even if their polycount or dimensions varies a bit.
[HandleProcessCorruptedStateExceptions]public void ConvertSimilarPartOccurrencesToInstancesFast(OccurrenceList occurrences, double dimensionsSimilarity, double polycountSimilarity, bool ignoreSymmetry)
Parameters

Type

Name

Description

OccurrenceListoccurrencesRoot occurrences for which we want to find similar part occurrences and create instances using prototypes.
doubledimensionsSimilarityThe percentage of similarity on dimensions. A value of 1.0 (100%) will find parts that have exactly the same dimensions. A lower value will increase the likelihood to find similar parts, at the cost of precision.
doublepolycountSimilarityThe percentage of similarity on polycount. A value of 1.0 (100%) will find parts that have exactly the same polycount. A lower value will increase the likelihood to find similar parts, at the cost of precision.
boolignoreSymmetryIf True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.

FindSimilarPartOccurrencesFast

Find part occurrences in the whole scene that are similar to the input part occurrences. If multiple part occurrences are passed as input, the output will contain similar part occurrences corresponding to each input part occurrence.
[HandleProcessCorruptedStateExceptions]public OccurrenceList FindSimilarPartOccurrencesFast(OccurrenceList occurrences, double dimensionsSimilarity, double polycountSimilarity, bool ignoreSymmetry)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences for which we want to find similar part occurrences in the scene.
doubledimensionsSimilarityThe percentage of similarity on dimensions. A value of 1.0 (100%) will find parts that have exactly the same dimensions. A lower value will increase the likelihood to find similar parts, at the cost of precision.
doublepolycountSimilarityThe percentage of similarity on polycount. A value of 1.0 (100%) will find parts that have exactly the same polycount. A lower value will increase the likelihood to find similar parts, at the cost of precision.
boolignoreSymmetryIf True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
Returns

Type

Description

OccurrenceList

AlignUVIslands

WARNING: this function is tagged as 'EXPERIMENTAL'
Align with the axes the UVs of the islands.
[HandleProcessCorruptedStateExceptions]public void AlignUVIslands(OccurrenceList occurrences, int channel = 0, double usePolygonsWeights = 0, double useVerticesWeights = 0, AlignmentMode alignmentMode = AlignmentMode.Auto)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelUV channel to merge.
doubleusePolygonsWeightsUse polygons weights to give more importance to what must be aligned.
doubleuseVerticesWeightsUse vertices weights to give more importance to what must be aligned.
AlignmentModealignmentModeWith which axis the UVs should be aligned.

ApplyUvTransform

Apply a transformation matrix on texture coordinates.
[HandleProcessCorruptedStateExceptions]public void ApplyUvTransform(OccurrenceList occurrences, Matrix4 matrix, int channel = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Matrix4matrixTransformationmatrix.
intchannelUV channel to transform.

AutomaticUVMapping

WARNING: this function is tagged as 'EXPERIMENTAL'
Generates the texture coordinates and automatically find seams.
[HandleProcessCorruptedStateExceptions]public void AutomaticUVMapping(OccurrenceList occurrences, int channel = 0, double maxAngleDistorsion = 0.5, double maxAreaDistorsion = -1, bool sharpToSeam = true, bool forbidOverlapping = true, uint resolution = 1024, uint padding = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelThe UV channel which will contains the texture coordinates.
doublemaxAngleDistorsionMaximum angle distorsion2PI-SumVtxAng/2PI.
doublemaxAreaDistorsionMaximum area distorsion before scale to 1.2DArea-3DArea/3DArea.
boolsharpToSeamIf enabled, sharp edges are automatically considered as UV seams.
boolforbidOverlappingIf enabled, UV cannot overlap.
uintresolutionResolution wanted for the final map when repacking at the end.
uintpaddingSet the padding (in pixels) between UV islands when repacking at the end.

CopyUV

Copy an UV channel to another UV channel.
[HandleProcessCorruptedStateExceptions]public void CopyUV(OccurrenceList occurrences, int sourceChannel = 0, int destinationChannel = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intsourceChannelThe source UV channel to copy.
intdestinationChannelThe destination UV channel to copy into.

GetRatioUV3D

Compute the ratio between the UV and the 3D size.
[HandleProcessCorruptedStateExceptions]public DoubleList GetRatioUV3D(OccurrenceList occurrences, RatioUV3DMode ratioMode, int channel = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
RatioUV3DModeratioModeChoose how to compute the ratio.
intchannelUV channel to use.
Returns

Type

Description

DoubleList

GetUVQualityMetrics

Compute UV mapping qualitative metrics.
[HandleProcessCorruptedStateExceptions]public GetUVQualityMetricsReturn GetUVQualityMetrics(OccurrenceList occurrences, uint channel)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
uintchannelUV channel to use.
Returns

GetUvAabr

Compute the UV Axis Aligned Bounding Rectangle of a set of occurrences.
[HandleProcessCorruptedStateExceptions]public AABR GetUvAabr(OccurrenceList occurrences, int channel = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelUV channel to transform.
Returns

Type

Description

AABR

HasOverlappingUV

Check if a UV channel contains overlapping UVs.
[HandleProcessCorruptedStateExceptions]public bool HasOverlappingUV(OccurrenceList occurrences, uint channel, uint resolution = 1024)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
uintchannelUV channel to use.
uintresolutionResolution of rasterization grid used to check for overlaps.
Returns

Type

Description

bool

MapUvOnAABB

Generate texture coordinates using the projection on object Axis Aligned Bounding Box.
[HandleProcessCorruptedStateExceptions]public void MapUvOnAABB(OccurrenceList occurrences, bool useLocalAABB, double uv3dSize, int channel = 0, bool overrideExistingUVs = true, bool ignoreScale = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
booluseLocalAABBIf enabled, uses part own bounding box, else use global one.
doubleuv3dSize3D size of the UV space [0-1].
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.
boolignoreScaleIf this and useLocalAABB are true, ignore local scale.

MapUvOnBox

Generate texture coordinates using the projection on a box.
[HandleProcessCorruptedStateExceptions]public void MapUvOnBox(OccurrenceList occurrences, Box box, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
BoxboxBox definition.
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MapUvOnCubicAABB

Generate texture coordinates using the projection on object AABB, with same scale on each axis.
[HandleProcessCorruptedStateExceptions]public void MapUvOnCubicAABB(OccurrenceList occurrences, double uv3dSize, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doubleuv3dSize3D size of the UV space [0-1].
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MapUvOnCustomAABB

Generate texture coordinates using the projection on custom AABB.
[HandleProcessCorruptedStateExceptions]public void MapUvOnCustomAABB(OccurrenceList occurrences, AABB aabb, double uv3dSize, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
AABBaabbAxis aligned bounding box to project on.
doubleuv3dSize3D size of the UV space [0-1].
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MapUvOnCylinder

Generate texture coordinates using the projection on a cylinder.
[HandleProcessCorruptedStateExceptions]public void MapUvOnCylinder(OccurrenceList occurrences, Cylinder cylinder, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
CylindercylinderCylinder definition.
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MapUvOnFittingCylinder

Generate texture coordinates using the projection on a fitting cylinder.
[HandleProcessCorruptedStateExceptions]public void MapUvOnFittingCylinder(OccurrenceList occurrences, int channel = 0, bool overrideExistingUVs = true, bool useAABB = true, Point3? forcedAxis = null)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.
booluseAABBIf true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).
Point3forcedAxisForced axis of the Cylinder.

MapUvOnFittingSphere

Generate texture coordinates using the projection on a fitting sphere.
[HandleProcessCorruptedStateExceptions]public void MapUvOnFittingSphere(OccurrenceList occurrences, int channel = 0, bool overrideExistingUVs = true, bool useAABB = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.
booluseAABBIf true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).

MapUvOnMBB

Generate texture coordinates using the projection on object Minimum Bounding Box.
[HandleProcessCorruptedStateExceptions]public void MapUvOnMBB(OccurrenceList occurrences, bool useLocalMBB, double uv3dSize, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
booluseLocalMBBIf enabled, uses part own bounding box, else use global one.
doubleuv3dSize3D size of the UV space [0-1].
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MapUvOnPlane

Generate texture coordinates using the projection on a plane.
[HandleProcessCorruptedStateExceptions]public void MapUvOnPlane(OccurrenceList occurrences, Plane plane, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
PlaneplanePlane definition.
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MapUvOnSphere

Generate texture coordinates using the projection on a sphere.
[HandleProcessCorruptedStateExceptions]public void MapUvOnSphere(OccurrenceList occurrences, Sphere sphere, int channel = 0, bool overrideExistingUVs = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
SpheresphereSphere definition.
intchannelThe UV channel which will contains the texture coordinates.
booloverrideExistingUVsIf True, override existing UVs on channel.

MergeUVIslandsAffine

WARNING: this function is tagged as 'EXPERIMENTAL'
Minimizes the number of seams in the UV mapping by merging UV islands using affine transformation (recommanded for hard surfaces).
[HandleProcessCorruptedStateExceptions]public void MergeUVIslandsAffine(OccurrenceList occurrences, int channel = 0, double scaleWeights = 0, double maxScaleVariationFactor = 1.2, double curvatureWeights = -1, double usePolygonsWeights = 1, double useVerticesWeights = -1, TransformationType allowedTransformations = TransformationType.TRSOnly, bool allowUVInversion = false, double rotationStep = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelUV channel to merge.
doublescaleWeightsWeight to assign to scale for the merging priority.
doublemaxScaleVariationFactorMaximum scaling factor allowed, -1 meaning no limits.
doublecurvatureWeightsWeight to assign to curvature for the merging priority.
doubleusePolygonsWeightsUse polygons weights to prioritize seams between polygons with less weight. The value represents the feature weight.
doubleuseVerticesWeightsUse vertices weights to prioritize seams where vertices with less weight. The value represents the feature weight.
TransformationTypeallowedTransformationsAllowed transformation: TRSOnly or TRS+Skew.
boolallowUVInversionAllow merged UVs to be inverted.
doublerotationStepConstrains rotation steps to the specified angle (in degrees). If set to -1, allows free rotation.

MergeUVIslandsRelaxed

Minimizes the number of seams in the UV mapping by merging UV islands using local reparametrization near the UV seams (recommanded for organic surfaces).
[HandleProcessCorruptedStateExceptions]public void MergeUVIslandsRelaxed(OccurrenceList occurrences, int channel, int targetIslandCount = 0, double energyThreshold = 0.01, bool forceIsolatedFaces = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelUV channel to use.
inttargetIslandCountTarget number of islands (zero means the algorithm runs until no more merging is possible).
doubleenergyThresholdMax energy allowed during local reparametrization.
boolforceIsolatedFacesUV islands consisting in a single isolated face completely surrounded by another island are forced to be merged, without reparametrization.

NormalizeUV

Normalize UVs to fit in the [0-1] uv space.
[HandleProcessCorruptedStateExceptions]public void NormalizeUV(OccurrenceList occurrences, int sourceUVChannel, int destinationUVChannel = -1, bool uniform = true, bool sharedUVSpace = true, bool ignoreNullIslands = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intsourceUVChannelUV Channel to normalize.
intdestinationUVChannelUV channel to store the normalized UV (if -1, sourceUVChannel will be replaced).
booluniformIf true, the scale will be uniform. Else UV can be deformed with a non-uniform scale.
boolsharedUVSpaceIf true, all parts will be processed as if they were merged to avoid overlapping of their UV coordinates.
boolignoreNullIslandsIf true, islands with null height and width will be ignored and their UV coordinates will be set to [0,0] (Slower if enabled).

RemoveUV

Remove one or all UV channel(s).
[HandleProcessCorruptedStateExceptions]public void RemoveUV(OccurrenceList occurrences, int channel = -1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelThe UV channel to remove (all if channel=-1).

RepackUV

Pack existing UV (create atlas).
[HandleProcessCorruptedStateExceptions]public OccurrenceList RepackUV(OccurrenceList occurrences, int channel = 0, bool shareMap = true, int resolution = 1024, uint padding = 2, bool uniformRatio = false, int iterations = 3, bool removeOverlaps = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intchannelThe UV channel to repack.
boolshareMapIf True, the UV of all given parts will be packed together.
intresolutionResolution wanted for the final map.
uintpaddingSet the padding (in pixels) between UV islands.
booluniformRatioIf true, UV of different part will have the same ratio.
intiterationsFitting iterations.
boolremoveOverlapsRemove overlaps to avoid multiple triangles UVs to share the same pixel.
Returns

Type

Description

OccurrenceList

ResizeUVsToTextureSize

Rescale the UV coordinates to fit the input texture size.
[HandleProcessCorruptedStateExceptions]public void ResizeUVsToTextureSize(OccurrenceList occurrences, double TextureSize, int channel = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to use for the rescaling.
doubleTextureSizeTexture size to use for the UV coordinates (in millimeters).
intchannelUV channel to use.

ScaleUV

Apply a scale on texture coordinates.
[HandleProcessCorruptedStateExceptions]public void ScaleUV(OccurrenceList occurrences, double scaleU, double scaleV, int channel = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
doublescaleUScale to apply to U coordinate.
doublescaleVScale to apply to V coordinate.
intchannelUV channel to transform.

SwapUvChannels

Swap two UV channels.
[HandleProcessCorruptedStateExceptions]public void SwapUvChannels(OccurrenceList occurrences, int firstChannel, int secondChannel)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
intfirstChannelFirst UV Channel to swap.
intsecondChannelSecond UV Channel to swap.

UnwrapUV

WARNING: this function is tagged as 'EXPERIMENTAL'
Unwrap UV islands.
[HandleProcessCorruptedStateExceptions]public void UnwrapUV(OccurrenceList occurrences, UnwrapUVMethod method, int channel = -1, bool createSeamsFromLoI = false, int iterMax = 50, double tolerance = 1E-05)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
UnwrapUVMethodmethodMinimization method to use for unwrapping (isometric or conformal).
intchannelThe UV channel which will contains the texture coordinates.
boolcreateSeamsFromLoIUse Lines of Interest to generate UV islands.
intiterMaxFor iterative solvers: set the maximum number of iterations allowed.
doubletoleranceFor iterative solvers: set the maximum error threshold.

GetFittingCylinder

Returns the fitting cylinder of a set of occurrences (based on MBB).
[HandleProcessCorruptedStateExceptions]public Affine GetFittingCylinder(OccurrenceList occurrences, bool useAABB = true, Point3? forcedAxis = null)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to fit.
booluseAABBIf true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).
Point3forcedAxisForced axis of the Cylinder when using MBB.
Returns

Type

Description

Affine

GetFittingSphere

Returns the fitting sphere of a set of occurrences.
[HandleProcessCorruptedStateExceptions]public Affine GetFittingSphere(OccurrenceList occurrences, bool useAABB = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to fit.
booluseAABBIf true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).
Returns

Type

Description

Affine

ConvertNormalMap

Convert an existing normal map between Object-space and Tangent-space.
[HandleProcessCorruptedStateExceptions]public uint ConvertNormalMap(OccurrenceList partOccurrences, uint normalMap, int uvChannel = 0, Space sourceSpace = Space.Object, Space destinationSpace = Space.Tangent, bool sourceIsRightHanded = true, bool destinationIsRightHanded = true, bool replaceMap = true, int resolution = -1, int padding = 1)
Parameters

Type

Name

Description

OccurrenceListpartOccurrencesOccurrences of components using the given map.
uintnormalMapSource normal map to convert.
intuvChannelUV channel used on the given map.
SpacesourceSpaceDefines the space (object, world or tangent) from which the given normalMap is converted.
SpacedestinationSpaceDefines the space (object, world or tangent) to which the given normalMap is converted.
boolsourceIsRightHandedConsiders source normal map as part of a right-handed coordinates system.
booldestinationIsRightHandedGenerate destination normal map as part of a right-handed coordinates system.
boolreplaceMapIf true, the given normalMap will be replaced by the converted one.
intresolutionNew map resolution (if replaceMap=false), if resolution=-1, the input resolution will be used.
intpaddingNumber of pixels to add for padding. A negative value means that the texture will be filled, and the padding for uv island is the absolute value.
Returns

Type

Description

uint

CreateBillboard

Create a billboard imposter.
[HandleProcessCorruptedStateExceptions]public uint CreateBillboard(OccurrenceList occurrences, int resolution = 1024, bool XPositive = true, bool XNegative = true, bool YPositive = true, bool YNegative = true, bool ZPositive = true, bool ZNegative = true, bool moveFacesToCenter = true, bool leftHandedNormalMap = false)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to bake in the billboard.
intresolutionTotal resolution of the billboard (contains all wanted faces).
boolXPositiveBake face facing X+.
boolXNegativeBake face facing X-.
boolYPositiveBake face facing Y+.
boolYNegativeBake face facing Y-.
boolZPositiveBake face facing Z+.
boolZNegativeBake face facing Z-.
boolmoveFacesToCenterIf true, all face are moved to the center of the AABB of the occurrences, else it will shape an AABB.
boolleftHandedNormalMapIf true, a left handed normal map will be generated.
Returns

Type

Description

uint

FillNormalMap

WARNING: this function is tagged as 'EXPERIMENTAL'
Fill normal map (useful after a decimation for example).
[HandleProcessCorruptedStateExceptions]public void FillNormalMap(uint normalMap)
Parameters

Type

Name

Description

uintnormalMapSource normal map to convert.

OrientNormalMap

WARNING: this function is tagged as 'EXPERIMENTAL'
Orient a tangent space normal map (all Z positive).
[HandleProcessCorruptedStateExceptions]public void OrientNormalMap(uint normalMap)
Parameters

Type

Name

Description

uintnormalMapNormal map to orient.

BarySmooth

Smooth the tessellations by moving the vertices to the barycenter of their neighbors.
[HandleProcessCorruptedStateExceptions]public void BarySmooth(OccurrenceList occurrences, int iteration = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
intiterationNumber of iterations.

CrackMoebiusStrips

Remove moebius strip by topologically cracking them (make it orientable).
[HandleProcessCorruptedStateExceptions]public void CrackMoebiusStrips(OccurrenceList occurrences, int maxEdgeCount = 3)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
intmaxEdgeCountMaximum number of edges to crack to remove one moebius strip.

CrackNonManifoldVertices

Splits non-manifold vertices.
[HandleProcessCorruptedStateExceptions]public void CrackNonManifoldVertices(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.

CreateCavityOccurrences

Identify cavities and create occurrences to show them.
[HandleProcessCorruptedStateExceptions]public uint CreateCavityOccurrences(OccurrenceList occurrences, double voxelSize, double minimumCavityVolume, InnerOuterOption mode = InnerOuterOption.All, uint parent = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences set to identify cavities.
doublevoxelSizeSize of the voxels in mm.
doubleminimumCavityVolumeMinimum volume of a cavity in cubic meter.
InnerOuterOptionmodeSelect where to place camera (all cavities, only outer or only inner cavities).
uintparentThe create occurrence root will be added under the parent if given, else it will be added under the deeper parent of given occurrences.
Returns

Type

Description

uint

InvertPolygonFacesOrientation

Invert the orientation of tessellation elements.
[HandleProcessCorruptedStateExceptions]public void InvertPolygonFacesOrientation(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

MoebiusCracker

Splits moebius ring.
[HandleProcessCorruptedStateExceptions]public void MoebiusCracker(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.

OrientNormals

Orient existing normal according to the polygons clockwise.
[HandleProcessCorruptedStateExceptions]public void OrientNormals(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to orient normals.

RemeshSurfacicHoles

WARNING: this function is tagged as 'EXPERIMENTAL'
Resmesh surfacic holes of tessellations.
[HandleProcessCorruptedStateExceptions]public void RemeshSurfacicHoles(OccurrenceList occurrences, double maxDiameter = 0, bool refine = true, int numberOfNeighbors = 3, uint fillWithMaterial = 0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doublemaxDiameterMaximum surfacic holes diameters.
boolrefineRefine mesh for more details in holes.
intnumberOfNeighborsNumber of neighboring vertices to use for the MLS projection.
uintfillWithMaterialIf set, the given material will be used to fill the holes.

RemoveDegeneratedPolygons

Remove some kinds of degenerated polygons.
[HandleProcessCorruptedStateExceptions]public void RemoveDegeneratedPolygons(OccurrenceList occurrences, double tolerance)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doubletoleranceDegenerated tolerance.

RemoveMultiplePolygon

Remove multiple polygon.
[HandleProcessCorruptedStateExceptions]public void RemoveMultiplePolygon(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.

RemoveZFighting

Remove Z-fighting (surfaces overlapping) by slightly shrinking the selected parts' surfaces.
[HandleProcessCorruptedStateExceptions]public double RemoveZFighting(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to process.
Returns

Type

Description

double

RepairMesh

Launch the repair process to repair a disconnected or not clean tessellation.
[HandleProcessCorruptedStateExceptions]public void RepairMesh(OccurrenceList occurrences, double tolerance, bool crackNonManifold = true, bool orient = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doubletoleranceConnection tolerance.
boolcrackNonManifoldAt the end of the repair process, crack resulting non-manifold edges.
boolorientIf true reorient the model.

RepairNullNormals

Create normal on an existing normal set when normal is null (polygons appears black).
[HandleProcessCorruptedStateExceptions]public void RepairNullNormals(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair null normals.

SeparateToManifold

WARNING: this function is tagged as 'EXPERIMENTAL'
Remove non manifold edges and try to reconnect manifold groups of triangles.
[HandleProcessCorruptedStateExceptions]public void SeparateToManifold(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

SewBoundary

Sew boundaries between them.
[HandleProcessCorruptedStateExceptions]public void SewBoundary(OccurrenceList occurrences, double maxDistance)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
doublemaxDistanceMaximum distance between bundaries.

VertexOffset

Move the vertices by the offsset along their normal.
[HandleProcessCorruptedStateExceptions]public void VertexOffset(OccurrenceList occurrences, double offset = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to process.
doubleoffsetDisplacement.

OrientFromFace

Orient all connected polygons in the same orientation of the polygon selectionned.
[HandleProcessCorruptedStateExceptions]public void OrientFromFace()

OrientPolygonFaces

Orient tessellation elements.
[HandleProcessCorruptedStateExceptions]public void OrientPolygonFaces(OccurrenceList occurrences, bool makeOrientable = true, bool useArea = false, OrientStrategy orientStrategy = OrientStrategy.ExteriorOnly)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolmakeOrientableCrack moebius strips to make the model orientable.
booluseAreaUse the area instead of counting the number of triangle.
OrientStrategyorientStrategyStrategy to adopt with this algorithm.

OrientPolygonFacesAdvanced

Properly orient all polygons in the same direction, using voxel based view points placement.
[HandleProcessCorruptedStateExceptions]public void OrientPolygonFacesAdvanced(OccurrenceList occurrences, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = true, OrientStrategyAdvanced orientStrategy = OrientStrategyAdvanced.VisibilityByConnected)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to orient.
doublevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
doubleminimumCavityVolumeMinimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are).
intresolutionResolution of the visibility viewer.
InnerOuterOptionmodeSelect where to place camera (all cavities, only outer or only inner cavities).
boolconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OrientStrategyAdvancedorientStrategyStrategy to adopt with this algorithm.

OrientPolygonFacesFromCamera

Properly orient all polygons in the same direction, using a specified viewpoint.
[HandleProcessCorruptedStateExceptions]public void OrientPolygonFacesFromCamera(OccurrenceList occurrences, Point3 cameraPosition, Point3 cameraDirection, Point3 cameraUp, int resolution, double fovX = 90)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to orient.
Point3cameraPositionCamera position.
Point3cameraDirectionCamera direction.
Point3cameraUpCamera up vector.
intresolutionResolution of the visibility viewer.
doublefovXHorizontal field of view (in degree).

Equilateralize

Sswap edges to make triangles more equilateral.
[HandleProcessCorruptedStateExceptions]public void Equilateralize(OccurrenceList occurrences, int maxIterations = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
intmaxIterationsMaximum number of swapping iteration.

Quadify

Merge all triangle polygons in the meshes to quadrangles.
[HandleProcessCorruptedStateExceptions]public void Quadify(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

Requadify

Advanced function to requadify a triangle tessellation coming from full quad mesh.
[HandleProcessCorruptedStateExceptions]public void Requadify(OccurrenceList occurrences, bool forceFullQuad = true)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
boolforceFullQuadForce the results to be only full quad. It it's impossible, nothing is done.

Triangularize

Split all non-triangle polygons in the meshes to triangles.
[HandleProcessCorruptedStateExceptions]public void Triangularize(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

CreateVertexWeightsFromVertexColors

Use vertex colors attributes on meshes of the given occurrence to create vertex weights attributes used by the decimation functions, the finals weights will be computed with w = offset + (red - blue) * scale.
[HandleProcessCorruptedStateExceptions]public void CreateVertexWeightsFromVertexColors(OccurrenceList occurrences, double offset = 0, double scale = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doubleoffsetOffset value for weight computation.
doublescaleScale value for weight computation.

CreateVertexWeightsFromVisibilityAttributes

Use visibility attributes on meshes of the given occurrence to create vertex weights attributes used by the decimation functions. The finals weights will be computed with w = offset + (visibility/maxVisibility) * scale.
[HandleProcessCorruptedStateExceptions]public void CreateVertexWeightsFromVisibilityAttributes(OccurrenceList occurrences, double offset = 0, double scale = 1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
doubleoffsetOffset value for weight computation.
doublescaleScale value for weight computation.

DeleteVertexWeights

Remove any existing vertex weights attributes on given occurrences.
[HandleProcessCorruptedStateExceptions]public void DeleteVertexWeights(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

CreateVisibilityAttributes

Create visibility attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void CreateVisibilityAttributes(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.

DeletePolygonalWeightAttribute

WARNING: this function is tagged as 'EXPERIMENTAL'
Delete Polygonal Weight attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeletePolygonalWeightAttribute(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete attributes.

DeleteVisibilityAttributes

Delete visibility attributes on tessellations.
[HandleProcessCorruptedStateExceptions]public void DeleteVisibilityAttributes(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete attributes.

FlagVisibilityAttributesOnTransparents

Add one count to all visiblility attributes (poly and patch) on transparent patches.
[HandleProcessCorruptedStateExceptions]public void FlagVisibilityAttributesOnTransparents(OccurrenceList occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.

TransferVisibilityToPolygonalWeight

WARNING: this function is tagged as 'EXPERIMENTAL'
Set Polygonal Weight Attribute from Visibility Attribute.
[HandleProcessCorruptedStateExceptions]public void TransferVisibilityToPolygonalWeight(OccurrenceList occurrences, VisibilityToWeightMode Mode)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
VisibilityToWeightModeModeMode used to compute visibility.