Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

Algo

Python API functions
Read time 96 minutesLast updated 21 hours ago

assembleCAD

Assemble faces of CAD shapes.
algo.assembleCAD(occurrences, tolerance=0.1, removeDuplicatedFaces=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to assemble.
DistancetoleranceAssembling tolerance.
BooleanremoveDuplicatedFacesIf True, duplicated faces will be removed.

backToInitialBRep

Create the BRep shape from a Tessellated shape with Domain Patch Attributes (after tessellate).
algo.backToInitialBRep(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

bakeImpostor

Bakes impostors textures.
algo.bakeImpostor(occurrence, XFrames, YFrames, hemi=False, resolution=1024, padding=0, roughness=False, metallic=False, ao=False) -> algo.OctahedralImpostor
Parameters

Type

Name

Description

Occurrenceoccurrence
IntXFrames
IntYFrames
Boolhemi
Intresolution
Intpadding
Booleanroughness
Booleanmetallic
Booleanao
Returns

Type

Name

Description

OctahedralImpostoroctahedralImpThe structure containing impostor data.

bakeVertexAttributes

Bake vertex attributes on meshes from other meshes.
algo.bakeVertexAttributes(destinationOccurrences, sourceOccurrences=[], skinnedMesh=True, positions=False, 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.
BooleanskinnedMeshEnabling skinned mesh baking (joint assignation for animation transfer).
BooleanpositionsEnabling vertex position baking.
BooleanuseCurrentPositionAsTPoseUse the current position as the T-Pose.

calculateNormalsInPointClouds

Calculate the normal of each point of a Point Cloud.
algo.calculateNormalsInPointClouds(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.

configureFunctionLogger

algo.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters

Type

Name

Description

StringfunctionName
BooleanenableFunction
BooleanenableParameters
BooleanenableExecutionTime

crackCADMoebiusStrip

Detect Moebius strip and crack them if there is somme of them in the selection.
algo.crackCADMoebiusStrip(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to check.

crackEdges

Crack polygonal edges according to given criteria (deprecated, use crackMeshEdges instead).
algo.crackEdges(occurrences, useAttributesFilter=True, sharpAngleFilter=45, useNonManifoldFilter=False)
Parameters

Type

Name

Description

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

crackMeshEdges

Crack polygonal edges according to given criteria.
algo.crackMeshEdges(occurrences, normal=False, uvs=False, uvChannels=None, loi=False, patches=False, nman=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleannormalCrack on sharp normals.
BooleanuvsCrack on UV seams.
IntListuvChannelsIf empty and uvs=true, crack all UV channel, else only channel specified in the list.
BooleanloiCrack on identifier Lines of Interests.
BooleanpatchesCrack on patch borders.
BooleannmanCrack on non-manifolds.

createFreeEdgesFromPatches

Create free edges from patch borders.
algo.createFreeEdgesFromPatches(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

createIdentifiedPatchesFromPatches

Create identified patch from existing patch (this is useful before cloning for baking).
algo.createIdentifiedPatchesFromPatches(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.
algo.createIndexMapFromOccurrences(occurrences, uvChannel=1, createTexture1D=False) -> material.Image
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

Name

Description

ImageindexMap

createNormals

Create normal attributes on tessellations.
algo.createNormals(occurrences, sharpEdge=45, override=True, useAreaWeighting=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.
AnglesharpEdgeEdges with an angle between their polygons greater than sharpEdge will be considered sharp. If negative, smooth normals only.
BooleanoverrideIf true, override existing normals, else only create normals on meshes without normals.
BooleanuseAreaWeightingIf 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.
algo.createPointCloudKDTree(occurrences, depth, addToScene=True) -> scene.Occurrence
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to process.
IntdepthKd tree depth.
BooladdToSceneAdd the KD-Tree to the current scene.
Returns

Type

Name

Description

OccurrencerootKD-Tree root occurrence.

createTangents

Create tangent attributes on tessellations.
algo.createTangents(occurrences, uvChannel=0, override=True)
Parameters

Type

Name

Description

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

createVertexColorFromMaterials

Bake vertex colors using main material color. May duplicate some vertices.
algo.createVertexColorFromMaterials(occurrenceList)
Parameters

Type

Name

Description

OccurrenceListoccurrenceList

createVisibilityPatchesFromPatch

Create visibility patches from existing patches.
algo.createVisibilityPatchesFromPatch(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

decimate

Reduce the polygon count by removing some vertices.
algo.decimate(occurrences, surfacicTolerance=1, lineicTolerance=0.1, normalTolerance=5, texCoordTolerance=-1, releaseConstraintOnSmallArea=False)
Parameters

Type

Name

Description

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

decimateEdgeCollapse

Reduce the polygon count by collapsing some edges to obtain an simplified mesh.
algo.decimateEdgeCollapse(occurrences, surfacicTolerance=0.1, boundaryWeight=1., normalWeight=1., UVWeight=1., sharpNormalWeight=1., UVSeamWeight=10., normalMaxDeviation=-1, forbidUVOverlaps=True, UVMaxDeviation=-1, UVSeamMaxDeviation=-1, protectTopology=False, qualityTradeoff=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DistancesurfacicToleranceError 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.
AnglenormalMaxDeviationConstraint the normals deviation on decimated model.
BooleanforbidUVOverlapsForbid UV to fold over and overlap during the decimation.
DoubleUVMaxDeviationConstraint the uv deviation on decimated model.
DoubleUVSeamMaxDeviationConstraint the uv seams deviation on decimated model.
BooleanprotectTopologyIf 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 .
algo.decimatePointClouds(occurrences, tolerance=500)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
DistancetoleranceAvarage distance between points.

decimateTarget

Reduce the polygon count by collapsing some edges to obtain a target triangle count (iterative version that use less memory).
algo.decimateTarget(occurrences, targetStrategy, UVImportance=0, protectTopology=False, iterativeThreshold=5000000, processMeshIndependently=False, 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.
BooleanprotectTopologyIf 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).
BooleanprocessMeshIndependentlyIf 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.
algo.deleteAttibute(occurrence, type)
Parameters

Type

Name

Description

OccurrenceoccurrenceOccurrence to detele attribute from.
AttributTypetypeAttribute type.

deleteBRepShapes

Delete BRep representation on parts.
algo.deleteBRepShapes(occurrences, onlyTessellated=True)
Parameters

Type

Name

Description

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

deleteFreeVertices

Delete all free vertices of the mesh of given parts.
algo.deleteFreeVertices(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

deleteLines

Delete all free line of the mesh of given parts.
algo.deleteLines(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

deleteNormals

Remove normal attributes on tessellations.
algo.deleteNormals(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete.

deletePatches

Delete patches attributes on tessellations.
algo.deletePatches(occurrences, keepOnePatchByMaterial=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleankeepOnePatchByMaterialIf 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.
algo.deletePolygons(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

deleteTangents

Remove tangent attributes on tessellations.
algo.deleteTangents(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete.

deleteTextureCoordinates

Delete texture coordinates on tessellations.
algo.deleteTextureCoordinates(occurrences, 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.
algo.deleteVisibilityPatches(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.

evalDecimateErrorForTarget

Returns the max error to set to reach a given target.
algo.evalDecimateErrorForTarget(occurrences, TargetStrategy, boundaryWeight=1., normalWeight=1., UVWeight=1., sharpNormalWeight=1., UVSeamWeight=10., forbidUVFoldovers=True, protectTopology=False) -> core.Double
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).
BooleanforbidUVFoldoversForbids UVs to fold over and overlap each other during the decimation.
BooleanprotectTopologyIf 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

Name

Description

DoubleerrorMaxMax error that can be used in decimateEdgeCollapse function.

extractNeutralAxis

Extract neutral axis from tessellations.
algo.extractNeutralAxis(occurrences, maxDiameter=100, removeOriginalMesh=True)
Parameters

Type

Name

Description

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

filletMesh

Fillet a mesh according to its Lines of Interest.
algo.filletMesh(occurrences, value, filletingMode=0, subdivisionNb=0, createFlatChamfer=False, material=None, uvChannel=-1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.
DoublevalueValue (mm).
FilletingModefilletingModeFilleting mode.
IntsubdivisionNbNumber of subdivision.
BooleancreateFlatChamferIf there is 0 subdivision, should the fillet be a planar flat chamfer?.
MaterialmaterialMaterial 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.
algo.filterHiddenPolygons(occurrences, voxelSize=50)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
DistancevoxelSizeSize of voxels.

filterMeshVertexColors

Smooth mesh vertex colors by applying to adjacent vertices a combination of different Gaussian filters for feature preservation.
algo.filterMeshVertexColors(occurrences, sigmaPos=5.0, sigmaValue=0.2, sigmaNormal=15.0)
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.
algo.findBestPivotBetweenOccurrences(assembly1, assembly2, precision=-1) -> geom.Matrix4
Parameters

Type

Name

Description

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

Type

Name

Description

Matrix4matrixBest pivot between the two assembly. If impossible, return the null Matrix4.

getAllAxisFromCADModel

Return all the main axis contained in the CAD models given.
algo.getAllAxisFromCADModel(occurrences) -> scene.OccurrenceList, geom.Matrix4ListList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to check.
Returns

Type

Name

Description

OccurrenceListoccurrencesOccurrence part that contained CAD part.
Matrix4ListListaxisThe main axis from the CAD models.

getMeshVertexColors

Returns arrays containing the vertex colors of all meshes being children of the provided occurrence list.
algo.getMeshVertexColors(occurrences) -> core.ColorAlphaListList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences from which meshes are gathered.
Returns

Type

Name

Description

ColorAlphaListListvertexColorsList of vertex color arrays for each occurrence.

getOptimalTextureResolution

Returns the optimal resolution based on a number of texels per 3D space units (e.g : mm).
algo.getOptimalTextureResolution(occurrences, texelPerMm=2) -> core.Int
Parameters

Type

Name

Description

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

Type

Name

Description

InttextureResolution

getTessellations

Returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh).
algo.getTessellations(occurrences) -> polygonal.TessellationList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
Returns

Type

Name

Description

TessellationListtessellationsAll the tessellation of the given occurrences.

getUV3dRatio

Returns the ratio of size between UV and 3D (max value, actually at the 90th percentil).
algo.getUV3dRatio(occurrences) -> core.Double
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences on which to compute optimal texture resolution.
Returns

Type

Name

Description

DoubleratioEquivalent size of 1 in the UV space in 3D (e.g. Ratio/resolution give the 3D size of a texel)).

getVisibilityStats

Returns the visibility statistics for some occurrences.
algo.getVisibilityStats(occurrences) -> core.Int, core.Int
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
Returns

Type

Name

Description

IntvisibleCountFront
IntvisibleCountBack

getVisualComparisonFootprint

Compute the visual footprint of the difference between two sets of occurrences.
algo.getVisualComparisonFootprint(originalOccurrences, comparedOccurrences, resolution=512, viewpointCount=256, threshold=0.2, onHemisphereOnly=False) -> core.Double
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

Name

Description

DoublefootprintThe visual footprint error in mm (worldspace).

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.
algo.identifyLinesOfInterest(occurrences, normal=False, uvs=False, uvChannels=None, border=False, patches=False, nman=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleannormalAdd LoI on sharp normals.
BooleanuvsAdd LoI on UV seams.
IntListuvChannelsIf empty and uvs=true, add LoI using all UV channels, else only channel specified in the list.
BooleanborderAdd LoI on boundary edges.
BooleanpatchesAdd LoI on submesh borders.
BooleannmanAdd LoI on non-manifolds edges.

identifyPatches

Create patches (submeshes) on meshes (needed by some functions).
algo.identifyPatches(occurrences, useAttributesFilter=True, sharpAngleFilter=45, useBoundaryFilter=True, useNonManifoldFilter=True, useLineEdgeFilter=True, useQuadLineFilter=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleanuseAttributesFilterFilters by attributes.
AnglesharpAngleFilterSharp angle in degree to filter by edges sharpness, if the angle is negative do not filter.
BooleanuseBoundaryFilterFilters by boundaries.
BooleanuseNonManifoldFilterFilters by manifold-ness.
BooleanuseLineEdgeFilterFilters by edge.
BooleanuseQuadLineFilterFilters by quad lines.

identifySharpEdges

Mark as Lines Of Interest the sharp edges .
algo.identifySharpEdges(occurrences, minSharpAngle=90, maxSharpAngle=180, convexity=2, onlyExplicitSharp=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.
AngleminSharpAngleThe angle between the normals - all edges sharpest than this will be filleted.
AnglemaxSharpAngleAll edges sharpest than this won't be filleted.
ConvexityFilterconvexityFillet sharp edges that are convex, concave or both.
BooleanonlyExplicitSharpIf 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.
algo.invertTangents(occurrences, invertW=True)
Parameters

Type

Name

Description

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

lineToTexture

Generate a textured quadrangle over an existing mesh of coplanar lines.
algo.lineToTexture(lines, useColor, resolution=512, 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.
algo.listFeatures(occurrences, throughHoles=True, blindHoles=False, maxDiameter=-1) -> algo.OccurrenceFeaturesList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleanthroughHolesList through holes.
BooleanblindHolesList blind holes.
DistancemaxDiameterMaximum diameter of the holes to be list (-1=no max diameter).
Returns

Type

Name

Description

OccurrenceFeaturesListfeaturesList of features by occurrence.

loopSubdivMesh

Apply Loop Subdivision on Triangle-only Mesh.
algo.loopSubdivMesh(occurrences, depth=1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
IntdepthSubdivision depth.

mergeVertices

Merge near vertices according to the given distance.
algo.mergeVertices(occurrences, maxDistance, mask)
Parameters

Type

Name

Description

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

meshBooleanOperation

Computes the boolean operation between the meshes of two occurrence lists.
algo.meshBooleanOperation(occurrencesA, occurrencesB, operation) -> scene.Occurrence
Parameters

Type

Name

Description

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

Type

Name

Description

OccurrenceoccurrenceA new Occurrence bearing the result.

meshComparison

Compare two meshes.
algo.meshComparison(mesh_1, mesh_2) -> geom.Distance
Parameters

Type

Name

Description

Occurrencemesh_1
Occurrencemesh_2
Returns

Type

Name

Description

DistancedistanceDisance between two meshes.

meshComparisonBatch

Compare each couple of meshes and returns the maximum for each couple.
algo.meshComparisonBatch(meshes1, meshes2) -> geom.DistanceList
Parameters

Type

Name

Description

OccurrenceListmeshes1
OccurrenceListmeshes2
Returns

Type

Name

Description

DistanceListdistancesDisance between each couple of meshes.

meshIntersections

Computes the list of polylines at the intersections of the meshes of two occurrence lists.
algo.meshIntersections(occurrencesA, occurrencesB) -> geom.Point3ListList
Parameters

Type

Name

Description

OccurrenceListoccurrencesAOccurrences A.
OccurrenceListoccurrencesBOccurrences B.
Returns

Type

Name

Description

Point3ListListintersectionsThe intersections.

noiseMesh

Apply noise to vertex positions along their normals.
algo.noiseMesh(occurrences, maxAmplitude=1)
Parameters

Type

Name

Description

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

optimizeCADLoops

Optimize CAD Face loops by merging useless loop edges.
algo.optimizeCADLoops(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to optimize.

optimizeForRendering

Optimize mesh for rendering (lossless, only reindexing).
algo.optimizeForRendering(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to optimize.

optimizeSubMeshes

Sort sub meshes by materials.
algo.optimizeSubMeshes(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrencess to process.

optimizeTextureSize

Resizes scene textures based on a number of texels per 3D space units (e.g: mm).
algo.optimizeTextureSize(root, texelPerMm=2)
Parameters

Type

Name

Description

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

removeHoles

Remove some features from tessellations.
algo.removeHoles(occurrences, throughHoles=True, blindHoles=False, surfacicHoles=False, maxDiameter=-1, fillWithMaterial=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleanthroughHolesRemove through holes.
BooleanblindHolesRemove blind holes.
BooleansurfacicHolesRemove surfacic holes.
DistancemaxDiameterMaximum diameter of the holes to be removed (-1=no max diameter).
MaterialfillWithMaterialIf 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.
algo.repairCAD(occurrences, tolerance=0.1, orient=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to clean.
DistancetoleranceTolerance.
BooleanorientIf true reorient the model.

segmentMesh

Segment Mesh into clusters guided by edge sharpnesses.
algo.segmentMesh(occurrences, overwriteLoI=True)
Parameters

Type

Name

Description

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

setFeatureComponentMaxIndex

Remap Index map of each FeatureComponent of selected occurrences.
algo.setFeatureComponentMaxIndex(occurrences, maxIndex)
Parameters

Type

Name

Description

OccurrenceListoccurrences
IntmaxIndex

setMeshVertexColors

Specify vertex colors for all meshes being children of the provided occurrence list.
algo.setMeshVertexColors(occurrences, vertexColors)
Parameters

Type

Name

Description

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

smoothMesh

algo.smoothMesh(occurrences, mode, maxIterations=100, lockSignificantEdges=True)
Parameters

Type

Name

Description

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

splitUVForAtlas

algo.splitUVForAtlas(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesInput occurrences.

sweep

Extrudes a circular section along an underlying polyline (curve).
algo.sweep(occurrences, radius=1, sides=10, createNormals=True, keepLines=False, generateUV=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to check.
DistanceradiusRadius of cylinders.
IntsidesNumber of points to create cylinders.
BooleancreateNormals
BooleankeepLines
BooleangenerateUV

tessellate

Create a tessellated representation from a CAD representation for each given part.
algo.tessellate(occurrences, maxSag=0.2, maxLength=-1, maxAngle=-1, createNormals=True, uvMode=0, uvChannel=1, uvPadding=0.0, createTangents=False, createFreeEdges=False, keepBRepShape=True, overrideExistingTessellation=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to tessellate.
DistancemaxSagMaximum distance between the geometry and the tessellation.
DistancemaxLengthMaximum length of elements.
AnglemaxAngleMaximum angle between normals of two adjacent elements.
BooleancreateNormalsIf 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.
BooleancreateTangentsIf true, tangents will be generated.
BooleancreateFreeEdgesIf true, free edges will be created for each patch borders.
BooleankeepBRepShapeIf true, BRep shapes will be kept for Back to Brep or Retessellate.
BooleanoverrideExistingTessellationIf true, already tessellated parts will be re-tessellated.

tessellatePointClouds

Tessellate point clouds to replace the geometry with a polygonal connect mesh.
algo.tessellatePointClouds(occurrences, kNeighbors=20, keepPoints=False, colorize=True)
Parameters

Type

Name

Description

OccurrenceListoccurrences
IntkNeighborsThe number of neighbor points used to compute normals.
BooleankeepPointsKeep points after meshing if enabled.
BooleancolorizeIf 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.
algo.tessellateRelativelyToAABB(occurrences, maxSag=0.2, sagRatio=0.001, maxLength=-1, maxAngle=-1, createNormals=True, uvMode=0, uvChannel=1, uvPadding=0.0, createTangents=False, createFreeEdges=False, keepBRepShape=True, overrideExistingTessellation=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to tessellate.
DistancemaxSagMaximum distance between the geometry and the tessellation.
DoublesagRatioMaximum ratio distance between the geometry and the tessellation.
DistancemaxLengthMaximum length of elements.
AnglemaxAngleMaximum angle between normals of two adjacent elements.
BooleancreateNormalsIf 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.
BooleancreateTangentsIf true, tangents will be generated.
BooleancreateFreeEdgesIf true, free edges will be created for each patch borders.
BooleankeepBRepShapeIf true, BRep shapes will be kept for Back to Brep or Retessellate.
BooleanoverrideExistingTessellationIf true, already tessellated parts will be re-tessellated.

transferUV

Transfer UV from a mesh to another mesh.
algo.transferUV(source, destination, sourceChannel=0, destinationChannel=0, tolerance=0.001)
Parameters

Type

Name

Description

OccurrencesourceOccurrence of the source mesh.
OccurrencedestinationOccurrence of the destination mesh.
IntsourceChannelSource UV channel to bake.
IntdestinationChannelDestination UV channel to bake to.
DistancetoleranceGeometric tolerance for point projection.

voxelizePointClouds

Explode point clouds to voxels.
algo.voxelizePointClouds(occurrences, voxelSize=500)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
DistancevoxelSizeSize of voxels.

Baking

bakeAOMap

Ray tracing based ambient occlusion computation.
algo.bakeAOMap(sessionId, samples=32, bentNormals=False, defaultColor=core.ColorAlpha(0., 0., 0., 0.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps: one per destination if shareMaps is false, two if bentNormals is true. In that case, maps are returned in an interleaved manner: [destOccAO0, destOccBentNorm0, destOccAO1, destOccBentNorm1, ...]).
See also:

bakeDepthMap

Depth map baking.
algo.bakeDepthMap(sessionId, normalizeValue=1.0, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeDiffuseMap

Diffuse map baking.
algo.bakeDiffuseMap(sessionId, withTransparency=False, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeDisplacementMap

Displacement map baking.
algo.bakeDisplacementMap(sessionId, normalize=True, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeEmissiveMap

Emissive map baking.
algo.bakeEmissiveMap(sessionId, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeFeatureMap

Feature map baking.
algo.bakeFeatureMap(sessionId, defaultColor=core.ColorAlpha(1., 1., 1., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeMaterialAOMap

AO baking from the source material.
algo.bakeMaterialAOMap(sessionId, defaultColor=core.ColorAlpha(1., 1., 1., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeMaterialIdMap

Color map baking based on source material Ids.
algo.bakeMaterialIdMap(sessionId, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeMaterialPropertyMap

Baking of custom material properties.
algo.bakeMaterialPropertyMap(sessionId, propertyName=String(), nComponents=3, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

BakingSessionsessionIdBaking 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

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeMetallicMap

Metallic map baking.
algo.bakeMetallicMap(sessionId, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeNormalMap

Normal map baking.
algo.bakeNormalMap(sessionId, sourceSpace=2, destinationSpace=2, defaultColor=core.ColorAlpha(1., 1., 1., 1.)) -> material.ImageList
Parameters

Type

Name

Description

BakingSessionsessionIdBaking 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

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeOccurrencePropertyMap

Occurrence property map baking.
algo.bakeOccurrencePropertyMap(sessionId, propertyName=String(), nComponents=3, defaultColor=core.ColorAlpha(1., 1., 1., 1.)) -> material.ImageList
Parameters

Type

Name

Description

BakingSessionsessionIdBaking 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

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeOpacityMap

Opacity map baking.
algo.bakeOpacityMap(sessionId, defaultColor=core.ColorAlpha(1., 1., 1., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakePartIdMap

Color map baking based on the source part Ids.
algo.bakePartIdMap(sessionId, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakePositionMap

Position map baking.
algo.bakePositionMap(sessionId, local=False, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeRoughnessMap

Roughness map baking.
algo.bakeRoughnessMap(sessionId, defaultColor=core.ColorAlpha(0.5, 0.5, 0.5, 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeSpecularMap

Specular map baking.
algo.bakeSpecularMap(sessionId, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeUVMap

Source UV coordinates baking.
algo.bakeUVMap(sessionId, uvChannel=0, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeValidityMap

Validity map baking, distinguishing baked pixels from non baked pixels.
algo.bakeValidityMap(sessionId, validValue=1., invalidValue=0.) -> material.ImageList
Parameters

Type

Name

Description

BakingSessionsessionIdBaking session Id.
DoublevalidValueValue used for filling baked texels.
DoubleinvalidValueValue used for filling unbaked texels.
Returns

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

bakeVertexColorMap

Vertex color map baking.
algo.bakeVertexColorMap(sessionId, defaultColor=core.ColorAlpha(0., 0., 0., 1.)) -> material.ImageList
Parameters

Type

Name

Description

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

Type

Name

Description

ImageListimagesResulting baked maps (one per destination if shareMaps is false).
See also:

beginBakingSession

Start a new baking session. This must be called prior to any of the bake*Something*Map function.
algo.beginBakingSession(destinationOccurrences, sourceOccurrences=[], uvChannel=0, resolution=1024, rayOffset=0, rayMaxDist=-1, opacityThreshold=-1, useCurrentPosition=False, shareMaps=True, sourceElements=0) -> algo.BakingSession
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.
DistancerayOffsetOffset from source mesh.
DistancerayMaxDistMaximum search distance for ray tracing during baking computation (-1 means infinity).
CoeffopacityThresholdIf the opacity is under this threshold, considers as fully transparent and store the color behind the intersection.
BooleanuseCurrentPositionUse the current position instead of the T-Pose of the input occurrence.
BooleanshareMapsIf true, all the destinationOccurrences will share the same maps.
ElementFiltersourceElementsDefines the type of elements from which baking is performed (polygons or points).
Returns

Type

Name

Description

BakingSessionbakingsessionCreated baking session identifier.
See also:

beginVertexBakingSession

Start a new baking session. This must be called prior to any of the bake*Something*Map function.
algo.beginVertexBakingSession(destinationOccurrences, sourceOccurrences=[], rayOffset=0, rayMaxDist=-1, opacityThreshold=-1, useCurrentPosition=False, sourceElements=0) -> algo.BakingSession
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).
DistancerayOffsetOffset from source mesh.
DistancerayMaxDistMaximum search distance for ray tracing during baking computation (-1 means infinity).
CoeffopacityThresholdIf the opacity is under this threshold, considers as fully transparent and store the color behind the intersection.
BooleanuseCurrentPositionUse 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

Name

Description

BakingSessionbakingsessionCreated baking session identifier.
See also:

combineMaterials

Combine materials found on occurrences subtrees into one baked material and assign it to part occurrences.
algo.combineMaterials(occurrences, bakingOptions, overrideExistingUVs=True, singularizeOnAO=False)
Parameters

Type

Name

Description

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

endBakingSession

End and destroy an existing baking session.
algo.endBakingSession(sessionId)
Parameters

Type

Name

Description

BakingSessionsessionIdId of the baking session to end.
See also:

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.
algo.fetchBakedMap(sessionId, x, y, mapId=0) -> algo.BakedValue
Parameters

Type

Name

Description

BakingSessionsessionIdBaking 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

Name

Description

BakedValuebakingPixel
See also:

fetchBakedVertex

Returns information about a baked vertex (occurrence, polygon ID, parametric coordinates, material ID). Must be called inside a (begin/end)BakingSession block.
algo.fetchBakedVertex(sessionId, n, dstId=0) -> algo.BakedValue
Parameters

Type

Name

Description

BakingSessionsessionIdBaking session Id.
UIntnID of the vertex to check.
UIntdstIdId of the destination occurrence the vertex belongs to, if several are provided.
Returns

Type

Name

Description

BakedValuebakingPixel
See also:

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.
algo.setBakingSessionPadding(sessionId, padding)
Parameters

Type

Name

Description

BakingSessionsessionIdBaking session Id.
IntpaddingNumber of pixels to fill around baked islands. -1 means infinite dilation.
See also:

Decomposition

convexDecomposition

Explode each mesh to approximated convex decomposition.
algo.convexDecomposition(occurrences, maxCount=1024, vertexCount=64, approximate=True, resolution=100000, concavity=0.001) -> scene.OccurrenceList
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntmaxCountMaximum number of convex hull to generated.
IntvertexCountMaximum number of vertices per convex hull.
BooleanapproximateApproximate method.
IntresolutionResolution.
DoubleconcavityConcavity.
Returns

Type

Name

Description

OccurrenceListnewOccurrencesResulting occurrences of the convexDecomposition.
See also:

explodeBodies

Explode all CAD Parts by body. New parts will be placed as children of input part occurrences.
algo.explodeBodies(occurrences, groupOpenShells=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
BooleangroupOpenShellsGroup all open shells in one part.
See also:

explodeByMaterials

Explode all parts by material. New parts will be placed as children of input part occurrences.
algo.explodeByMaterials(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
See also:

explodeByTopoDimension

Separate polygons, lines and points into different occurrences.
algo.explodeByTopoDimension(occurrences) -> scene.OccurrenceList
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Returns

Type

Name

Description

OccurrenceListnewOccurrencesList of created occurrences containing only one type : polygons, lines or points.
See also:

explodeByVertexCount

Explode part occurrences to respect a maximum vertex count.
algo.explodeByVertexCount(occurrences, maxVertexCount=65534, maxTriangleCount=65534, 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).
BooleancountMergedVerticesOnceIf true, one vertex used in several triangles with different normals will be counted once (for Unity must be False).
See also:

explodeByVoxel

Explode parts by voxel. New parts will be placed as children of input part occurrences.
algo.explodeByVoxel(occurrences, voxelSize=500)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
DistancevoxelSizeVoxel size.
See also:

explodeConnectedMeshes

Explode connected set of polygons to part occurrences. New parts will be placed as children of input part occurrences.
algo.explodeConnectedMeshes(occurrences, explodeNonManifoldEdges=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
BooleanexplodeNonManifoldEdgesSplit connected components along non-manifold edges.
See also:

explodePatches

Explode all parts by patch.
algo.explodePatches(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
See also:

Occlusion Detection

createVisibilityInformation

Create visilibity information on part occurrences viewed from a set of camera automatically placed on a sphere around the scene.
algo.createVisibilityInformation(occurrences, level=0, resolution=1024, sphereCount=256, fovX=90, considerTransparentOpaque=False, root=0, 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).
BooleanconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OccurrencerootSpecify another root for occluder scene.
BoolonHemisphereOnlyCreate viewpoints only in the Y+ hemisphere of the bounding sphere.
See also:

createVisibilityInformationAdvanced

Create visilibity information on part occurrences viewed from a set of voxel based view points.
algo.createVisibilityInformationAdvanced(occurrences, level=0, voxelSize=100, minimumCavityVolume=1, resolution=256, mode=0, considerTransparentOpaque=False, root=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to create visibility information on: Parts, Patches or Polygons.
DistancevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
VolumeminimumCavityVolumeMinimum 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).
BooleanconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OccurrencerootSpecify another root for occluder scene.
See also:

createVisibilityInformationFromViewPoints

Create visilibity information on parts viewed from a given set of camera.
algo.createVisibilityInformationFromViewPoints(occurrences, cameraPositions, cameraDirections, cameraUps, resolution=1024, fovX=90, considerTransparentOpaque=False, 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).
BooleanconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OccurrencerootSpecify another root for occluder scene.
See also:

findOccludedPartOccurrences

Get part occurrences not viewed from a sphere around the scene.
algo.findOccludedPartOccurrences(occurrences, resolution=1024, sphereCount=256, fovX=90, considerTransparentOpaque=False, root=0, onHemisphereOnly=False) -> scene.OccurrenceList
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).
BooleanconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OccurrencerootSpecify another root for occluder scene.
BoolonHemisphereOnlyCreate viewpoints only in the Y+ hemisphere of the bounding sphere.
Returns

Type

Name

Description

OccurrenceListfilteredThe list of occurrences meeting the criteria.
See also:

findOccludedPartOccurrencesAdvanced

Get part occurrences not viewed from a set of voxel based view points.
algo.findOccludedPartOccurrencesAdvanced(occurrences, voxelSize=100, minimumCavityVolume=1, resolution=256, mode=0, considerTransparentOpaque=False, root=0) -> scene.OccurrenceList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DistancevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
VolumeminimumCavityVolumeMinimum 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).
BooleanconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OccurrencerootSpecify another root for occluder scene.
Returns

Type

Name

Description

OccurrenceListfilteredThe list of occurrences meeting the criteria.
See also:

removeOccludedGeometries

Delete part occurrences, patches or polygons not viewed from a sphere around the scene.
algo.removeOccludedGeometries(occurrences, level=0, resolution=1024, sphereCount=256, fovX=90, considerTransparentOpaque=False, adjacencyDepth=1, occluders=[], onHemisphereOnly=False) -> core.BoolList
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).
BooleanconsiderTransparentOpaqueIf 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

Name

Description

BoolListviewedOccurrencesFor each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True).
See also:

removeOccludedGeometriesAdvanced

Delete part occurrences, patches or polygons not seen from voxel based view points.
algo.removeOccludedGeometriesAdvanced(occurrences, level=0, voxelSize=100, minimumCavityVolume=1, resolution=256, mode=0, considerTransparentOpaque=False, adjacencyDepth=1, occluders=[]) -> core.BoolList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
SelectionLevellevelLevel of geometries to remove : Parts, Patches or Polygons.
DistancevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
VolumeminimumCavityVolumeMinimum 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).
BooleanconsiderTransparentOpaqueIf 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

Name

Description

BoolListviewedOccurrencesFor each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True).
See also:

removeOccludedGeometriesFromPoints

Delete part occurrences, patches or polygons not viewed from spheres generated with a set of camera position.
algo.removeOccludedGeometriesFromPoints(occurrences, level=0, positions, resolution=1024, sphereCount=256, fovX=90, considerTransparentOpaque=False, adjacencyDepth=1, occluders=[]) -> core.BoolList
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).
BooleanconsiderTransparentOpaqueIf 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

Name

Description

BoolListviewedOccurrencesFor each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True).
See also:

removeOccludedGeometriesFromViewPoints

Delete part occurrences, patches or polygons not viewed from a set of camera position/orientation.
algo.removeOccludedGeometriesFromViewPoints(occurrences, level=0, positions, directions, ups, resolution=1024, fovX=90, considerTransparentOpaque=False, adjacencyDepth=1, occluders=[]) -> core.BoolList
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).
BooleanconsiderTransparentOpaqueIf 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

Name

Description

BoolListviewedOccurrencesFor each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True).
See also:

Reconstruction

createOcclusionMesh

Compute an occluder or an occludee with the occurrences selected.
algo.createOcclusionMesh(occurrences, type=1, voxelSize=50, gap=1) -> scene.Occurrence
Parameters

Type

Name

Description

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

Type

Name

Description

OccurrenceocclusionPartResulting part occurrence.
See also:

dualContouring

Replace the tessellations of the selected parts by a retopology based on a dual-contouring.
algo.dualContouring(occurrences, filteringSize=200, voxelSize=50, tolerance=0.01, sameSizeOnAllAxis=False) -> scene.Occurrence
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of part to process.
DistancefilteringSizeFiltering size - must be a multiple of 2 of voxelSize.
DistancevoxelSizeVoxel size used for the reconstruction.
DoubletoleranceTolerance for the quadric error used for the simplification of the octree.
BooleansameSizeOnAllAxisIf true, use the maximum axis length of the AABB for all axis.
Returns

Type

Name

Description

OccurrencedualContouredPartResulting part occurrence.
See also:

marchingCubes

Replace the tessellations of the selected parts by a marching cube representation.
algo.marchingCubes(occurrences, voxelSize=50, elements=0, dilation=0, surfacic=False) -> scene.Occurrence
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
DistancevoxelSizeSize 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).
BooleansurfacicPrefer this mode if the source is surfacic, the result is not guaranteed to be watertight.
Returns

Type

Name

Description

OccurrencemarchingCubePartResulting part occurrence.
See also:

proxyMesh

Replace the tessellations of the selected parts by a proxy mesh based on a voxelization.
algo.proxyMesh(occurrences, voxelSize=50, elements=0, dilation=0, surfacic=False) -> scene.Occurrence
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
DistancevoxelSizeSize 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).
BooleansurfacicPrefer this mode if the source is surfacic, the result is not guaranteed to be watertight.
Returns

Type

Name

Description

OccurrenceproxyMeshPartResulting part occurrence.
See also:

retopologize

Replace the tessellations of the selected parts by a retopology of the external hull.
algo.retopologize(occurrences, targetTriangleCount=1000, pureQuad=True, pointCloud=False, precision=-1) -> scene.Occurrence
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.
DistanceprecisionIf set, define the precision of the features to preserve.
Returns

Type

Name

Description

OccurrenceretopologizedPartResulting part occurrence.
See also:

voxelize

Replace the tessellations of the selected parts by a voxelization of the external skin.
algo.voxelize(occurrences, voxelSize=50, elements=0, dilation=0, useCurrentAnimationPosition=False) -> scene.Occurrence
Parameters

Type

Name

Description

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

Type

Name

Description

OccurrencevoxelizedPartResulting part occurrence.
See also:

Replacement

replaceBy

Replace geometries by other shapes, or primitives.
algo.replaceBy(occurrences, replaceBy=["Occurrence", algo.ReplaceByOccurrenceOptions(0, False)])
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.
ReplaceByOptionreplaceByShape replacement option.
See also:

replaceByBox

Replace objects by a bounding box.
algo.replaceByBox(occurrences, boxType)
Parameters

Type

Name

Description

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

replaceByConvexHull

Replace objects by convex hull.
algo.replaceByConvexHull(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.
See also:

replaceByPrimitive

Replace objects by a primitive shapes.
algo.replaceByPrimitive(occurrences, primitive, generateUV=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to replace.
PrimitiveShapeParametersprimitivePrimitive type and parameters.
BooleangenerateUVPrimitive type and parameters.
See also:

Sawing

sawWithAABB

Saw the mesh with an axis-aligned bounding box. New parts will be placed as children of input part occurrences.
algo.sawWithAABB(occurrences, aabb, mode, innerSuffix="_inner", 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.
See also:

sawWithOBB

Saw the mesh with an oriented bounding box. New parts will be placed as children of input part occurrences.
algo.sawWithOBB(occurrences, obb, mode, innerSuffix="_inner", 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.
See also:

sawWithOctree

Saw and split the mesh with an octree. New parts will be placed as children of input part occurrences.
algo.sawWithOctree(occurrences, aabb, maxDepth, maxTrianglesByLeaf=-1, sawTolerance=0) -> scene.Occurrence
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

Name

Description

OccurrenceoctreeRootRoot occurrence of the created octree.
See also:

sawWithPlane

Saw the mesh with a plane. New parts will be placed as children of input part occurrences.
algo.sawWithPlane(occurrences, planeOrigin, planeNormal, mode, innerSuffix="_inner", outerSuffix="_outer", tolerance=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Point3planeOriginThe plane origin.
Vector3planeNormalThe 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.
See also:

Similarity detection

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).
algo.convertSimilarPartOccurrencesToInstances(occurrences, checkMeshTopo=True, checkVertexPositions=True, vertexPositionPrecision=5, checkUVTopo=True, checkUVVertexPositions=True, UVPositionprecision=5)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrence for which we want to find similar parts and create instances using prototypes.
BooleancheckMeshTopo
BooleancheckVertexPositions
IntvertexPositionPrecision
BooleancheckUVTopo
BooleancheckUVVertexPositions
IntUVPositionprecision
See also:

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.
algo.convertSimilarPartOccurrencesToInstancesFast(occurrences, dimensionsSimilarity=0.98, polycountSimilarity=0.98, ignoreSymmetry=False)
Parameters

Type

Name

Description

OccurrenceListoccurrencesRoot occurrences for which we want to find similar part occurrences and create instances using prototypes.
CoeffdimensionsSimilarityThe 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.
CoeffpolycountSimilarityThe 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.
BooleanignoreSymmetryIf True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
See also:

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.
algo.findSimilarPartOccurrencesFast(occurrences, dimensionsSimilarity=0.98, polycountSimilarity=0.98, ignoreSymmetry=False) -> scene.OccurrenceList
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences for which we want to find similar part occurrences in the scene.
CoeffdimensionsSimilarityThe 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.
CoeffpolycountSimilarityThe 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.
BooleanignoreSymmetryIf True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
Returns

Type

Name

Description

OccurrenceListfilteredThe list of part occurrences meeting the criteria.
See also:

UV Mapping

alignUVIslands

Align with the axes the UVs of the islands.
algo.alignUVIslands(occurrences, channel=0, usePolygonsWeights=0, useVerticesWeights=0, alignmentMode=0)
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.
See also:

applyUvTransform

Apply a transformation matrix on texture coordinates.
algo.applyUvTransform(occurrences, matrix, channel=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Matrix4matrixTransformationmatrix.
IntchannelUV channel to transform.
See also:

automaticUVMapping

Generates the texture coordinates and automatically find seams.
algo.automaticUVMapping(occurrences, channel=0, maxAngleDistorsion=0.5, maxAreaDistorsion=-1, sharpToSeam=True, forbidOverlapping=True, resolution=1024, 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.
See also:

copyUV

Copy an UV channel to another UV channel.
algo.copyUV(occurrences, sourceChannel=0, destinationChannel=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntsourceChannelThe source UV channel to copy.
IntdestinationChannelThe destination UV channel to copy into.
See also:

getRatioUV3D

Compute the ratio between the UV and the 3D size.
algo.getRatioUV3D(occurrences, ratioMode, channel=0) -> core.DoubleList
Parameters

Type

Name

Description

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

Type

Name

Description

DoubleListratiosRatios 3Dsize/UVsize of the input occurrences.
See also:

getUVQualityMetrics

Compute UV mapping qualitative metrics.
algo.getUVQualityMetrics(occurrences, channel=0) -> core.UInt, core.Double, core.Double, core.Double, core.Double, core.Double
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
UIntchannelUV channel to use.
Returns

Type

Name

Description

UIntchartCountNumber of UV islands. If 0, all other returns are invalid.
Doublearea3D3D area (sum of 3D triangle areas).
Doublearea2D2D area (sum of UV-space triangle area).
DoubleoccupancyUV-space occupation (i.e., 2D area over AABR area).
DoublecrumblinessCrumbliness (i.e., a measure of how intricate the UV-island borders are, basically a measure of deviation from a perfect disc).
DoublesamplingStdSampling standard deviation (i.e., measure of variation over the mesh of triangle sampling rate, that is ratio of their 2D over 3D area).
See also:

getUvAabr

Compute the UV Axis Aligned Bounding Rectangle of a set of occurrences.
algo.getUvAabr(occurrences, channel=0) -> geom.AABR
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntchannelUV channel to transform.
Returns

Type

Name

Description

AABRaabrThe UV AABR.
See also:

hasOverlappingUV

Check if a UV channel contains overlapping UVs.
algo.hasOverlappingUV(occurrences, channel=0, resolution=1024) -> core.Boolean
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
UIntchannelUV channel to use.
UIntresolutionResolution of rasterization grid used to check for overlaps.
Returns

Type

Name

Description

BooleanhasOverlappingUVsTrue if overlapping UVs found.
See also:

mapUvOnAABB

Generate texture coordinates using the projection on object Axis Aligned Bounding Box.
algo.mapUvOnAABB(occurrences, useLocalAABB=False, uv3dSize=100, channel=0, overrideExistingUVs=True, ignoreScale=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
BooluseLocalAABBIf enabled, uses part own bounding box, else use global one.
Distanceuv3dSize3D size of the UV space [0-1].
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
BooleanignoreScaleIf this and useLocalAABB are true, ignore local scale.
See also:

mapUvOnBox

Generate texture coordinates using the projection on a box.
algo.mapUvOnBox(occurrences, box, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
BoxboxBox definition.
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mapUvOnCubicAABB

Generate texture coordinates using the projection on object AABB, with same scale on each axis.
algo.mapUvOnCubicAABB(occurrences, uv3dSize=100, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
Distanceuv3dSize3D size of the UV space [0-1].
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mapUvOnCustomAABB

Generate texture coordinates using the projection on custom AABB.
algo.mapUvOnCustomAABB(occurrences, aabb, uv3dSize=100, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
AABBaabbAxis aligned bounding box to project on.
Distanceuv3dSize3D size of the UV space [0-1].
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mapUvOnCylinder

Generate texture coordinates using the projection on a cylinder.
algo.mapUvOnCylinder(occurrences, cylinder, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
CylindercylinderCylinder definition.
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mapUvOnFittingCylinder

Generate texture coordinates using the projection on a fitting cylinder.
algo.mapUvOnFittingCylinder(occurrences, channel=0, overrideExistingUVs=True, useAABB=True, forcedAxis=geom.Vector3(0,0,0))
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
BooleanuseAABBIf true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).
Vector3forcedAxisForced axis of the Cylinder.
See also:

mapUvOnFittingSphere

Generate texture coordinates using the projection on a fitting sphere.
algo.mapUvOnFittingSphere(occurrences, channel=0, overrideExistingUVs=True, useAABB=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
BooleanuseAABBIf true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).
See also:

mapUvOnMBB

Generate texture coordinates using the projection on object Minimum Bounding Box.
algo.mapUvOnMBB(occurrences, useLocalMBB=False, uv3dSize=100, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
BooluseLocalMBBIf enabled, uses part own bounding box, else use global one.
Distanceuv3dSize3D size of the UV space [0-1].
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mapUvOnPlane

Generate texture coordinates using the projection on a plane.
algo.mapUvOnPlane(occurrences, plane, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
PlaneplanePlane definition.
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mapUvOnSphere

Generate texture coordinates using the projection on a sphere.
algo.mapUvOnSphere(occurrences, sphere, channel=0, overrideExistingUVs=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
SpheresphereSphere definition.
IntchannelThe UV channel which will contains the texture coordinates.
BooleanoverrideExistingUVsIf True, override existing UVs on channel.
See also:

mergeUVIslandsAffine

Minimizes the number of seams in the UV mapping by merging UV islands using affine transformation (recommanded for hard surfaces).
algo.mergeUVIslandsAffine(occurrences, channel=0, scaleWeights=0, maxScaleVariationFactor=1.2, curvatureWeights=-1, usePolygonsWeights=1, useVerticesWeights=-1, allowedTransformations=0, allowUVInversion=False, 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.
BooleanallowUVInversionAllow merged UVs to be inverted.
AnglerotationStepConstrains rotation steps to the specified angle (in degrees). If set to -1, allows free rotation.
See also:

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).
algo.mergeUVIslandsRelaxed(occurrences, channel=0, targetIslandCount=0, energyThreshold=0.01, 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.
BooleanforceIsolatedFacesUV islands consisting in a single isolated face completely surrounded by another island are forced to be merged, without reparametrization.
See also:

normalizeUV

Normalize UVs to fit in the [0-1] uv space.
algo.normalizeUV(occurrences, sourceUVChannel=0, destinationUVChannel=-1, uniform=True, sharedUVSpace=True, 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).
BooleanuniformIf true, the scale will be uniform. Else UV can be deformed with a non-uniform scale.
BooleansharedUVSpaceIf true, all parts will be processed as if they were merged to avoid overlapping of their UV coordinates.
BooleanignoreNullIslandsIf true, islands with null height and width will be ignored and their UV coordinates will be set to [0,0] (Slower if enabled).
See also:

removeUV

Remove one or all UV channel(s).
algo.removeUV(occurrences, channel=-1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntchannelThe UV channel to remove (all if channel=-1).
See also:

repackUV

Pack existing UV (create atlas).
algo.repackUV(occurrences, channel=0, shareMap=True, resolution=1024, padding=2, uniformRatio=False, iterations=3, removeOverlaps=True) -> scene.OccurrenceList
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntchannelThe UV channel to repack.
BooleanshareMapIf 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.
BooleanuniformRatioIf true, UV of different part will have the same ratio.
IntiterationsFitting iterations.
BooleanremoveOverlapsRemove overlaps to avoid multiple triangles UVs to share the same pixel.
Returns

Type

Name

Description

OccurrenceListfailedPartsParts which failed to be repacked at this resolution (try to increase the resolution or decrease the padding).
See also:

resizeUVsToTextureSize

Rescale the UV coordinates to fit the input texture size.
algo.resizeUVsToTextureSize(occurrences, TextureSize=100, channel=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to use for the rescaling.
DistanceTextureSizeTexture size to use for the UV coordinates (in millimeters).
IntchannelUV channel to use.
See also:

scaleUV

Apply a scale on texture coordinates.
algo.scaleUV(occurrences, scaleU, scaleV, 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.
See also:

swapUvChannels

Swap two UV channels.
algo.swapUvChannels(occurrences, firstChannel=0, secondChannel=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
IntfirstChannelFirst UV Channel to swap.
IntsecondChannelSecond UV Channel to swap.
See also:

unwrapUV

Unwrap UV islands.
algo.unwrapUV(occurrences, method=0, channel=-1, createSeamsFromLoI=False, iterMax=50, tolerance=0.00001)
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.
BooleancreateSeamsFromLoIUse 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.
See also:

fitting

getFittingCylinder

Returns the fitting cylinder of a set of occurrences (based on MBB).
algo.getFittingCylinder(occurrences, useAABB=True, forcedAxis=geom.Vector3(0,0,0)) -> geom.Affine
Parameters

Type

Name

Description

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

Type

Name

Description

AffineaffineAffine transformation of the cylinder.
See also:

getFittingSphere

Returns the fitting sphere of a set of occurrences.
algo.getFittingSphere(occurrences, useAABB=True) -> geom.Affine
Parameters

Type

Name

Description

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

Type

Name

Description

AffineaffineAffine transformation of the sphere.
See also:

map_generation

convertNormalMap

Convert an existing normal map between Object-space and Tangent-space.
algo.convertNormalMap(partOccurrences, normalMap, uvChannel=0, sourceSpace=0, destinationSpace=2, sourceIsRightHanded=True, destinationIsRightHanded=True, replaceMap=True, resolution=-1, padding=1) -> material.Image
Parameters

Type

Name

Description

OccurrenceListpartOccurrencesOccurrences of components using the given map.
ImagenormalMapSource 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.
BooleansourceIsRightHandedConsiders source normal map as part of a right-handed coordinates system.
BooleandestinationIsRightHandedGenerate destination normal map as part of a right-handed coordinates system.
BooleanreplaceMapIf 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

Name

Description

ImageconvertedNormalMapConverted normal map (equals normalMap if replaceMap=true).
See also:

createBillboard

Create a billboard imposter.
algo.createBillboard(occurrences, resolution=1024, XPositive=True, XNegative=True, YPositive=True, YNegative=True, ZPositive=True, ZNegative=True, moveFacesToCenter=True, leftHandedNormalMap=False) -> scene.Occurrence
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

Name

Description

OccurrencebillboardResulting billboard.
See also:

fillNormalMap

Fill normal map (useful after a decimation for example).
algo.fillNormalMap(normalMap)
Parameters

Type

Name

Description

ImagenormalMapSource normal map to convert.
See also:

orientNormalMap

Orient a tangent space normal map (all Z positive).
algo.orientNormalMap(normalMap)
Parameters

Type

Name

Description

ImagenormalMapNormal map to orient.
See also:

repair

barySmooth

Smooth the tessellations by moving the vertices to the barycenter of their neighbors.
algo.barySmooth(occurrences, iteration=1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
IntiterationNumber of iterations.
See also:

crackMoebiusStrips

Remove moebius strip by topologically cracking them (make it orientable).
algo.crackMoebiusStrips(occurrences, maxEdgeCount=3)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
IntmaxEdgeCountMaximum number of edges to crack to remove one moebius strip.
See also:

crackNonManifoldVertices

Splits non-manifold vertices.
algo.crackNonManifoldVertices(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
See also:

createCavityOccurrences

Identify cavities and create occurrences to show them.
algo.createCavityOccurrences(occurrences, voxelSize=100, minimumCavityVolume=1, mode=0, parent=None) -> scene.Occurrence
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences set to identify cavities.
DistancevoxelSizeSize of the voxels in mm.
VolumeminimumCavityVolumeMinimum volume of a cavity in cubic meter.
InnerOuterOptionmodeSelect where to place camera (all cavities, only outer or only inner cavities).
OccurrenceparentThe 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

Name

Description

OccurrencerootParent occurrence of the cavity occurrences.
See also:

invertPolygonFacesOrientation

Invert the orientation of tessellation elements.
algo.invertPolygonFacesOrientation(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
See also:

moebiusCracker

Splits moebius ring.
algo.moebiusCracker(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
See also:

orientNormals

Orient existing normal according to the polygons clockwise.
algo.orientNormals(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to orient normals.
See also:

remeshSurfacicHoles

Resmesh surfacic holes of tessellations.
algo.remeshSurfacicHoles(occurrences, maxDiameter=0, refine=True, numberOfNeighbors=3, fillWithMaterial=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DistancemaxDiameterMaximum surfacic holes diameters.
BooleanrefineRefine mesh for more details in holes.
IntnumberOfNeighborsNumber of neighboring vertices to use for the MLS projection.
MaterialfillWithMaterialIf set, the given material will be used to fill the holes.
See also:

removeDegeneratedPolygons

Remove some kinds of degenerated polygons.
algo.removeDegeneratedPolygons(occurrences, tolerance=0.1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DistancetoleranceDegenerated tolerance.
See also:

removeMultiplePolygon

Remove multiple polygon.
algo.removeMultiplePolygon(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
See also:

removeZFighting

Remove Z-fighting (surfaces overlapping) by slightly shrinking the selected parts' surfaces.
algo.removeZFighting(occurrences) -> geom.Distance
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to process.
Returns

Type

Name

Description

DistanceoffsetOffset value used by the algorithm.
See also:

repairMesh

Launch the repair process to repair a disconnected or not clean tessellation.
algo.repairMesh(occurrences, tolerance=0.1, crackNonManifold=True, orient=True)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DistancetoleranceConnection tolerance.
BoolcrackNonManifoldAt the end of the repair process, crack resulting non-manifold edges.
BooleanorientIf true reorient the model.
See also:

repairNullNormals

Create normal on an existing normal set when normal is null (polygons appears black).
algo.repairNullNormals(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair null normals.
See also:

separateToManifold

Remove non manifold edges and try to reconnect manifold groups of triangles.
algo.separateToManifold(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
See also:

sewBoundary

Sew boundaries between them.
algo.sewBoundary(occurrences, maxDistance)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to repair.
DistancemaxDistanceMaximum distance between bundaries.
See also:

vertexOffset

Move the vertices by the offsset along their normal.
algo.vertexOffset(occurrences, offset=1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to process.
DistanceoffsetDisplacement.
See also:

repair faces orientation

orientFromFace

Orient all connected polygons in the same orientation of the polygon selectionned.
algo.orientFromFace()
See also:

orientPolygonFaces

Orient tessellation elements.
algo.orientPolygonFaces(occurrences, makeOrientable=True, useArea=False, orientStrategy=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
BooleanmakeOrientableCrack moebius strips to make the model orientable.
BooleanuseAreaUse the area instead of counting the number of triangle.
OrientStrategyorientStrategyStrategy to adopt with this algorithm.
See also:

orientPolygonFacesAdvanced

Properly orient all polygons in the same direction, using voxel based view points placement.
algo.orientPolygonFacesAdvanced(occurrences, voxelSize=100, minimumCavityVolume=1, resolution=64, mode=0, considerTransparentOpaque=True, orientStrategy=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences to orient.
DistancevoxelSizeSize of the voxels in mm (smaller it is, more viewpoints there are).
VolumeminimumCavityVolumeMinimum 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).
BooleanconsiderTransparentOpaqueIf True, Parts, Patches or Polygons with a transparent appearance are considered as opaque.
OrientStrategyAdvancedorientStrategyStrategy to adopt with this algorithm.
See also:

orientPolygonFacesFromCamera

Properly orient all polygons in the same direction, using a specified viewpoint.
algo.orientPolygonFacesFromCamera(occurrences, cameraPosition, cameraDirection, cameraUp, resolution=1024, 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).
See also:

tessellation conversion

equilateralize

Sswap edges to make triangles more equilateral.
algo.equilateralize(occurrences, maxIterations=1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
IntmaxIterationsMaximum number of swapping iteration.
See also:

quadify

Merge all triangle polygons in the meshes to quadrangles.
algo.quadify(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
See also:

requadify

Advanced function to requadify a triangle tessellation coming from full quad mesh.
algo.requadify(occurrences, 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.
See also:

triangularize

Split all non-triangle polygons in the meshes to triangles.
algo.triangularize(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
See also:

vertex weights

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.
algo.createVertexWeightsFromVertexColors(occurrences, offset=0, scale=1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DoubleoffsetOffset value for weight computation.
DoublescaleScale value for weight computation.
See also:

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.
algo.createVertexWeightsFromVisibilityAttributes(occurrences, offset=0, scale=1)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
DoubleoffsetOffset value for weight computation.
DoublescaleScale value for weight computation.
See also:

deleteVertexWeights

Remove any existing vertex weights attributes on given occurrences.
algo.deleteVertexWeights(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to process.
See also:

visibility

createVisibilityAttributes

Create visibility attributes on tessellations.
algo.createVisibilityAttributes(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.
See also:

deletePolygonalWeightAttribute

Delete Polygonal Weight attributes on tessellations.
algo.deletePolygonalWeightAttribute(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete attributes.
See also:

deleteVisibilityAttributes

Delete visibility attributes on tessellations.
algo.deleteVisibilityAttributes(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to delete attributes.
See also:

flagVisibilityAttributesOnTransparents

Add one count to all visiblility attributes (poly and patch) on transparent patches.
algo.flagVisibilityAttributesOnTransparents(occurrences)
Parameters

Type

Name

Description

OccurrenceListoccurrencesOccurrences of components to create attributes.
See also:

transferVisibilityToPolygonalWeight

Set Polygonal Weight Attribute from Visibility Attribute.
algo.transferVisibilityToPolygonalWeight(occurrences, Mode=0)
Parameters

Type

Name

Description

OccurrenceListoccurrencesPart occurrences to process.
VisibilityToWeightModeModeMode used to compute visibility.
See also: