Table of Contents

Class Algo

Namespace
Algo

Methods

assembleCAD

Assemble faces of CAD shapes

algo.assembleCAD(occurrences, tolerance=0.1, removeDuplicatedFaces=True)

Parameters

occurrences OccurrenceList

Occurrences of components to assemble

tolerance Distance

Assembling tolerance

removeDuplicatedFaces Boolean

If 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

occurrences OccurrenceList

Occurrences of components to process

bakeImpostor

bakes impostors textures

algo.bakeImpostor(occurrence, XFrames, YFrames, hemi, resolution, padding, roughness, metallic, ao) -> algo.OctahedralImpostor

Parameters

occurrence Occurrence
XFrames Int
YFrames Int
hemi Bool
resolution Int
padding Int
roughness Boolean
metallic Boolean
ao Boolean

Returns

OctahedralImpostor

The structure containing impostor data

bakeVertexAttributes

Bake vertex attributes on meshes from other meshes

algo.bakeVertexAttributes(destinationOccurrences, sourceOccurrences=[], skinnedMesh=True, positions=False, useCurrentPositionAsTPose=False)

Parameters

destinationOccurrences OccurrenceList

Occurrences of the meshes where to store the baked vertex attributes

sourceOccurrences OccurrenceList

Occurrences of components from which to bake vertex attributes

skinnedMesh Boolean

Enabling skinned mesh baking (joint assignation for animation transfer)

positions Boolean

Enabling vertex position baking

useCurrentPositionAsTPose Boolean

Use the current position as the T-Pose

calculateNormalsInPointClouds

calculate the normal of each point of a Point Cloud

Warning

This function is tagged as EXPERIMENTAL.

algo.calculateNormalsInPointClouds(occurrences)

Parameters

occurrences OccurrenceList

Part occurrences to process

combineMeshesByMaterials

Explode and (re)merge a set of mesh parts by visible materials

algo.combineMeshesByMaterials(occurrences, mergeNoMaterials, mergeHiddenPartsMode) -> scene.OccurrenceList

Parameters

occurrences OccurrenceList

Occurrences of the parts to merge

mergeNoMaterials Boolean

If true, merge all parts with no active material together, else do not merge them

mergeHiddenPartsMode MergeHiddenPartsMode

Hidden parts handling mode, Destroy them, make visible or merge separately

Returns

OccurrenceList

Resulting occurrences of the merged parts

configureFunctionLogger

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

Parameters

functionName String
enableFunction Boolean
enableParameters Boolean
enableExecutionTime Boolean

crackCADMoebiusStrip

Detect Moebius strip and crack them if there is somme of them in the selection

algo.crackCADMoebiusStrip(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to check

crackEdges

crack polygonal edges according to given criteria (deprecated, use crackMeshEdges instead)

Warning

This function is tagged as DEPRECATED.

algo.crackEdges(occurrences, useAttributesFilter=True, sharpAngleFilter=45, useNonManifoldFilter=False)

Parameters

occurrences OccurrenceList

Occurrences of components to process

useAttributesFilter Boolean

Filters by attribute

sharpAngleFilter Angle

Sharp angle in degree to filter by edges sharpness, if the angle is negative do not filter

useNonManifoldFilter Boolean

Filters by manifold-ness.

crackMeshEdges

crack polygonal edges according to given criteria

algo.crackMeshEdges(occurrences, normal=False, uvs=False, uvChannels, loi=False, patches=False, nman=False)

Parameters

occurrences OccurrenceList

Occurrences of components to process

normal Boolean

Crack on sharp normals

uvs Boolean

Crack on UV seams

uvChannels IntList

If empty and uvs=true, crack all UV channel, else only channel specified in the list

loi Boolean

Crack on identifier Lines of Interests

patches Boolean

Crack on patch borders

nman Boolean

Crack on non-manifolds

createFreeEdgesFromPatches

Create free edges from patch borders

algo.createFreeEdgesFromPatches(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

createIdentifiedPatchesFromPatches

Create identified patch from existing patch (this is useful before cloning for baking)

algo.createIdentifiedPatchesFromPatches(occurrences)

Parameters

occurrences OccurrenceList

Occurrences 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, createTexture1D) -> material.Image

Parameters

occurrences OccurrenceList
uvChannel Int
createTexture1D Bool

If 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

Image

createNormals

Create normal attributes on tessellations

algo.createNormals(occurrences, sharpEdge=45, override=True, useAreaWeighting=False)

Parameters

occurrences OccurrenceList

Occurrences of components to create attributes

sharpEdge Angle

Edges with an angle between their polygons greater than sharpEdge will be considered sharp. If negative, smooth normals only.

override Boolean

If true, override existing normals, else only create normals on meshes without normals

useAreaWeighting Boolean

If 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) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Occurrences to process

depth Int

Kd tree depth

addToScene Bool

Add the KD-Tree to the current scene

Returns

Occurrence

KD-Tree root occurrence

createTangents

Create tangent attributes on tessellations

algo.createTangents(occurrences, uvChannel=0, override=True)

Parameters

occurrences OccurrenceList

Occurrences of components to create attributes

uvChannel Int

UV channel to use for the tangents creation

override Boolean

If 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

occurrenceList OccurrenceList

createVisibilityPatchesFromPatch

Create visibility patches from existing patches

algo.createVisibilityPatchesFromPatch(occurrences)

Parameters

occurrences OccurrenceList

Occurrences 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

occurrences OccurrenceList

Occurrences of components to process

surfacicTolerance Distance

Maximum distance between surfacic vertices and resulting simplified surfaces

lineicTolerance Distance

Maximum distance between lineic vertices and resulting simplified lines

normalTolerance Angle

Maximum angle between original normals and those interpolated on the simplified surface

texCoordTolerance Distance

Maximum distance (in 3D space) between original texcoords and those interpolated on the simplified surface

releaseConstraintOnSmallArea Boolean

If 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

Warning

This function is tagged as EXPERIMENTAL.

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

occurrences OccurrenceList

Occurrences of components to process

surfacicTolerance Distance

Error max between the simplified mesh et the old one

boundaryWeight Double

Boundary importance during the decimation

normalWeight Double

Normal importance during the decimation

UVWeight Double

UV importance during the decimation

sharpNormalWeight Double

Importance of sharp edges during the decimation

UVSeamWeight Double

Importance of UV seams during the decimation

normalMaxDeviation Angle

Constraint the normals deviation on decimated model

forbidUVOverlaps Boolean

Forbid UV to fold over and overlap during the decimation

UVMaxDeviation Double

Constraint the uv deviation on decimated model

UVSeamMaxDeviation Double

Constraint the uv seams deviation on decimated model

protectTopology Boolean

If 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

qualityTradeoff QualitySpeedTradeoff

For 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

occurrences OccurrenceList

Part occurrences to process

tolerance Distance

Avarage 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)

Parameters

occurrences OccurrenceList

List of occurrences to process

targetStrategy DecimateOptionsSelector

Select between targetCount or ratio to define the number of triangles left after the decimation process

UVImportance UVImportanceEnum

Select importance of texture coordinates

protectTopology Boolean

If False, the topology of the mesh can change and some edges can become non-manifold

iterativeThreshold ULong

Number of triangles above which the iterative algorithm is used to limit the memory usage (disabled if processMeshIndependently=True)

processMeshIndependently Boolean

If true, each mesh will be processed independently and the triangleCount or ratio will apply by mesh (disable iterative method)

deleteAttibute

Delete designed attribute on tessellations

algo.deleteAttibute(occurrence, type)

Parameters

occurrence Occurrence

Occurrence to detele attribute from

type AttributType

Attribute type

deleteBRepShapes

Delete BRep representation on parts

algo.deleteBRepShapes(occurrences, onlyTessellated=True)

Parameters

occurrences OccurrenceList

Occurrences of components to process

onlyTessellated Boolean

If 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

occurrences OccurrenceList

Occurrences of components to process

deleteLines

Delete all free line of the mesh of given parts

algo.deleteLines(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

deleteNormals

Remove normal attributes on tessellations

algo.deleteNormals(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to delete

deletePatches

Delete patches attributes on tessellations

algo.deletePatches(occurrences, keepOnePatchByMaterial=True)

Parameters

occurrences OccurrenceList

Occurrences of components to process

keepOnePatchByMaterial Boolean

If 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

occurrences OccurrenceList

Occurrences of components to process

deleteTangents

Remove tangent attributes on tessellations

algo.deleteTangents(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to delete

deleteTextureCoordinates

Delete texture coordinates on tessellations

algo.deleteTextureCoordinates(occurrences, channel=-1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

channel Int

Choose Texture coordinates channel to delete (-1 for all channels)

deleteVisibilityPatches

delete the visibility patches of given occurrences

algo.deleteVisibilityPatches(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

evalDecimateErrorForTarget

returns the max error to set to reach a given target

algo.evalDecimateErrorForTarget(occurrences, TargetStrategy, boundaryWeight, normalWeight, UVWeight, sharpNormalWeight, UVSeamWeight, forbidUVFoldovers, protectTopology) -> core.Double

Parameters

occurrences OccurrenceList

List of occurrences to process

TargetStrategy DecimateOptionsSelector

Select between targetCount or ratio to define the number of triangles left after the decimation process

boundaryWeight Double

Defines how important the edges defining the mesh boundaries (free edges) are during the decimation process, to preserve them from distortion

normalWeight Double

Defines how important vertex normals are during the decimation process, to preserve the smoothing of the mesh from being damaged

UVWeight Double

Defines how important UVs (texture coordinates) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs)

sharpNormalWeight Double

Defines how important sharp edges (or hard edges) are during the decimation process, to preserve them from being distorted

UVSeamWeight Double

Defines 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)

forbidUVFoldovers Boolean

Forbids UVs to fold over and overlap each other during the decimation

protectTopology Boolean

If 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

Double

Max error that can be used in decimateEdgeCollapse function

extractNeutralAxis

Extract neutral axis from tessellations

algo.extractNeutralAxis(occurrences, maxDiameter=100, removeOriginalMesh=True)

Parameters

occurrences OccurrenceList

Occurrences of components to process

maxDiameter Distance

Maximum diameter of beams

removeOriginalMesh Boolean

Remove or not the original mesh at the end of the algorithm

filletMesh

Fillet a mesh according to its Lines of Interest

Warning

This function is tagged as EXPERIMENTAL.

algo.filletMesh(occurrences, value, filletingMode=0, subdivisionNb=0, createFlatChamfer=False, material)

Parameters

occurrences OccurrenceList

Input occurrences

value Double

Value (mm)

filletingMode FilletingMode

Filleting mode

subdivisionNb Int

Number of subdivision

createFlatChamfer Boolean

If there is 0 subdivision, should the fillet be a planar flat chamfer?

material Material

Material to apply to created fillets. Default: use a random neighbor material

filterHiddenPolygons

remove hidden polygons using voxels and cavities

algo.filterHiddenPolygons(occurrences, voxelSize=50)

Parameters

occurrences OccurrenceList

Part occurrences to process

voxelSize Distance

Size of voxels

getAllAxisFromCADModel

Return all the main axis contained in the CAD models given

algo.getAllAxisFromCADModel(occurrences) -> scene.OccurrenceList, geom.Matrix4ListList

Parameters

occurrences OccurrenceList

Occurrences of components to check

Returns

OccurrenceList

Occurrence part that contained CAD part

getOptimalTextureResolution

Returns the optimal resolution based on a number of texels per 3D space units (e.g : mm)

Warning

This function is tagged as EXPERIMENTAL.

algo.getOptimalTextureResolution(occurrences, texelPerMm) -> core.Int

Parameters

occurrences OccurrenceList

Occurrences on which to compute optimal texture resolution

texelPerMm Double

Number of texel per millimeter in a 3D space

Returns

Int

getTessellations

returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh)

algo.getTessellations(occurrences) -> polygonal.TessellationList

Parameters

occurrences OccurrenceList

Occurrences of components to process

Returns

TessellationList

All the tessellation of the given occurrences

getUV3dRatio

Returns the ratio of size between UV and 3D (max value, actually at the 90th percentil)

Warning

This function is tagged as EXPERIMENTAL.

algo.getUV3dRatio(occurrences) -> core.Double

Parameters

occurrences OccurrenceList

Occurrences on which to compute optimal texture resolution

Returns

Double

Equivalent 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

occurrences OccurrenceList

Occurrences of components to process

Returns

Int

identifyPatches

Create cad patches on tessellation (needed by some functions)

algo.identifyPatches(occurrences, useAttributesFilter=True, sharpAngleFilter=45, useBoundaryFilter=True, useNonManifoldFilter=True, useLineEdgeFilter=True, useQuadLineFilter=False)

Parameters

occurrences OccurrenceList

Occurrences of components to process

useAttributesFilter Boolean

Filters by attributes

sharpAngleFilter Angle

Sharp angle in degree to filter by edges sharpness, if the angle is negative do not filter

useBoundaryFilter Boolean

Filters by boundaries

useNonManifoldFilter Boolean

Filters by manifold-ness

useLineEdgeFilter Boolean

Filters by edge

useQuadLineFilter Boolean

Filters by quad lines

identifySharpEdges

Mark as Lines Of Interest the sharp edges

Warning

This function is tagged as EXPERIMENTAL.

algo.identifySharpEdges(occurrences, minSharpAngle=90, maxSharpAngle=180, convexity=2, onlyExplicitSharp=False)

Parameters

occurrences OccurrenceList

Input occurrences

minSharpAngle Angle

The angle between the normals - all edges sharpest than this will be filleted

maxSharpAngle Angle

All edges sharpest than this won't be filleted

convexity ConvexityFilter

Fillet sharp edges that are convex, concave or both

onlyExplicitSharp Boolean

If toggled, if the explicit normals of an edge says the transition is smooth, the edge won't be selected

lineToTexture

Generate a textured quadrangle over an existing mesh of coplanar lines

Warning

This function is tagged as EXPERIMENTAL.

algo.lineToTexture(lines, useColor, resolution=512, thickness=5)

Parameters

lines OccurrenceList

Lines to select

useColor UseColorOption

Set color policy.

resolution Int

Texture resolution

thickness Int

The thickness of the lines in pixels

listFeatures

List features from tessellations

algo.listFeatures(occurrences, throughHoles, blindHoles, maxDiameter) -> algo.OccurrenceFeaturesList

Parameters

occurrences OccurrenceList

Occurrences of components to process

throughHoles Boolean

List through holes

blindHoles Boolean

List blind holes

maxDiameter Distance

Maximum diameter of the holes to be list (-1=no max diameter)

Returns

OccurrenceFeaturesList

List of features by occurrence

loopSubdivMesh

Apply Loop Subdivision on Triangle-only Mesh

algo.loopSubdivMesh(occurrences, depth=1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

depth Int

Subdivision depth

mergeVertices

merge near vertices according to the given distance

algo.mergeVertices(occurrences, maxDistance, mask)

Parameters

occurrences OccurrenceList

Occurrences of components to process

maxDistance Distance

Maximum distance between two vertex to merge

mask TopologyCategoryMask

Topological category of the vertices to merge

meshComparison

compare two meshes

Warning

This function is tagged as EXPERIMENTAL.

algo.meshComparison(mesh_1, mesh_2) -> geom.Distance

Parameters

mesh_1 Occurrence
mesh_2 Occurrence

Returns

Distance

Disance between two meshes

meshComparisonBatch

compare each couple of meshes and returns the maximum for each couple

Warning

This function is tagged as EXPERIMENTAL.

algo.meshComparisonBatch(meshes1, meshes2) -> geom.DistanceList

Parameters

meshes1 OccurrenceList
meshes2 OccurrenceList

Returns

DistanceList

Disance between each couple of meshes

meshIntersections

Computes the intersections between the meshes of two occurrences

Warning

This function is tagged as EXPERIMENTAL.

algo.meshIntersections(occurrence1, occurrence2) -> geom.Point3ListList

Parameters

occurrence1 Occurrence

First Occurrence

occurrence2 Occurrence

Second Occurrence

Returns

Point3ListList

The intersections

noiseMesh

Apply noise to vertex positions along their normals

algo.noiseMesh(occurrences, maxAmplitude=1)

Parameters

occurrences OccurrenceList

Part occurrencess to noise

maxAmplitude Distance

Maximum distance between original vertex and noisy vertex

optimizeCADLoops

Optimize CAD Face loops by merging useless loop edges

algo.optimizeCADLoops(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to optimize

optimizeForRendering

Optimize mesh for rendering (lossless, only reindexing)

algo.optimizeForRendering(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to optimize

optimizeSubMeshes

Sort sub meshes by materials

algo.optimizeSubMeshes(occurrences)

Parameters

occurrences OccurrenceList

Part occurrencess to process

optimizeTextureSize

Resizes scene textures based on a number of texels per 3D space units (e.g: mm)

Warning

This function is tagged as EXPERIMENTAL.

algo.optimizeTextureSize(root, texelPerMm=2)

Parameters

root Occurrence

Root from which texture resizing will process

texelPerMm Double

Number 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

occurrences OccurrenceList

Occurrences of components to process

throughHoles Boolean

Remove through holes

blindHoles Boolean

Remove blind holes

surfacicHoles Boolean

Remove surfacic holes

maxDiameter Distance

Maximum diameter of the holes to be removed (-1=no max diameter)

fillWithMaterial Material

If 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

occurrences OccurrenceList

Occurrences of components to clean

tolerance Distance

Tolerance

orient Boolean

If true reorient the model

setFeatureComponentMaxIndex

Remap Index map of each FeatureComponent of selected occurrences

algo.setFeatureComponentMaxIndex(occurrences, maxIndex)

Parameters

occurrences OccurrenceList
maxIndex Int

smoothMesh

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

Parameters

occurrences OccurrenceList

Occurrences of components to process

mode CostEvaluation

Computation of cost

maxIterations Int

Maximum number of swapping iteration

lockSignificantEdges Boolean

Forbid to swap significant edges (e.g. UV seams, sharp edges, patch borders, ...)

splitUVForAtlas

algo.splitUVForAtlas(occurrences)

Parameters

occurrences OccurrenceList

Input occurrences

sweep

Extrudes a circular section along an underlying polyline (curve)

Warning

This function is tagged as EXPERIMENTAL.

algo.sweep(occurrences, radius=1, sides=10, createNormals=True, keepLines=False, generateUV=True)

Parameters

occurrences OccurrenceList

Occurrences of components to check

radius Distance

Radius of cylinders

sides Int

Number of points to create cylinders

createNormals Boolean
keepLines Boolean
generateUV Boolean

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

occurrences OccurrenceList

Occurrences of components to tessellate

maxSag Distance

Maximum distance between the geometry and the tessellation

maxLength Distance

Maximum length of elements

maxAngle Angle

Maximum angle between normals of two adjacent elements

createNormals Boolean

If true, normals will be generated

uvMode UVGenerationMode

Select the texture coordinates generation mode

uvChannel Int

The UV channel of the generated texture coordinates (if any)

uvPadding Double

The 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

createTangents Boolean

If true, tangents will be generated

createFreeEdges Boolean

If true, free edges will be created for each patch borders

keepBRepShape Boolean

If true, BRep shapes will be kept for Back to Brep or Retessellate

overrideExistingTessellation Boolean

If true, already tessellated parts will be re-tessellated

tessellatePointClouds

Tessellate point clouds to replace the geometry with a polygonal connect mesh

Warning

This function is tagged as EXPERIMENTAL.

algo.tessellatePointClouds(occurrences, kNeighbors=20, keepPoints=False, colorize=True)

Parameters

occurrences OccurrenceList
kNeighbors Int

The number of neighbor points used to compute normals

keepPoints Boolean

Keep points after meshing if enabled

colorize Boolean

If 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

occurrences OccurrenceList

Occurrences of components to tessellate

maxSag Distance

Maximum distance between the geometry and the tessellation

sagRatio Double

Maximum ratio distance between the geometry and the tessellation

maxLength Distance

Maximum length of elements

maxAngle Angle

Maximum angle between normals of two adjacent elements

createNormals Boolean

If true, normals will be generated

uvMode UVGenerationMode

Select the texture coordinates generation mode

uvChannel Int

The UV channel of the generated texture coordinates (if any)

uvPadding Double

The 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

createTangents Boolean

If true, tangents will be generated

createFreeEdges Boolean

If true, free edges will be created for each patch borders

keepBRepShape Boolean

If true, BRep shapes will be kept for Back to Brep or Retessellate

overrideExistingTessellation Boolean

If true, already tessellated parts will be re-tessellated

voxelizePointClouds

Explode point clouds to voxels

algo.voxelizePointClouds(occurrences, voxelSize=500)

Parameters

occurrences OccurrenceList

Part occurrences to process

voxelSize Distance

Size of voxels

bakeUV

Bake UV from a mesh to another mesh

See also:

algo.bakeUV(source, destination, sourceChannel=0, destinationChannel=0, tolerance=0.001)

Parameters

source Occurrence

Occurrence of the source mesh

destination Occurrence

Occurrence of the destination mesh

sourceChannel Int

Source UV channel to bake

destinationChannel Int

Destination UV channel to bake to

tolerance Distance

Tolerance when point is projected on seam (if the model come from a decimation it is recommended to use the lineic tolerance here)

combineMaterials

Combine all given meshes to one mesh with one material (baked)

See also:

algo.combineMaterials(occurrences, bakingOptions, overrideExistingUVs=True, singularizeOnAO=False)

Parameters

occurrences OccurrenceList

Part occurrences to process

bakingOptions BakeOption

Baking options

overrideExistingUVs Boolean

If True, override existing UVs on channel

singularizeOnAO Boolean

If true, singularize all instances in the selected subtree if we want to bake AO in the texture

combineMeshes

Combine all given meshes to one mesh with one material (baked)

See also:

algo.combineMeshes(occurrences, bakingOptions, overrideExistingUVs) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

bakingOptions BakeOption

Baking options

overrideExistingUVs Boolean

If True, override existing UVs on channel

Returns

Occurrence

convexDecomposition

Explode each mesh to approximated convex decomposition

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.convexDecomposition(occurrences, maxCount, vertexCount, approximate, resolution, concavity) -> scene.OccurrenceList

Parameters

occurrences OccurrenceList

Part occurrences to process

maxCount Int

Maximum number of convex hull to generated

vertexCount Int

Maximum number of vertices per convex hull

approximate Boolean

Approximate method

resolution Int

Resolution

concavity Double

Concavity

Returns

OccurrenceList

Resulting occurrences of the convexDecomposition

explodeBodies

Explode all CAD Parts by body. New parts will be placed as children of input part occurrences.

See also:

algo.explodeBodies(occurrences, groupOpenShells=False)

Parameters

occurrences OccurrenceList

Part occurrences to process

groupOpenShells Boolean

Group all open shells in one part

explodeByMaterials

Explode all parts by material. New parts will be placed as children of input part occurrences.

See also:

algo.explodeByMaterials(occurrences)

Parameters

occurrences OccurrenceList

Part occurrences to process

explodeByVertexCount

algo.explodeByVertexCount(occurrences, maxVertexCount=65534, maxTriangleCount=65534, countMergedVerticesOnce=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

maxVertexCount Int

The maximum number of vertices by part

maxTriangleCount Int

The maximum number of triangles by part (quadrangles count twice)

countMergedVerticesOnce Boolean

If true, one vertex used in several triangles with different normals will be counted once (for Unity must be False)

explodeByVoxel

Explode parts by voxel. New parts will be placed as children of input part occurrences.

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.explodeByVoxel(occurrences, voxelSize=500)

Parameters

occurrences OccurrenceList

Part occurrences to process

voxelSize Distance

Voxel size

explodeConnectedMeshes

Explode connected set of polygons to part occurrences. New parts will be placed as children of input part occurrences.

See also:

algo.explodeConnectedMeshes(occurrences)

Parameters

occurrences OccurrenceList

Part occurrences to process

explodePatches

algo.explodePatches(occurrences)

Parameters

occurrences OccurrenceList

Part occurrences to process

legoDecomposition

Decompose a model in a set of lego bricks

algo.legoDecomposition(root, bricks, colors, density, forceFillingWithSmallBricks) -> algo.LegoReturn

Parameters

root Occurrence

The model root occurrence

bricks LegoBrickDefinitionList
colors ColorList
density Int
forceFillingWithSmallBricks Boolean

Returns

LegoReturn

The root occurrence of the decomposition and the list of bricks used

createVisibilityInformation

algo.createVisibilityInformation(occurrences, level=0, resolution=1024, sphereCount=16, fovX=90, considerTransparentOpaque=False, root=0)

Parameters

occurrences OccurrenceList

Occurrences of components to process

level SelectionLevel

Level of geometries to remove : Parts, Patches or Polygons

resolution Int

Resolution of the visibility viewer

sphereCount Int

Segmentation of the sphere sphereCount x sphereCount

fovX Double

Horizontal field of view (in degree)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

root Occurrence

Specify another root for occluder scene

createVisibilityInformationAdvanced

algo.createVisibilityInformationAdvanced(occurrences, voxelSize=100, minimumCavityVolume=1, resolution=256, mode=0, considerTransparentOpaque=False, root=0)

Parameters

occurrences OccurrenceList

Occurrences of components to process

voxelSize Distance

Size of the voxels in mm (smaller it is, more viewpoints there are)

minimumCavityVolume Volume

Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)

resolution Int

Resolution of the visibility viewer

mode InnerOuterOption

Select where to place camera (all cavities, only outer or only inner cavities)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

root Occurrence

Specify another root for occluder scene

createVisibilityInformationFromViewPoints

algo.createVisibilityInformationFromViewPoints(occurrences, cameraPositions, cameraDirections, cameraUps, resolution=1024, fovX=90, considerTransparentOpaque=False, root=0)

Parameters

occurrences OccurrenceList

Occurrences of components to process

cameraPositions Point3List

List of camera positions

cameraDirections Point3List

List of camera directions

cameraUps Point3List

List of camera up vectors

resolution Int

Resolution of the visibility viewer

fovX Double

Horizontal field of view (in degree)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

root Occurrence

Specify another root for occluder scene

findOccludedPartOccurrences

algo.findOccludedPartOccurrences(occurrences, resolution, sphereCount, fovX, considerTransparentOpaque, root) -> scene.OccurrenceList

Parameters

occurrences OccurrenceList

Occurrences of components to process

resolution Int

Resolution of the visibility viewer

sphereCount Int

Segmentation of the sphere sphereCount x sphereCount

fovX Double

Horizontal field of view (in degree)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

root Occurrence

Specify another root for occluder scene

Returns

OccurrenceList

The list of occurrences meeting the criteria

findOccludedPartOccurrencesAdvanced

algo.findOccludedPartOccurrencesAdvanced(occurrences, voxelSize, minimumCavityVolume, resolution, mode, considerTransparentOpaque, root) -> scene.OccurrenceList

Parameters

occurrences OccurrenceList

Occurrences of components to process

voxelSize Distance

Size of the voxels in mm (smaller it is, more viewpoints there are)

minimumCavityVolume Volume

Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)

resolution Int

Resolution of the visibility viewer

mode InnerOuterOption

Select where to place camera (all cavities, only outer or only inner cavities)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

root Occurrence

Specify another root for occluder scene

Returns

OccurrenceList

The list of occurrences meeting the criteria

removeOccludedGeometries

algo.removeOccludedGeometries(occurrences, level, resolution, sphereCount, fovX, considerTransparentOpaque, adjacencyDepth, root) -> core.BoolList

Parameters

occurrences OccurrenceList

Occurrences of components to process

level SelectionLevel

Level of geometries to remove : Parts, Patches or Polygons

resolution Int

Resolution of the visibility viewer

sphereCount Int

Segmentation of the sphere sphereCount x sphereCount

fovX Double

Horizontal field of view (in degree)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

adjacencyDepth Int

Mark neighbors polygons as visible

root Occurrence

Specify another root for occluder scene

Returns

BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)

removeOccludedGeometriesAdvanced

algo.removeOccludedGeometriesAdvanced(occurrences, level, voxelSize, minimumCavityVolume, resolution, mode, considerTransparentOpaque, adjacencyDepth, root) -> core.BoolList

Parameters

occurrences OccurrenceList

Occurrences of components to process

level SelectionLevel

Level of geometries to remove : Parts, Patches or Polygons

voxelSize Distance

Size of the voxels in mm (smaller it is, more viewpoints there are)

minimumCavityVolume Volume

Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)

resolution Int

Resolution of the visibility viewer

mode InnerOuterOption

Select where to place camera (all cavities, only outer or only inner cavities)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

adjacencyDepth Int

Mark neighbors polygons as visible

root Occurrence

Specify another root for occluder scene

Returns

BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)

removeOccludedGeometriesFromPoints

algo.removeOccludedGeometriesFromPoints(occurrences, level, positions, resolution, sphereCount, fovX, considerTransparentOpaque, adjacencyDepth, root) -> core.BoolList

Parameters

occurrences OccurrenceList

Occurrences of components to process

level SelectionLevel

Level of parts to remove : Parts, Patches or Polygons

positions Point3List

List of positions

resolution Int

Resolution of the visibility viewer

sphereCount Int

Segmentation of the sphere sphereCount x sphereCount

fovX Double

Horizontal field of view (in degree)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

adjacencyDepth Int

Mark neighbors polygons as visible

root Occurrence

Specify another root for occluder scene

Returns

BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)

removeOccludedGeometriesFromViewPoints

algo.removeOccludedGeometriesFromViewPoints(occurrences, level, positions, directions, ups, resolution, fovX, considerTransparentOpaque, adjacencyDepth, root) -> core.BoolList

Parameters

occurrences OccurrenceList

Occurrences of components to process

level SelectionLevel

Level of geometries to remove : Parts, Patches or Polygons

positions Point3List

List of positions

directions Point3List

List of directions

ups Point3List

List of up vectors

resolution Int

Resolution of the visibility viewer

fovX Double

Horizontal field of view (in degree)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

adjacencyDepth Int

Mark neighbors polygons as visible

root Occurrence

Specify another root for occluder scene

Returns

BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)

createOcclusionMesh

Compute an occluder or an occludee with the occurrences selected

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.createOcclusionMesh(occurrences, type, voxelSize, gap) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

type CreateOccluder

Type of what we create

voxelSize Distance

Size of voxels

gap Int

Dilation iterations on the voxel grid

Returns

Occurrence

Resulting part occurrence

dualContouring

Replace the tessellations of the selected parts by a retopology based on a dual-contouring

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.dualContouring(occurrences, minFixedDepth, maxDepth, tolerance, sameSizeOnAllAxis, aabb) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

minFixedDepth Int

Minimum depth of the octree for removing inside parts

maxDepth Int

Maximum depth of the octree for the dual-contouring (defines the minimum polygon size)

tolerance Double

Tolerance for the quadric error used for the simplification of the octree

sameSizeOnAllAxis Boolean

If true, use the maximum axis length of the AABB for all axis

aabb AABB

AABB to use for the root of the octree

Returns

Occurrence

Resulting part occurrence

dualContouringTarget

Replace the tessellations of the selected parts by a retopology based on a dual-contouring, controlled by a size in millimeter

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.dualContouringTarget(occurrences, filteringSize, voxelSize, tolerance, sameSizeOnAllAxis) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

filteringSize Distance

Filtering size - must be a multiple of 2 of voxelSize

voxelSize Distance

Voxel size used for the reconstruction

tolerance Double

Tolerance for the quadric error used for the simplification of the octree

sameSizeOnAllAxis Boolean

If true, use the maximum axis length of the AABB for all axis

Returns

Occurrence

Resulting part occurrence

marchingCubes

Replace the tessellations of the selected parts by a marching cube representation

See also:

algo.marchingCubes(occurrences, voxelSize, elements, dilation, surfacic) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

voxelSize Distance

Size of voxels

elements ElementFilter

Type of elements used to detect the voxels, polygons or points or hybrid

dilation Int

Dilation iterations on the voxel grid (only if surfacic=false)

surfacic Boolean

Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight

Returns

Occurrence

Resulting part occurrence

proxyMesh

Replace the tessellations of the selected parts by a proxy mesh based on a voxelization

See also:

algo.proxyMesh(occurrences, voxelSize, elements, dilation, surfacic) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

voxelSize Distance

Size of voxels

elements ElementFilter

Type of elements used to detect the voxels, polygons or points or hybrid

dilation Int

Dilation iterations on the voxel grid (only if surfacic=false)

surfacic Boolean

Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight

Returns

Occurrence

Resulting part occurrence

retopologize

Replace the tessellations of the selected parts by a retopology of the external hull

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.retopologize(occurrences, targetTriangleCount, pureQuad, pointCloud, precision) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

targetTriangleCount Int

Target triangle count

pureQuad Bool

Retopologize to a pure quad mesh if True, else the resulting mesh will be quad dominant but can contains triangles

pointCloud Bool

Set to true if occurrences are point cloud, else False

precision Distance

If set, define the precision of the features to preserve

Returns

Occurrence

Resulting part occurrence

voxelize

Replace the tessellations of the selected parts by a voxelization of the external skin

See also:

algo.voxelize(occurrences, voxelSize, elements, dilation, useCurrentAnimationPosition) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

voxelSize Distance

Size of voxels

elements ElementFilter

Type of elements used to detect the voxels, polygons or points or hybrid

dilation Int

Dilation iterations on the voxel grid

useCurrentAnimationPosition Boolean

Use the current animation position instead of the t-pose

Returns

Occurrence

Resulting part occurrence

replaceBy

Replace geometries by other shapes, or primitives

See also:

algo.replaceBy(occurrences, replaceBy=["Occurrence", algo.ReplaceByOccurrenceOptions(0, False)])

Parameters

occurrences OccurrenceList

Occurrences of components to replace

replaceBy ReplaceByOption

Shape replacement option

replaceByBox

Replace objects by a bounding box

See also:

algo.replaceByBox(occurrences, boxType)

Parameters

occurrences OccurrenceList

Occurrences of components to replace

boxType ReplaceByBoxType

Bounding box type, oriented, axis-aligned, ...

replaceByConvexHull

Replace objects by convex hull

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.replaceByConvexHull(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to replace

replaceByPrimitive

Replace objects by a primitive shapes

See also:

algo.replaceByPrimitive(occurrences, primitive, generateUV=True)

Parameters

occurrences OccurrenceList

Occurrences of components to replace

primitive PrimitiveShapeParameters

Primitive type and parameters

generateUV Boolean

Primitive type and parameters

sawWithAABB

Saw the mesh with an axis-aligned bounding box. New parts will be placed as children of input part occurrences.

See also:

algo.sawWithAABB(occurrences, aabb, mode, innerSuffix="_inner", outerSuffix="_outer")

Parameters

occurrences OccurrenceList

Part occurrences to process

aabb AABB

Axis-Aligned Bounding Box

mode SawingMode

The sawing mode

innerSuffix String

Only if mode is set to SawAndSplit, set the suffix of the inner part

outerSuffix String

Only if mode is set to SawAndSplit, set the suffix of the outer part

sawWithOBB

Saw the mesh with an oriented bounding box. New parts will be placed as children of input part occurrences.

See also:

algo.sawWithOBB(occurrences, obb, mode, innerSuffix="_inner", outerSuffix="_outer")

Parameters

occurrences OccurrenceList

Part occurrences to process

obb OBB

Minimum Bounding Box

mode SawingMode

The sawing mode

innerSuffix String

Only if mode is set to SawAndSplit, set the suffix of the inner part

outerSuffix String

Only if mode is set to SawAndSplit, set the suffix of the outer part

sawWithOctree

Saw and split the mesh with an octree. New parts will be placed as children of input part occurrences.

See also:

algo.sawWithOctree(occurrences, aabb, maxDepth, maxTrianglesByLeaf, sawTolerance) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Part occurrences to process

aabb AABB

Octree Bounding Box

maxDepth Int

Depth of the octree

maxTrianglesByLeaf Int

Set the maximum triangle count on the leaf of the octree ( -1 to not use )

sawTolerance Double

Size in mm of the tolerance of the saw

Returns

Occurrence

Root occurrence of the created octree

sawWithPlane

Saw the mesh with a plane. New parts will be placed as children of input part occurrences.

See also:

algo.sawWithPlane(occurrences, planeOrigin, planeNormal, mode, innerSuffix="_inner", outerSuffix="_outer", tolerance=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

planeOrigin Point3

The plane origin

planeNormal Vector3

The plane normal

mode SawingMode

The sawing mode

innerSuffix String

Only if mode is set to SawAndSplit, set the suffix of the inner part

outerSuffix String

Only if mode is set to SawAndSplit, set the suffix of the outer part

tolerance Double

Set a tolerance to make the saw lose

convertSimilarPartOccurrencesToInstances

Create instances from similar part occurrences with an accurate method based on topology checksums. This can be used to repair instances or to simplify a model that has similar parts that could be instantiated instead to reduce the number of unique meshes (reduces drawcalls, GPU memory usage and file size).

See also:

algo.convertSimilarPartOccurrencesToInstances(occurrences, checkMeshTopo=True, checkVertexPositions=True, vertexPositionPrecision=5, checkUVTopo=True, checkUVVertexPositions=True, UVPositionprecision=5, keepExistingPrototypes=False)

Parameters

occurrences OccurrenceList

Occurrence for which we want to find similar parts and create instances using prototypes.

checkMeshTopo Boolean
checkVertexPositions Boolean
vertexPositionPrecision Int
checkUVTopo Boolean
checkUVVertexPositions Boolean
UVPositionprecision Int
keepExistingPrototypes Boolean

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.

See also:

algo.convertSimilarPartOccurrencesToInstancesFast(occurrences, dimensionsSimilarity=0.98, polycountSimilarity=0.98, ignoreSymmetry=False, keepExistingPrototypes=True, createNewOccurrencesForPrototypes=True)

Parameters

occurrences OccurrenceList

Root occurrences for which we want to find similar part occurrences and create instances using prototypes.

dimensionsSimilarity Coeff

The 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.

polycountSimilarity Coeff

The 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.

ignoreSymmetry Boolean

If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.

keepExistingPrototypes Boolean

If True, existing prototypes will be kept. Otherwise, the selection will be singularized and instanced will be created from scratch.

createNewOccurrencesForPrototypes Boolean

If True, a new occurrence will be created for each prototype. Those occurrences won't appear in the hierarchy, and so deleting one of the part in the scene has no risks of singularizing. If set to False, an arbitrary occurrence will be used as the prototype for other similar occurrences, which is less safe but will result in less occurrences.

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.

See also:

algo.findSimilarPartOccurrencesFast(occurrences, dimensionsSimilarity, polycountSimilarity, ignoreSymmetry) -> scene.OccurrenceList

Parameters

occurrences OccurrenceList

Occurrences for which we want to find similar part occurrences in the scene.

dimensionsSimilarity Coeff

The 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.

polycountSimilarity Coeff

The 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.

ignoreSymmetry Boolean

If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.

Returns

OccurrenceList

The list of part occurrences meeting the criteria

alignUVIslands

algo.alignUVIslands(occurrences, channel=0, usePolygonsWeights=0, useVerticesWeights=0, alignmentMode=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

UV channel to merge

usePolygonsWeights Double

Use polygons weights to give more importance to what must be aligned

useVerticesWeights Double

Use vertices weights to give more importance to what must be aligned

alignmentMode AlignmentMode

With which axis the UVs should be aligned

applyUvTransform

algo.applyUvTransform(occurrences, matrix, channel=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

matrix Matrix4

Transformationmatrix

channel Int

UV channel to transform

automaticUVMapping

algo.automaticUVMapping(occurrences, channel=0, maxAngleDistorsion=0.5, maxAreaDistorsion=-1, sharpToSeam=True, forbidOverlapping=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

The UV channel which will contains the texture coordinates

maxAngleDistorsion Double

Maximum angle distorsion |2PI-SumVtxAng|/2PI

maxAreaDistorsion Double

Maximum area distorsion before scale to 1. |2DArea-3DArea|/3DArea

sharpToSeam Bool

If enabled, sharp edges are automatically considered as UV seams

forbidOverlapping Bool

If enabled, UV cannot overlap

copyUV

algo.copyUV(occurrences, sourceChannel=0, destinationChannel=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

sourceChannel Int

The source UV channel to copy

destinationChannel Int

The destination UV channel to copy into

defragmentUVIslands

algo.defragmentUVIslands(occurrences, channel=0, targetIslandCount=0, energyThreshold=0.01, forceIsolatedFaces=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

UV channel to use

targetIslandCount Int

Target number of islands (zero means the algorithm runs until no more merging is possible)

energyThreshold Double

Max energy allowed during local reparametrization

forceIsolatedFaces Boolean

UV islands consisting in a single isolated face completely surrounded by another island are forced to be merged, without reparametrization.

flattenUV

algo.flattenUV(occurrences, channel=0, iterations=1, newtonTolf=1.0, newtonTolx=1.0)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

UV channel to merge

iterations Int

Number of iterations to perform

newtonTolf Double

Threshold for gradient normals

newtonTolx Double

Threshold for gradient normals

getRatioUV3D

algo.getRatioUV3D(occurrences, ratioMode, channel) -> core.DoubleList

Parameters

occurrences OccurrenceList

Part occurrences to process

ratioMode RatioUV3DMode

Choose how to compute the ratio

channel Int

UV channel to use

Returns

DoubleList

Ratios 3Dsize/UVsize of the input occurrences

getUVQualityMetrics

algo.getUVQualityMetrics(occurrences, channel) -> core.UInt, core.Double, core.Double, core.Double, core.Double, core.Double

Parameters

occurrences OccurrenceList

Part occurrences to process

channel UInt

UV channel to use

Returns

UInt

Number of UV islands. If 0, all other returns are invalid.

getUvAabr

algo.getUvAabr(occurrences, channel) -> geom.AABR

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

UV channel to transform

Returns

AABR

The UV AABR

mapUvOnAABB

algo.mapUvOnAABB(occurrences, useLocalAABB=False, uv3dSize=100, channel=0, overrideExistingUVs=True, ignoreScale=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

useLocalAABB Bool

If enabled, uses part own bounding box, else use global one

uv3dSize Distance

3D size of the UV space [0-1]

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

ignoreScale Boolean

If this and useLocalAABB are true, ignore local scale

mapUvOnBox

algo.mapUvOnBox(occurrences, box, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

box Box

Box definition

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mapUvOnCubicAABB

algo.mapUvOnCubicAABB(occurrences, uv3dSize=100, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

uv3dSize Distance

3D size of the UV space [0-1]

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mapUvOnCustomAABB

algo.mapUvOnCustomAABB(occurrences, aabb, uv3dSize=100, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

aabb AABB

Axis aligned bounding box to project on

uv3dSize Distance

3D size of the UV space [0-1]

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mapUvOnCylinder

algo.mapUvOnCylinder(occurrences, cylinder, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

cylinder Cylinder

Cylinder definition

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mapUvOnFittingCylinder

algo.mapUvOnFittingCylinder(occurrences, channel=0, overrideExistingUVs=True, useAABB=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

useAABB Boolean

If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB only based on transformed AABB of occurrences)

mapUvOnFittingSphere

algo.mapUvOnFittingSphere(occurrences, channel=0, overrideExistingUVs=True, useAABB=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

useAABB Boolean

If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB only based on transformed AABB of occurrences)

mapUvOnMBB

algo.mapUvOnMBB(occurrences, useLocalMBB=False, uv3dSize=100, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

useLocalMBB Bool

If enabled, uses part own bounding box, else use global one

uv3dSize Distance

3D size of the UV space [0-1]

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mapUvOnPlane

algo.mapUvOnPlane(occurrences, plane, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

plane Plane

Plane definition

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mapUvOnSphere

algo.mapUvOnSphere(occurrences, sphere, channel=0, overrideExistingUVs=True)

Parameters

occurrences OccurrenceList

Part occurrences to process

sphere Sphere

Sphere definition

channel Int

The UV channel which will contains the texture coordinates

overrideExistingUVs Boolean

If True, override existing UVs on channel

mergeUVIslands

algo.mergeUVIslands(occurrences, channel=0, scaleWeights=0, maxScaleVariationFactor=1.2, curvatureWeights=-1, usePolygonsWeights=1, useVerticesWeights=-1, maxTransformationType=0, allowUVInversion=False)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

UV channel to merge

scaleWeights Double

Weight to assign to scale for the merging priority

maxScaleVariationFactor Double

Maximum scaling factor allowed, -1 meaning no limits

curvatureWeights Double

Weight to assign to curvature for the merging priority

usePolygonsWeights Double

Use polygons weights to prioritize seams between polygons with less weight. The value represents the feature weight

useVerticesWeights Double

Use vertices weights to prioritize seams where vertices with less weight. The value represents the feature weight

maxTransformationType MaxTransformationType

Maximum transformation allowed: TRS only, affine and perspective

allowUVInversion Boolean

Allow merged UVs to be inverted

normalizeUV

algo.normalizeUV(occurrences, sourceUVChannel=0, destinationUVChannel=-1, uniform=True, sharedUVSpace=True, ignoreNullIslands=False)

Parameters

occurrences OccurrenceList

Part occurrences to process

sourceUVChannel Int

UV Channel to normalize

destinationUVChannel Int

UV channel to store the normalized UV (if -1, sourceUVChannel will be replaced)

uniform Boolean

If true, the scale will be uniform. Else UV can be deformed with a non-uniform scale

sharedUVSpace Boolean

If true, all parts will be processed as if they were merged to avoid overlapping of their UV coordinates

ignoreNullIslands Boolean

If true, islands with null height and width will be ignored and their UV coordinates will be set to [0,0] (Slower if enabled)

relaxUV

algo.relaxUV(occurrences, method, iterations=100, channel=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

method RelaxUVMethod

What the method used to relax is based on

iterations Int

Number of relax iterations

channel Int

The UV channel to repack

removeUV

algo.removeUV(occurrences, channel=-1)

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

The UV channel to remove (all if channel=-1)

repackUV

algo.repackUV(occurrences, channel, shareMap, resolution, padding, uniformRatio, iterations, removeOverlaps) -> scene.OccurrenceList

Parameters

occurrences OccurrenceList

Part occurrences to process

channel Int

The UV channel to repack

shareMap Boolean

If True, the UV of all given parts will be packed together

resolution Int

Resolution wanted for the final map

padding UInt

Set the padding (in pixels) between UV islands

uniformRatio Boolean

If true, UV of different part will have the same ratio

iterations Int

Fitting iterations

removeOverlaps Boolean

Remove overlaps to avoid multiple triangles UVs to share the same pixel

Returns

OccurrenceList

Parts which failed to be repacked at this resolution (try to increase the resolution or decrease the padding)

resizeUVsToTextureSize

algo.resizeUVsToTextureSize(occurrences, TextureSize=100, channel=0)

Parameters

occurrences OccurrenceList

Occurrences to use for the rescaling

TextureSize Distance

Texture size to use for the UV coordinates (in millimeters)

channel Int

UV channel to use

scaleUV

algo.scaleUV(occurrences, scaleU, scaleV, channel=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

scaleU Double

Scale to apply to U coordinate

scaleV Double

Scale to apply to V coordinate

channel Int

UV channel to transform

smoothUV

algo.smoothUV(occurrences, iterations=1, channel=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

iterations Int

Number of smooth iterations

channel Int

The UV channel which will contains the texture coordinates to smooth

swapUvChannels

algo.swapUvChannels(occurrences, firstChannel=0, secondChannel=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

firstChannel Int

First UV Channel to swap

secondChannel Int

Second UV Channel to swap

transferVisibilityToPolygonalWeight

algo.transferVisibilityToPolygonalWeight(occurrences, Mode=0)

Parameters

occurrences OccurrenceList

Part occurrences to process

Mode VisibilityToWeightMode

Mode used to compute visibility

getFittingCylinder

Returns the fitting cylinder of a set of occurrences (based on MBB)

See also:

algo.getFittingCylinder(occurrences, useAABB) -> geom.Affine

Parameters

occurrences OccurrenceList

Occurrences to fit

useAABB Boolean

If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box MBB only based on transformed AABB of occurrences)

Returns

Affine

Affine transformation of the cylinder

getFittingSphere

Returns the fitting sphere of a set of occurrences

See also:

algo.getFittingSphere(occurrences, useAABB) -> geom.Affine

Parameters

occurrences OccurrenceList

Occurrences to fit

useAABB Boolean

If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB only based on transformed AABB of occurrences)

Returns

Affine

Affine transformation of the sphere

bakeMaps

Bake texture maps on meshes from self or other meshes

See also:

algo.bakeMaps(destinationOccurrences, sourceOccurrences, mapsToBake, channel, resolution, padding, shareMaps, mapSuffix, additionalCustomMaps, tolerance, method, opacityThreshold, useCurrentPosition, offset, callbackList, oneToOne, reuseMaps, outputUsedMap) -> material.ImageList

Parameters

destinationOccurrences OccurrenceList

Occurrences of the meshes where to store the baked map

sourceOccurrences OccurrenceList

Occurrences of components from which to bake maps (if empty use destination)

mapsToBake BakeMapList

List of map to generate (Normal, Diffuse, ...)

channel Int

UV channel of destOccurrence to use for the map generation

resolution Int

Map resolution

padding Int

Add padding to the map. A negative value means that the texture will be filled, and the padding for uv island is the absolute value

shareMaps Boolean

If true, all the destinationOccurrences will share the same maps

mapSuffix String

Add a suffix to the map names

additionalCustomMaps CustomBakeMapList

Additional custom maps to bake

tolerance Distance

Tolerance of projection for baking from source to destination

method BakingMethod

Method to find source color if source occurrences are different than destination occurrences (Prefer ProjOnly for point clouds and RayOnly for meshes)

opacityThreshold Coeff

If the opacity is under this threshold, considers as fully transparent and store the color behind the intersection

useCurrentPosition Boolean

Use the current position instead of the T-Pose of the input occurrence

offset Distance

Offset from mesh

callbackList getPixelValueList

Callbacks that returns a color

oneToOne Boolean

If true, each occurrence in sourceOccurrences will be baked to the occurrence in destinationOccurrences at the same index

reuseMaps ImageList

Allow to use existing image instead of creating new ones (override shareMaps=true) the maps must be in the same order than mapsToBake+additionalCustomMaps+callbackList + usedMap (see: outputUsedMap)

outputUsedMap Boolean

If True, an extra maps contained used pixels is output at the end of bakedMaps. It can be used by reuseMaps

Returns

ImageList

Baked map list

convertNormalMap

Convert an existing normal map between Object-space and Tangent-space

See also:

algo.convertNormalMap(partOccurrences, normalMap, uvChannel, sourceIsObjectSpace, destinationIsObjectSpace, sourceIsRightHanded, destinationIsRightHanded, replaceMap, resolution, padding) -> material.Image

Parameters

partOccurrences OccurrenceList

Occurrences of components using the given map

normalMap Image

Source normal map to convert

uvChannel Int

UV channel used on the given map

sourceIsObjectSpace Boolean

If True, consider the given normalMap in Object-space representation, else Tangent-space

destinationIsObjectSpace Boolean

If True, convert the given normalMap to Object-space representation, else Tangent-space

sourceIsRightHanded Boolean

Considers source normal map as part of a right-handed coordinates system

destinationIsRightHanded Boolean

Generate destination normal map as part of a right-handed coordinates system

replaceMap Boolean

If true, the given normalMap will be replaced by the converted one

resolution Int

New map resolution (if replaceMap=false), if resolution=-1, the input resolution will be used

padding Int

Number 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

Image

Converted normal map (equals normalMap if replaceMap=true)

createBillboard

algo.createBillboard(occurrences, resolution, XPositive, XNegative, YPositive, YNegative, ZPositive, ZNegative, moveFacesToCenter, leftHandedNormalMap) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Occurrences to bake in the billboard

resolution Int

Total resolution of the billboard (contains all wanted faces)

XPositive Bool

Bake face facing X+

XNegative Bool

Bake face facing X-

YPositive Bool

Bake face facing Y+

YNegative Bool

Bake face facing Y-

ZPositive Bool

Bake face facing Z+

ZNegative Bool

Bake face facing Z-

moveFacesToCenter Bool

If true, all face are moved to the center of the AABB of the occurrences, else it will shape an AABB

leftHandedNormalMap Bool

If true, a left handed normal map will be generated

Returns

Occurrence

Resulting billboard

fillNormalMap

Fill normal map (useful after a decimation for example)

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.fillNormalMap(normalMap)

Parameters

normalMap Image

Source normal map to convert

orientNormalMap

Orient a tangent space normal map (all Z positive)

Warning

This function is tagged as EXPERIMENTAL.

See also:

algo.orientNormalMap(normalMap)

Parameters

normalMap Image

Normal map to orient

barySmooth

algo.barySmooth(occurrences, iteration=1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

iteration Int

Number of iterations

crackMoebiusStrips

algo.crackMoebiusStrips(occurrences, maxEdgeCount=3)

Parameters

occurrences OccurrenceList

Occurrences of components to repair

maxEdgeCount Int

Maximum number of edges to crack to remove one moebius strip

crackNonManifoldVertices

algo.crackNonManifoldVertices(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to repair

createCavityOccurrences

algo.createCavityOccurrences(occurrences, voxelSize, minimumCavityVolume, mode, parent) -> scene.Occurrence

Parameters

occurrences OccurrenceList

Occurrences set to identify cavities

voxelSize Distance

Size of the voxels in mm

minimumCavityVolume Volume

Minimum volume of a cavity in cubic meter

mode InnerOuterOption

Select where to place camera (all cavities, only outer or only inner cavities)

parent Occurrence

The create occurrence root will be added under the parent if given, else it will be added under the deeper parent of given occurrences

Returns

Occurrence

Parent occurrence of the cavity occurrences

invertPolygonFacesOrientation

algo.invertPolygonFacesOrientation(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

moebiusCracker

algo.moebiusCracker(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to repair

orientNormals

algo.orientNormals(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to orient normals

remeshSurfacicHoles

algo.remeshSurfacicHoles(occurrences, maxDiameter=0.1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

maxDiameter Distance

Maximum surfacic holes diameters

removeDegeneratedPolygons

algo.removeDegeneratedPolygons(occurrences, tolerance=0.1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

tolerance Distance

Degenerated tolerance

removeMultiplePolygon

algo.removeMultiplePolygon(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to repair

removeZFighting

algo.removeZFighting(occurrences) -> geom.Distance

Parameters

occurrences OccurrenceList

Occurrences to process

Returns

Distance

Offset value used by the algorithm

repairMesh

algo.repairMesh(occurrences, tolerance=0.1, crackNonManifold=True, orient=True)

Parameters

occurrences OccurrenceList

Occurrences of components to process

tolerance Distance

Connection tolerance

crackNonManifold Bool

At the end of the repair process, crack resulting non-manifold edges

orient Boolean

If true reorient the model

repairNullNormals

algo.repairNullNormals(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to repair null normals

separateToManifold

algo.separateToManifold(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

sewBoundary

algo.sewBoundary(occurrences, maxDistance)

Parameters

occurrences OccurrenceList

Occurrences of components to repair

maxDistance Distance

Maximum distance between bundaries

vertexOffset

algo.vertexOffset(occurrences, offset=1)

Parameters

occurrences OccurrenceList

Occurrences to process

offset Distance

Displacement

orientFromFace

Orient all connected polygons in the same orientation of the polygon selectionned

See also:

algo.orientFromFace()

orientPolygonFaces

algo.orientPolygonFaces(occurrences, makeOrientable=True, useArea=False, orientStrategy=0)

Parameters

occurrences OccurrenceList

Occurrences of components to process

makeOrientable Boolean

Crack moebius strips to make the model orientable

useArea Boolean

Use the area instead of counting the number of triangle

orientStrategy OrientStrategy

Strategy to adopt with this algorithm

orientPolygonFacesAdvanced

Properly orient all polygons in the same direction, using voxel based view points placement.

See also:

algo.orientPolygonFacesAdvanced(occurrences, voxelSize=100, minimumCavityVolume=1, resolution=64, mode=0, considerTransparentOpaque=True, orientStrategy=0)

Parameters

occurrences OccurrenceList

Occurrences to orient

voxelSize Distance

Size of the voxels in mm (smaller it is, more viewpoints there are)

minimumCavityVolume Volume

Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are)

resolution Int

Resolution of the visibility viewer

mode InnerOuterOption

Select where to place camera (all cavities, only outer or only inner cavities)

considerTransparentOpaque Boolean

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque

orientStrategy OrientStrategyAdvanced

Strategy to adopt with this algorithm

orientPolygonFacesFromCamera

Properly orient all polygons in the same direction, using a specified viewpoint

See also:

algo.orientPolygonFacesFromCamera(occurrences, cameraPosition, cameraDirection, cameraUp, resolution=1024, fovX=90)

Parameters

occurrences OccurrenceList

Occurrences to orient

cameraPosition Point3

Camera position

cameraDirection Point3

Camera direction

cameraUp Point3

Camera up vector

resolution Int

Resolution of the visibility viewer

fovX Double

Horizontal field of view (in degree)

equilateralize

Sswap edges to make triangles more equilateral

See also:

algo.equilateralize(occurrences, maxIterations=1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

maxIterations Int

Maximum number of swapping iteration

quadify

Merge all triangle polygons in the meshes to quadrangles

See also:

algo.quadify(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

requadify

Advanced function to requadify a triangle tessellation coming from full quad mesh

See also:

algo.requadify(occurrences, forceFullQuad=True)

Parameters

occurrences OccurrenceList

Occurrences of components to process

forceFullQuad Bool

Force the results to be only full quad. It it's impossible, nothing is done

toEditableMesh

Convert all static mesh to editable mesh

See also:

algo.toEditableMesh(occurrences)

Parameters

occurrences OccurrenceList

Occurrences to convert to editable mesh

toStaticMesh

Convert all editable mesh to static mesh

See also:

algo.toStaticMesh(occurrences)

Parameters

occurrences OccurrenceList

Occurrences to convert to static mesh

triangularize

Split all non-triangle polygons in the meshes to triangles

See also:

algo.triangularize(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

createVertexWeightsFromVertexColors

Use vertex colors attributes on meshes of the given occurrence to create vertex weights attributes used by the decimation functions, the finals weights will be computed with w = offset + (red - blue) * scale

See also:

algo.createVertexWeightsFromVertexColors(occurrences, offset=0, scale=1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

offset Double

Offset value for weight computation

scale Double

Scale value for weight computation

createVertexWeightsFromVisibilityAttributes

Use visibility attributes on meshes of the given occurrence to create vertex weights attributes used by the decimation functions. The finals weights will be computed with w = offset + (visibility/maxVisibility) * scale

See also:

algo.createVertexWeightsFromVisibilityAttributes(occurrences, offset=0, scale=1)

Parameters

occurrences OccurrenceList

Occurrences of components to process

offset Double

Offset value for weight computation

scale Double

Scale value for weight computation

deleteVertexWeights

Remove any existing vertex weights attributes on given occurrences

See also:

algo.deleteVertexWeights(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to process

createVisibilityAttributes

Create visibility attributes on tessellations

See also:

algo.createVisibilityAttributes(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to create attributes

deleteVisibilityAttributes

Delete visibility attributes on tessellations

See also:

algo.deleteVisibilityAttributes(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to delete attributes

flagVisibilityAttributesOnTransparents

Add one count to all visiblility attributes (poly and patch) on transparent patches

See also:

algo.flagVisibilityAttributesOnTransparents(occurrences)

Parameters

occurrences OccurrenceList

Occurrences of components to create attributes