Class Algo
Inheritance
Namespace:
Syntax
Methods
assembleCAD
Assemble faces of CAD shapes
Declaration
algo.assembleCAD(occurrences, tolerance=0.1, removeDuplicatedFaces=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to assemble |
Distance | tolerance | Assembling tolerance |
Boolean | removeDuplicatedFaces | If True, duplicated faces will be removed |
backToInitialBRep
Create the BRep shape from a Tessellated shape with Domain Patch Attributes (after tessellate)
Declaration
algo.backToInitialBRep(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
bakeImpostor
bakes impostors textures
Declaration
algo.bakeImpostor(occurrence, XFrames, YFrames, hemi, resolution, padding, roughness, metallic, ao) -> algo.OctahedralImpostor
Parameters
Type | Name | Description |
---|---|---|
Occurrence | occurrence | |
Int | XFrames | |
Int | YFrames | |
Bool | hemi | |
Int | resolution | |
Int | padding | |
Boolean | roughness | |
Boolean | metallic | |
Boolean | ao |
Returns
Type | Description |
---|---|
OctahedralImpostor | The structure containing impostor data |
bakeVertexAttributes
Bake vertex attributes on meshes from other meshes
Declaration
algo.bakeVertexAttributes(destinationOccurrences, sourceOccurrences=[], skinnedMesh=True, positions=False, useCurrentPositionAsTPose=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | destinationOccurrences | Occurrences of the meshes where to store the baked vertex attributes |
OccurrenceList | sourceOccurrences | Occurrences of components from which to bake vertex attributes |
Boolean | skinnedMesh | Enabling skinned mesh baking (joint assignation for animation transfer) |
Boolean | positions | Enabling vertex position baking |
Boolean | useCurrentPositionAsTPose | 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.
Declaration
algo.calculateNormalsInPointClouds(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
combineMeshesByMaterials
Explode and (re)merge a set of mesh parts by visible materials
Declaration
algo.combineMeshesByMaterials(occurrences, mergeNoMaterials, mergeHiddenPartsMode) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of the parts to merge |
Boolean | mergeNoMaterials | 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
Type | Description |
---|---|
OccurrenceList | Resulting occurrences of the merged parts |
configureFunctionLogger
Declaration
algo.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
Type | Name | Description |
---|---|---|
String | functionName | |
Boolean | enableFunction | |
Boolean | enableParameters | |
Boolean | enableExecutionTime |
crackCADMoebiusStrip
Detect Moebius strip and crack them if there is somme of them in the selection
Declaration
algo.crackCADMoebiusStrip(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to check |
crackEdges
crack polygonal edges according to given criteria (deprecated, use crackMeshEdges instead)
Warning
This function is tagged as DEPRECATED.
Declaration
algo.crackEdges(occurrences, useAttributesFilter=True, sharpAngleFilter=45, useNonManifoldFilter=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | useAttributesFilter | Filters by attribute |
Angle | sharpAngleFilter | Sharp angle in degree to filter by edges sharpness, if the angle is negative do not filter |
Boolean | useNonManifoldFilter | Filters by manifold-ness. |
crackMeshEdges
crack polygonal edges according to given criteria
Declaration
algo.crackMeshEdges(occurrences, normal=False, uvs=False, uvChannels, loi=False, patches=False, nman=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | normal | Crack on sharp normals |
Boolean | uvs | Crack on UV seams |
IntList | uvChannels | If empty and uvs=true, crack all UV channel, else only channel specified in the list |
Boolean | loi | Crack on identifier Lines of Interests |
Boolean | patches | Crack on patch borders |
Boolean | nman | Crack on non-manifolds |
createFreeEdgesFromPatches
Create free edges from patch borders
Declaration
algo.createFreeEdgesFromPatches(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
createIdentifiedPatchesFromPatches
Create identified patch from existing patch (this is useful before cloning for baking)
Declaration
algo.createIdentifiedPatchesFromPatches(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | 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
Declaration
algo.createIndexMapFromOccurrences(occurrences, uvChannel, createTexture1D) -> material.Image
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | |
Int | uvChannel | |
Bool | createTexture1D | 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
Type | Description |
---|---|
Image |
createNormals
Create normal attributes on tessellations
Declaration
algo.createNormals(occurrences, sharpEdge=45, override=True, useAreaWeighting=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to create attributes |
Angle | sharpEdge | Edges with an angle between their polygons greater than sharpEdge will be considered sharp. If negative, smooth normals only. |
Boolean | override | If true, override existing normals, else only create normals on meshes without normals |
Boolean | useAreaWeighting | 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
Declaration
algo.createPointCloudKDTree(occurrences, depth, addToScene) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to process |
Int | depth | Kd tree depth |
Bool | addToScene | Add the KD-Tree to the current scene |
Returns
Type | Description |
---|---|
Occurrence | KD-Tree root occurrence |
createTangents
Create tangent attributes on tessellations
Declaration
algo.createTangents(occurrences, uvChannel=0, override=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to create attributes |
Int | uvChannel | UV channel to use for the tangents creation |
Boolean | override | 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
Declaration
algo.createVertexColorFromMaterials(occurrenceList)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrenceList |
createVisibilityPatchesFromPatch
Create visibility patches from existing patches
Declaration
algo.createVisibilityPatchesFromPatch(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
decimate
reduce the polygon count by removing some vertices
Declaration
algo.decimate(occurrences, surfacicTolerance=1, lineicTolerance=0.1, normalTolerance=5, texCoordTolerance=-1, releaseConstraintOnSmallArea=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | surfacicTolerance | Maximum distance between surfacic vertices and resulting simplified surfaces |
Distance | lineicTolerance | Maximum distance between lineic vertices and resulting simplified lines |
Angle | normalTolerance | Maximum angle between original normals and those interpolated on the simplified surface |
Distance | texCoordTolerance | Maximum distance (in 3D space) between original texcoords and those interpolated on the simplified surface |
Boolean | releaseConstraintOnSmallArea | 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.
Declaration
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 |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | surfacicTolerance | Error max between the simplified mesh et the old one |
Double | boundaryWeight | Boundary importance during the decimation |
Double | normalWeight | Normal importance during the decimation |
Double | UVWeight | UV importance during the decimation |
Double | sharpNormalWeight | Importance of sharp edges during the decimation |
Double | UVSeamWeight | Importance of UV seams during the decimation |
Angle | normalMaxDeviation | Constraint the normals deviation on decimated model |
Boolean | forbidUVOverlaps | Forbid UV to fold over and overlap during the decimation |
Double | UVMaxDeviation | Constraint the uv deviation on decimated model |
Double | UVSeamMaxDeviation | Constraint the uv seams deviation on decimated model |
Boolean | protectTopology | 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 |
QualitySpeedTradeoff | qualityTradeoff | 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
Declaration
algo.decimatePointClouds(occurrences, tolerance=500)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | tolerance | 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)
Declaration
algo.decimateTarget(occurrences, targetStrategy, UVImportance=0, protectTopology=False, iterativeThreshold=5000000, processMeshIndependently=False, maxQuadricAge=-1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | List of occurrences to process |
DecimateOptionsSelector | targetStrategy | Select between targetCount or ratio to define the number of triangles left after the decimation process |
UVImportanceEnum | UVImportance | Select importance of texture coordinates |
Boolean | protectTopology | If False, the topology of the mesh can change and some edges can become non-manifold |
ULong | iterativeThreshold | Number of triangles above which the iterative algorithm is used to limit the memory usage (disabled if processMeshIndependently=True) |
Boolean | processMeshIndependently | If true, each mesh will be processed independently and the triangleCount or ratio will apply by mesh (disable iterative method) |
Int | maxQuadricAge | If >0, define the maximum memory (number of collapse) of a vertex before a new evaluation of its quadric |
deleteAttibute
Delete designed attribute on tessellations
Declaration
algo.deleteAttibute(occurrence, type)
Parameters
Type | Name | Description |
---|---|---|
Occurrence | occurrence | Occurrence to detele attribute from |
AttributType | type | Attribute type |
deleteBRepShapes
Delete BRep representation on parts
Declaration
algo.deleteBRepShapes(occurrences, onlyTessellated=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | onlyTessellated | If True, delete only BRep represensation on part with a tessellated shape |
deleteFreeVertices
Delete all free vertices of the mesh of given parts
Declaration
algo.deleteFreeVertices(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
deleteLines
Delete all free line of the mesh of given parts
Declaration
algo.deleteLines(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
deleteNormals
Remove normal attributes on tessellations
Declaration
algo.deleteNormals(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to delete |
deletePatches
Delete patches attributes on tessellations
Declaration
algo.deletePatches(occurrences, keepOnePatchByMaterial=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | keepOnePatchByMaterial | 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
Declaration
algo.deletePolygons(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
deleteTangents
Remove tangent attributes on tessellations
Declaration
algo.deleteTangents(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to delete |
deleteTextureCoordinates
Delete texture coordinates on tessellations
Declaration
algo.deleteTextureCoordinates(occurrences, channel=-1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Int | channel | Choose Texture coordinates channel to delete (-1 for all channels) |
deleteVisibilityPatches
delete the visibility patches of given occurrences
Declaration
algo.deleteVisibilityPatches(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
evalDecimateErrorForTarget
returns the max error to set to reach a given target
Declaration
algo.evalDecimateErrorForTarget(occurrences, TargetStrategy, boundaryWeight, normalWeight, UVWeight, sharpNormalWeight, UVSeamWeight, forbidUVFoldovers, protectTopology) -> core.Double
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | List of occurrences to process |
DecimateOptionsSelector | TargetStrategy | Select between targetCount or ratio to define the number of triangles left after the decimation process |
Double | boundaryWeight | Defines how important the edges defining the mesh boundaries (free edges) are during the decimation process, to preserve them from distortion |
Double | normalWeight | Defines how important vertex normals are during the decimation process, to preserve the smoothing of the mesh from being damaged |
Double | UVWeight | Defines how important UVs (texture coordinates) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs) |
Double | sharpNormalWeight | Defines how important sharp edges (or hard edges) are during the decimation process, to preserve them from being distorted |
Double | UVSeamWeight | 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) |
Boolean | forbidUVFoldovers | Forbids UVs to fold over and overlap each other during the decimation |
Boolean | protectTopology | 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
Type | Description |
---|---|
Double | Max error that can be used in decimateEdgeCollapse function |
extractNeutralAxis
Extract neutral axis from tessellations
Declaration
algo.extractNeutralAxis(occurrences, maxDiameter=100, removeOriginalMesh=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | maxDiameter | Maximum diameter of beams |
Boolean | removeOriginalMesh | 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.
Declaration
algo.filletMesh(occurrences, value, filletingMode=0, subdivisionNb=0, createFlatChamfer=False, material, uvChannel=-1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Input occurrences |
Double | value | Value (mm) |
FilletingMode | filletingMode | Filleting mode |
Int | subdivisionNb | Number of subdivision |
Boolean | createFlatChamfer | 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 |
Int | uvChannel | UV Channel for the created fillet polygons. Defaults: Use an existing channel if there is one. |
filterHiddenPolygons
remove hidden polygons using voxels and cavities
Declaration
algo.filterHiddenPolygons(occurrences, voxelSize=50)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | voxelSize | Size of voxels |
findBestPivotBetweenOccurrences
Try to compute the pivot point between 2 sets of occurrences
Declaration
algo.findBestPivotBetweenOccurrences(assembly1, assembly2, precision) -> geom.Matrix4
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | assembly1 | Set occurrences 1 |
OccurrenceList | assembly2 | Set occurrences 2 |
Double | precision | Precision used to determine if elements are similar |
Returns
Type | Description |
---|---|
Matrix4 | Best pivot between the two assembly. If impossible, return the null Matrix4 |
getAllAxisFromCADModel
Return all the main axis contained in the CAD models given
Declaration
algo.getAllAxisFromCADModel(occurrences) -> scene.OccurrenceList, geom.Matrix4ListList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to check |
Returns
Type | Description |
---|---|
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.
Declaration
algo.getOptimalTextureResolution(occurrences, texelPerMm) -> core.Int
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences on which to compute optimal texture resolution |
Double | texelPerMm | Number of texel per millimeter in a 3D space |
Returns
Type | Description |
---|---|
Int |
getTessellations
returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh)
Declaration
algo.getTessellations(occurrences) -> polygonal.TessellationList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Returns
Type | Description |
---|---|
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.
Declaration
algo.getUV3dRatio(occurrences) -> core.Double
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences on which to compute optimal texture resolution |
Returns
Type | Description |
---|---|
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
Declaration
algo.getVisibilityStats(occurrences) -> core.Int, core.Int
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Returns
Type | Description |
---|---|
Int |
getVisualComparisonFootprint
Compute the visual footprint of the difference between two sets of occurrences
Declaration
algo.getVisualComparisonFootprint(originalOccurrences, comparedOccurrences, resolution, viewpointCount, threshold, onHemisphereOnly) -> core.Double
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | originalOccurrences | Set of occurrences representing the ground truth |
OccurrenceList | comparedOccurrences | Set of occurrences to compare with the ground truth |
Int | resolution | Resolution of the viewer |
Int | viewpointCount | Number of viewpoints generated around the bounding sphere of all occurrences |
Double | threshold | Tolerance for pixel comparison |
Bool | onHemisphereOnly | Create viewpoints only in the Y+ hemisphere of the bounding sphere |
Returns
Type | Description |
---|---|
Double | The 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
Declaration
algo.identifyLinesOfInterest(occurrences, normal=False, uvs=False, uvChannels, border=False, patches=False, nman=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | normal | Add LoI on sharp normals |
Boolean | uvs | Add LoI on UV seams |
IntList | uvChannels | If empty and uvs=true, add LoI using all UV channels, else only channel specified in the list |
Boolean | border | Add LoI on boundary edges |
Boolean | patches | Add LoI on submesh borders |
Boolean | nman | Add LoI on non-manifolds edges |
identifyPatches
Create patches (submeshes) on meshes (needed by some functions)
Declaration
algo.identifyPatches(occurrences, useAttributesFilter=True, sharpAngleFilter=45, useBoundaryFilter=True, useNonManifoldFilter=True, useLineEdgeFilter=True, useQuadLineFilter=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | useAttributesFilter | Filters by attributes |
Angle | sharpAngleFilter | Sharp angle in degree to filter by edges sharpness, if the angle is negative do not filter |
Boolean | useBoundaryFilter | Filters by boundaries |
Boolean | useNonManifoldFilter | Filters by manifold-ness |
Boolean | useLineEdgeFilter | Filters by edge |
Boolean | useQuadLineFilter | Filters by quad lines |
identifySharpEdges
Mark as Lines Of Interest the sharp edges
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.identifySharpEdges(occurrences, minSharpAngle=90, maxSharpAngle=180, convexity=2, onlyExplicitSharp=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Input occurrences |
Angle | minSharpAngle | The angle between the normals - all edges sharpest than this will be filleted |
Angle | maxSharpAngle | All edges sharpest than this won't be filleted |
ConvexityFilter | convexity | Fillet sharp edges that are convex, concave or both |
Boolean | onlyExplicitSharp | If 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
Declaration
algo.invertTangents(occurrences, invertW=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to invert tangents on |
Boolean | invertW | If 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
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.lineToTexture(lines, useColor, resolution=512, thickness=5)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | lines | Lines to select |
UseColorOption | useColor | Set color policy. |
Int | resolution | Texture resolution |
Int | thickness | The thickness of the lines in pixels |
listFeatures
List features from tessellations
Declaration
algo.listFeatures(occurrences, throughHoles, blindHoles, maxDiameter) -> algo.OccurrenceFeaturesList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | throughHoles | List through holes |
Boolean | blindHoles | List blind holes |
Distance | maxDiameter | Maximum diameter of the holes to be list (-1=no max diameter) |
Returns
Type | Description |
---|---|
OccurrenceFeaturesList | List of features by occurrence |
loopSubdivMesh
Apply Loop Subdivision on Triangle-only Mesh
Declaration
algo.loopSubdivMesh(occurrences, depth=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Int | depth | Subdivision depth |
mergeVertices
merge near vertices according to the given distance
Declaration
algo.mergeVertices(occurrences, maxDistance, mask)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | maxDistance | Maximum distance between two vertex to merge |
TopologyCategoryMask | mask | Topological category of the vertices to merge |
meshBooleanOperation
Computes the boolean operation between the meshes of two occurrence lists
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.meshBooleanOperation(occurrencesA, occurrencesB, operation) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrencesA | Occurrences A |
OccurrenceList | occurrencesB | Occurrences B |
MeshBooleanOperation | operation | The operation to perform |
Returns
Type | Description |
---|---|
Occurrence | A new Occurrence bearing the result |
meshComparison
compare two meshes
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.meshComparison(mesh_1, mesh_2) -> geom.Distance
Parameters
Type | Name | Description |
---|---|---|
Occurrence | mesh_1 | |
Occurrence | mesh_2 |
Returns
Type | Description |
---|---|
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.
Declaration
algo.meshComparisonBatch(meshes1, meshes2) -> geom.DistanceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | meshes1 | |
OccurrenceList | meshes2 |
Returns
Type | Description |
---|---|
DistanceList | Disance between each couple of meshes |
meshIntersections
Computes the list of polylines at the intersections of the meshes of two occurrence lists
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.meshIntersections(occurrencesA, occurrencesB) -> geom.Point3ListList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrencesA | Occurrences A |
OccurrenceList | occurrencesB | Occurrences B |
Returns
Type | Description |
---|---|
Point3ListList | The intersections |
noiseMesh
Apply noise to vertex positions along their normals
Declaration
algo.noiseMesh(occurrences, maxAmplitude=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrencess to noise |
Distance | maxAmplitude | Maximum distance between original vertex and noisy vertex |
optimizeCADLoops
Optimize CAD Face loops by merging useless loop edges
Declaration
algo.optimizeCADLoops(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to optimize |
optimizeForRendering
Optimize mesh for rendering (lossless, only reindexing)
Declaration
algo.optimizeForRendering(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to optimize |
optimizeSubMeshes
Sort sub meshes by materials
Declaration
algo.optimizeSubMeshes(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | 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.
Declaration
algo.optimizeTextureSize(root, texelPerMm=2)
Parameters
Type | Name | Description |
---|---|---|
Occurrence | root | Root from which texture resizing will process |
Double | texelPerMm | Number of texel per millimeter in a 3D space |
removeHoles
Remove some features from tessellations
Declaration
algo.removeHoles(occurrences, throughHoles=True, blindHoles=False, surfacicHoles=False, maxDiameter=-1, fillWithMaterial=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | throughHoles | Remove through holes |
Boolean | blindHoles | Remove blind holes |
Boolean | surfacicHoles | Remove surfacic holes |
Distance | maxDiameter | Maximum diameter of the holes to be removed (-1=no max diameter) |
Material | fillWithMaterial | 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
Declaration
algo.repairCAD(occurrences, tolerance=0.1, orient=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to clean |
Distance | tolerance | Tolerance |
Boolean | orient | If true reorient the model |
segmentMesh
Segment Mesh into clusters guided by edge sharpnesses.
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.segmentMesh(occurrences, overwriteLoI=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | overwriteLoI | Overwrite the lines-of-interest parameters if true, else add them |
setFeatureComponentMaxIndex
Remap Index map of each FeatureComponent of selected occurrences
Declaration
algo.setFeatureComponentMaxIndex(occurrences, maxIndex)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | |
Int | maxIndex |
smoothMesh
Declaration
algo.smoothMesh(occurrences, mode, maxIterations=100, lockSignificantEdges=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
CostEvaluation | mode | Computation of cost |
Int | maxIterations | Maximum number of swapping iteration |
Boolean | lockSignificantEdges | Forbid to swap significant edges (e.g. UV seams, sharp edges, patch borders, ...) |
splitUVForAtlas
Declaration
algo.splitUVForAtlas(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Input occurrences |
sweep
Extrudes a circular section along an underlying polyline (curve)
Warning
This function is tagged as EXPERIMENTAL.
Declaration
algo.sweep(occurrences, radius=1, sides=10, createNormals=True, keepLines=False, generateUV=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to check |
Distance | radius | Radius of cylinders |
Int | sides | Number of points to create cylinders |
Boolean | createNormals | |
Boolean | keepLines | |
Boolean | generateUV |
tessellate
Create a tessellated representation from a CAD representation for each given part
Declaration
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 |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to tessellate |
Distance | maxSag | Maximum distance between the geometry and the tessellation |
Distance | maxLength | Maximum length of elements |
Angle | maxAngle | Maximum angle between normals of two adjacent elements |
Boolean | createNormals | If true, normals will be generated |
UVGenerationMode | uvMode | Select the texture coordinates generation mode |
Int | uvChannel | The UV channel of the generated texture coordinates (if any) |
Double | uvPadding | 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 |
Boolean | createTangents | If true, tangents will be generated |
Boolean | createFreeEdges | If true, free edges will be created for each patch borders |
Boolean | keepBRepShape | If true, BRep shapes will be kept for Back to Brep or Retessellate |
Boolean | overrideExistingTessellation | 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.
Declaration
algo.tessellatePointClouds(occurrences, kNeighbors=20, keepPoints=False, colorize=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | |
Int | kNeighbors | The number of neighbor points used to compute normals |
Boolean | keepPoints | Keep points after meshing if enabled |
Boolean | colorize | 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.
Declaration
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 |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to tessellate |
Distance | maxSag | Maximum distance between the geometry and the tessellation |
Double | sagRatio | Maximum ratio distance between the geometry and the tessellation |
Distance | maxLength | Maximum length of elements |
Angle | maxAngle | Maximum angle between normals of two adjacent elements |
Boolean | createNormals | If true, normals will be generated |
UVGenerationMode | uvMode | Select the texture coordinates generation mode |
Int | uvChannel | The UV channel of the generated texture coordinates (if any) |
Double | uvPadding | 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 |
Boolean | createTangents | If true, tangents will be generated |
Boolean | createFreeEdges | If true, free edges will be created for each patch borders |
Boolean | keepBRepShape | If true, BRep shapes will be kept for Back to Brep or Retessellate |
Boolean | overrideExistingTessellation | If true, already tessellated parts will be re-tessellated |
voxelizePointClouds
Explode point clouds to voxels
Declaration
algo.voxelizePointClouds(occurrences, voxelSize=500)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | voxelSize | Size of voxels |
combineMaterials
Combine materials found on occurrences subtrees into one baked material and assign it to part occurrences
See also:
Declaration
algo.combineMaterials(occurrences, bakingOptions, overrideExistingUVs=True, singularizeOnAO=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Root occurrences to process |
BakeOption | bakingOptions | Baking options |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
Boolean | singularizeOnAO | If true, singularize all instances in the selected subtree if we want to bake AO in the texture |
transferUV
Declaration
algo.transferUV(source, destination, sourceChannel=0, destinationChannel=0, tolerance=0.001)
Parameters
Type | Name | Description |
---|---|---|
Occurrence | source | Occurrence of the source mesh |
Occurrence | destination | Occurrence of the destination mesh |
Int | sourceChannel | Source UV channel to bake |
Int | destinationChannel | Destination UV channel to bake to |
Distance | tolerance | Geometric tolerance for point projection |
convexDecomposition
Explode each mesh to approximated convex decomposition
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
algo.convexDecomposition(occurrences, maxCount, vertexCount, approximate, resolution, concavity) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | maxCount | Maximum number of convex hull to generated |
Int | vertexCount | Maximum number of vertices per convex hull |
Boolean | approximate | Approximate method |
Int | resolution | Resolution |
Double | concavity | Concavity |
Returns
Type | Description |
---|---|
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:
Declaration
algo.explodeBodies(occurrences, groupOpenShells=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Boolean | groupOpenShells | 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:
Declaration
algo.explodeByMaterials(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
explodeByVertexCount
Explode part occurrences to respect a maximum vertex count
See also:
Declaration
algo.explodeByVertexCount(occurrences, maxVertexCount=65534, maxTriangleCount=65534, countMergedVerticesOnce=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | maxVertexCount | The maximum number of vertices by part |
Int | maxTriangleCount | The maximum number of triangles by part (quadrangles count twice) |
Boolean | countMergedVerticesOnce | 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:
Declaration
algo.explodeByVoxel(occurrences, voxelSize=500)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | voxelSize | Voxel size |
explodeConnectedMeshes
Explode connected set of polygons to part occurrences. New parts will be placed as children of input part occurrences.
See also:
Declaration
algo.explodeConnectedMeshes(occurrences, explodeNonManifoldEdges=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Boolean | explodeNonManifoldEdges | Split connected components along non-manifold edges |
explodePatches
Explode all parts by patch
See also:
Declaration
algo.explodePatches(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
createVisibilityInformation
Create visilibity information on part occurrences viewed from a set of camera automatically placed on a sphere around the scene
See also:
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromPoints
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.createVisibilityInformation(occurrences, level=0, resolution=1024, sphereCount=256, fovX=90, considerTransparentOpaque=False, root=0, onHemisphereOnly=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SelectionLevel | level | Level of geometries to create visibility information on: Parts, Patches or Polygons |
Int | resolution | Resolution of the visibility viewer |
Int | sphereCount | Number of viewpoints generated around the bounding sphere |
Double | fovX | Horizontal field of view (in degree) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Occurrence | root | Specify another root for occluder scene |
Bool | onHemisphereOnly | Create viewpoints only in the Y+ hemisphere of the bounding sphere |
createVisibilityInformationAdvanced
Create visilibity information on part occurrences viewed from a set of voxel based view points.
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromPoints
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.createVisibilityInformationAdvanced(occurrences, level=0, voxelSize=100, minimumCavityVolume=1, resolution=256, mode=0, considerTransparentOpaque=False, root=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SelectionLevel | level | Level of geometries to create visibility information on: Parts, Patches or Polygons |
Distance | voxelSize | Size of the voxels in mm (smaller it is, more viewpoints there are) |
Volume | minimumCavityVolume | Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are) |
Int | resolution | Resolution of the visibility viewer |
InnerOuterOption | mode | Select where to place camera (all cavities, only outer or only inner cavities) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Occurrence | root | Specify another root for occluder scene |
createVisibilityInformationFromViewPoints
Create visilibity information on parts viewed from a given set of camera
See also:
Declaration
algo.createVisibilityInformationFromViewPoints(occurrences, cameraPositions, cameraDirections, cameraUps, resolution=1024, fovX=90, considerTransparentOpaque=False, root=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Point3List | cameraPositions | List of camera positions |
Point3List | cameraDirections | List of camera directions |
Point3List | cameraUps | List of camera up vectors |
Int | resolution | Resolution of the visibility viewer |
Double | fovX | Horizontal field of view (in degree) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Occurrence | root | Specify another root for occluder scene |
findOccludedPartOccurrences
get part occurrences not viewed from a sphere around the scene
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromPoints
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.findOccludedPartOccurrences(occurrences, resolution, sphereCount, fovX, considerTransparentOpaque, root, onHemisphereOnly) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Int | resolution | Resolution of the visibility viewer |
Int | sphereCount | Number of viewpoints generated around the bounding sphere |
Double | fovX | Horizontal field of view (in degree) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Occurrence | root | Specify another root for occluder scene |
Bool | onHemisphereOnly | Create viewpoints only in the Y+ hemisphere of the bounding sphere |
Returns
Type | Description |
---|---|
OccurrenceList | The list of occurrences meeting the criteria |
findOccludedPartOccurrencesAdvanced
get part occurrences not viewed from a set of voxel based view points.
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromPoints
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.findOccludedPartOccurrencesAdvanced(occurrences, voxelSize, minimumCavityVolume, resolution, mode, considerTransparentOpaque, root) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | voxelSize | Size of the voxels in mm (smaller it is, more viewpoints there are) |
Volume | minimumCavityVolume | Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are) |
Int | resolution | Resolution of the visibility viewer |
InnerOuterOption | mode | Select where to place camera (all cavities, only outer or only inner cavities) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Occurrence | root | Specify another root for occluder scene |
Returns
Type | Description |
---|---|
OccurrenceList | The list of occurrences meeting the criteria |
removeOccludedGeometries
Delete part occurrences, patches or polygons not viewed from a sphere around the scene
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromPoints
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.removeOccludedGeometries(occurrences, level, resolution, sphereCount, fovX, considerTransparentOpaque, adjacencyDepth, occluders, onHemisphereOnly) -> core.BoolList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SelectionLevel | level | Level of geometries to remove : Parts, Patches or Polygons |
Int | resolution | Resolution of the visibility viewer |
Int | sphereCount | Number of viewpoints generated around the bounding sphere |
Double | fovX | Horizontal field of view (in degree) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Int | adjacencyDepth | Mark neighbors polygons as visible |
OccurrenceList | occluders | Specify other occurrences for occluder scene |
Bool | onHemisphereOnly | Create viewpoints only in the Y+ hemisphere of the bounding sphere |
Returns
Type | Description |
---|---|
BoolList | For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True) |
removeOccludedGeometriesAdvanced
Delete part occurrences, patches or polygons not seen from voxel based view points.
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesFromPoints
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.removeOccludedGeometriesAdvanced(occurrences, level, voxelSize, minimumCavityVolume, resolution, mode, considerTransparentOpaque, adjacencyDepth, occluders) -> core.BoolList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SelectionLevel | level | Level of geometries to remove : Parts, Patches or Polygons |
Distance | voxelSize | Size of the voxels in mm (smaller it is, more viewpoints there are) |
Volume | minimumCavityVolume | Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are) |
Int | resolution | Resolution of the visibility viewer |
InnerOuterOption | mode | Select where to place camera (all cavities, only outer or only inner cavities) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Int | adjacencyDepth | Mark neighbors polygons as visible |
OccurrenceList | occluders | Specify other occurrences for occluder scene |
Returns
Type | Description |
---|---|
BoolList | For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True) |
removeOccludedGeometriesFromPoints
Delete part occurrences, patches or polygons not viewed from spheres generated with a set of camera position
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromViewPoints
Declaration
algo.removeOccludedGeometriesFromPoints(occurrences, level, positions, resolution, sphereCount, fovX, considerTransparentOpaque, adjacencyDepth, occluders) -> core.BoolList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SelectionLevel | level | Level of parts to remove : Parts, Patches or Polygons |
Point3List | positions | List of positions |
Int | resolution | Resolution of the visibility viewer |
Int | sphereCount | Number of viewpoints generated around the bounding sphere |
Double | fovX | Horizontal field of view (in degree) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Int | adjacencyDepth | Mark neighbors polygons as visible |
OccurrenceList | occluders | Specify other occurrences for occluder scene |
Returns
Type | Description |
---|---|
BoolList | For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True) |
removeOccludedGeometriesFromViewPoints
Delete part occurrences, patches or polygons not viewed from a set of camera position/orientation
See also:
- algo.createVisibilityInformation
- algo.createVisibilityInformationAdvanced
- algo.createVisibilityInformationFromViewPoints
- algo.findOccludedPartOccurrences
- algo.findOccludedPartOccurrencesAdvanced
- algo.removeOccludedGeometries
- algo.removeOccludedGeometriesAdvanced
- algo.removeOccludedGeometriesFromPoints
Declaration
algo.removeOccludedGeometriesFromViewPoints(occurrences, level, positions, directions, ups, resolution, fovX, considerTransparentOpaque, adjacencyDepth, occluders) -> core.BoolList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SelectionLevel | level | Level of geometries to remove : Parts, Patches or Polygons |
Point3List | positions | List of positions |
Point3List | directions | List of directions |
Point3List | ups | List of up vectors |
Int | resolution | Resolution of the visibility viewer |
Double | fovX | Horizontal field of view (in degree) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
Int | adjacencyDepth | Mark neighbors polygons as visible |
OccurrenceList | occluders | Specify other occurrences for occluder scene |
Returns
Type | Description |
---|---|
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:
Declaration
algo.createOcclusionMesh(occurrences, type, voxelSize, gap) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
CreateOccluder | type | Type of what we create |
Distance | voxelSize | Size of voxels |
Int | gap | Dilation iterations on the voxel grid |
Returns
Type | Description |
---|---|
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:
Declaration
algo.dualContouring(occurrences, filteringSize, voxelSize, tolerance, sameSizeOnAllAxis) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of part to process |
Distance | filteringSize | Filtering size - must be a multiple of 2 of voxelSize |
Distance | voxelSize | Voxel size used for the reconstruction |
Double | tolerance | Tolerance for the quadric error used for the simplification of the octree |
Boolean | sameSizeOnAllAxis | If true, use the maximum axis length of the AABB for all axis |
Returns
Type | Description |
---|---|
Occurrence | Resulting part occurrence |
marchingCubes
Replace the tessellations of the selected parts by a marching cube representation
See also:
Declaration
algo.marchingCubes(occurrences, voxelSize, elements, dilation, surfacic) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | voxelSize | Size of voxels |
ElementFilter | elements | Type of elements used to detect the voxels, polygons or points or hybrid |
Int | dilation | Dilation iterations on the voxel grid (only if surfacic=false) |
Boolean | surfacic | Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight |
Returns
Type | Description |
---|---|
Occurrence | Resulting part occurrence |
proxyMesh
Replace the tessellations of the selected parts by a proxy mesh based on a voxelization
See also:
Declaration
algo.proxyMesh(occurrences, voxelSize, elements, dilation, surfacic) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | voxelSize | Size of voxels |
ElementFilter | elements | Type of elements used to detect the voxels, polygons or points or hybrid |
Int | dilation | Dilation iterations on the voxel grid (only if surfacic=false) |
Boolean | surfacic | Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight |
Returns
Type | Description |
---|---|
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:
Declaration
algo.retopologize(occurrences, targetTriangleCount, pureQuad, pointCloud, precision) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | targetTriangleCount | Target triangle count |
Bool | pureQuad | Retopologize to a pure quad mesh if True, else the resulting mesh will be quad dominant but can contains triangles |
Bool | pointCloud | Set to true if occurrences are point cloud, else False |
Distance | precision | If set, define the precision of the features to preserve |
Returns
Type | Description |
---|---|
Occurrence | Resulting part occurrence |
voxelize
Replace the tessellations of the selected parts by a voxelization of the external skin
See also:
Declaration
algo.voxelize(occurrences, voxelSize, elements, dilation, useCurrentAnimationPosition) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | voxelSize | Size of voxels |
ElementFilter | elements | Type of elements used to detect the voxels, polygons or points or hybrid |
Int | dilation | Dilation iterations on the voxel grid |
Boolean | useCurrentAnimationPosition | Use the current animation position instead of the t-pose |
Returns
Type | Description |
---|---|
Occurrence | Resulting part occurrence |
replaceBy
Replace geometries by other shapes, or primitives
See also:
Declaration
algo.replaceBy(occurrences, replaceBy=["Occurrence", algo.ReplaceByOccurrenceOptions(0, False)])
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
ReplaceByOption | replaceBy | Shape replacement option |
replaceByBox
Replace objects by a bounding box
See also:
Declaration
algo.replaceByBox(occurrences, boxType)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
ReplaceByBoxType | boxType | Bounding box type, oriented, axis-aligned, ... |
replaceByConvexHull
Replace objects by convex hull
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
algo.replaceByConvexHull(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
replaceByPrimitive
Replace objects by a primitive shapes
See also:
Declaration
algo.replaceByPrimitive(occurrences, primitive, generateUV=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
PrimitiveShapeParameters | primitive | Primitive type and parameters |
Boolean | generateUV | 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:
Declaration
algo.sawWithAABB(occurrences, aabb, mode, innerSuffix="_inner", outerSuffix="_outer")
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
AABB | aabb | Axis-Aligned Bounding Box |
SawingMode | mode | The sawing mode |
String | innerSuffix | Only if mode is set to SawAndSplit, set the suffix of the inner part |
String | outerSuffix | 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:
Declaration
algo.sawWithOBB(occurrences, obb, mode, innerSuffix="_inner", outerSuffix="_outer")
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
OBB | obb | Minimum Bounding Box |
SawingMode | mode | The sawing mode |
String | innerSuffix | Only if mode is set to SawAndSplit, set the suffix of the inner part |
String | outerSuffix | 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:
Declaration
algo.sawWithOctree(occurrences, aabb, maxDepth, maxTrianglesByLeaf, sawTolerance) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
AABB | aabb | Octree Bounding Box |
Int | maxDepth | Depth of the octree |
Int | maxTrianglesByLeaf | Set the maximum triangle count on the leaf of the octree ( -1 to not use ) |
Double | sawTolerance | Size in mm of the tolerance of the saw |
Returns
Type | Description |
---|---|
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:
Declaration
algo.sawWithPlane(occurrences, planeOrigin, planeNormal, mode, innerSuffix="_inner", outerSuffix="_outer", tolerance=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Point3 | planeOrigin | The plane origin |
Vector3 | planeNormal | The plane normal |
SawingMode | mode | The sawing mode |
String | innerSuffix | Only if mode is set to SawAndSplit, set the suffix of the inner part |
String | outerSuffix | Only if mode is set to SawAndSplit, set the suffix of the outer part |
Double | tolerance | 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:
Declaration
algo.convertSimilarPartOccurrencesToInstances(occurrences, checkMeshTopo=True, checkVertexPositions=True, vertexPositionPrecision=5, checkUVTopo=True, checkUVVertexPositions=True, UVPositionprecision=5, keepExistingPrototypes=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrence for which we want to find similar parts and create instances using prototypes. |
Boolean | checkMeshTopo | |
Boolean | checkVertexPositions | |
Int | vertexPositionPrecision | |
Boolean | checkUVTopo | |
Boolean | checkUVVertexPositions | |
Int | UVPositionprecision | |
Boolean | keepExistingPrototypes |
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:
Declaration
algo.convertSimilarPartOccurrencesToInstancesFast(occurrences, dimensionsSimilarity=0.98, polycountSimilarity=0.98, ignoreSymmetry=False, keepExistingPrototypes=True, createNewOccurrencesForPrototypes=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Root occurrences for which we want to find similar part occurrences and create instances using prototypes. |
Coeff | dimensionsSimilarity | 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. |
Coeff | polycountSimilarity | 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. |
Boolean | ignoreSymmetry | If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation. |
Boolean | keepExistingPrototypes | If True, existing prototypes will be kept. Otherwise, the selection will be singularized and instanced will be created from scratch. |
Boolean | createNewOccurrencesForPrototypes | 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:
Declaration
algo.findSimilarPartOccurrencesFast(occurrences, dimensionsSimilarity, polycountSimilarity, ignoreSymmetry) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences for which we want to find similar part occurrences in the scene. |
Coeff | dimensionsSimilarity | 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. |
Coeff | polycountSimilarity | 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. |
Boolean | ignoreSymmetry | If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation. |
Returns
Type | Description |
---|---|
OccurrenceList | The list of part occurrences meeting the criteria |
alignUVIslands
Align with the axes the UVs of the islands
Warning
This function is tagged as EXPERIMENTAL.
See also:
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.alignUVIslands(occurrences, channel=0, usePolygonsWeights=0, useVerticesWeights=0, alignmentMode=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | UV channel to merge |
Double | usePolygonsWeights | Use polygons weights to give more importance to what must be aligned |
Double | useVerticesWeights | Use vertices weights to give more importance to what must be aligned |
AlignmentMode | alignmentMode | With which axis the UVs should be aligned |
applyUvTransform
Apply a transformation matrix on texture coordinates
See also:
- algo.alignUVIslands
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.applyUvTransform(occurrences, matrix, channel=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Matrix4 | matrix | Transformationmatrix |
Int | channel | UV channel to transform |
automaticUVMapping
Generates the texture coordinates and automatically find seams
Warning
This function is tagged as EXPERIMENTAL.
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.automaticUVMapping(occurrences, channel=0, maxAngleDistorsion=0.5, maxAreaDistorsion=-1, sharpToSeam=True, forbidOverlapping=True, resolution=1024, padding=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | The UV channel which will contains the texture coordinates |
Double | maxAngleDistorsion | Maximum angle distorsion |2PI-SumVtxAng|/2PI |
Double | maxAreaDistorsion | Maximum area distorsion before scale to 1. |2DArea-3DArea|/3DArea |
Bool | sharpToSeam | If enabled, sharp edges are automatically considered as UV seams |
Bool | forbidOverlapping | If enabled, UV cannot overlap |
UInt | resolution | Resolution wanted for the final map when repacking at the end |
UInt | padding | Set the padding (in pixels) between UV islands when repacking at the end |
copyUV
Copy an UV channel to another UV channel
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.copyUV(occurrences, sourceChannel=0, destinationChannel=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | sourceChannel | The source UV channel to copy |
Int | destinationChannel | The destination UV channel to copy into |
getRatioUV3D
Compute the ratio between the UV and the 3D size
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.getRatioUV3D(occurrences, ratioMode, channel) -> core.DoubleList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
RatioUV3DMode | ratioMode | Choose how to compute the ratio |
Int | channel | UV channel to use |
Returns
Type | Description |
---|---|
DoubleList | Ratios 3Dsize/UVsize of the input occurrences |
getUVQualityMetrics
Compute UV mapping qualitative metrics.
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.getUVQualityMetrics(occurrences, channel) -> core.UInt, core.Double, core.Double, core.Double, core.Double, core.Double
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
UInt | channel | UV channel to use |
Returns
Type | Description |
---|---|
UInt | Number of UV islands. If 0, all other returns are invalid. |
getUvAabr
Compute the UV Axis Aligned Bounding Rectangle of a set of occurrences
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.getUvAabr(occurrences, channel) -> geom.AABR
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | UV channel to transform |
Returns
Type | Description |
---|---|
AABR | The UV AABR |
mapUvOnAABB
Generate texture coordinates using the projection on object Axis Aligned Bounding Box
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnAABB(occurrences, useLocalAABB=False, uv3dSize=100, channel=0, overrideExistingUVs=True, ignoreScale=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Bool | useLocalAABB | If enabled, uses part own bounding box, else use global one |
Distance | uv3dSize | 3D size of the UV space [0-1] |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
Boolean | ignoreScale | If this and useLocalAABB are true, ignore local scale |
mapUvOnBox
Generate texture coordinates using the projection on a box
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnBox(occurrences, box, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Box | box | Box definition |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mapUvOnCubicAABB
Generate texture coordinates using the projection on object AABB, with same scale on each axis
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnCubicAABB(occurrences, uv3dSize=100, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Distance | uv3dSize | 3D size of the UV space [0-1] |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mapUvOnCustomAABB
Generate texture coordinates using the projection on custom AABB
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnCustomAABB(occurrences, aabb, uv3dSize=100, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
AABB | aabb | Axis aligned bounding box to project on |
Distance | uv3dSize | 3D size of the UV space [0-1] |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mapUvOnCylinder
Generate texture coordinates using the projection on a cylinder
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnCylinder(occurrences, cylinder, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Cylinder | cylinder | Cylinder definition |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mapUvOnFittingCylinder
Generate texture coordinates using the projection on a fitting cylinder
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnFittingCylinder(occurrences, channel=0, overrideExistingUVs=True, useAABB=True, forcedAxis=geom.Vector3(0,0,0))
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
Boolean | useAABB | If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB) |
Vector3 | forcedAxis | Forced axis of the Cylinder |
mapUvOnFittingSphere
Generate texture coordinates using the projection on a fitting sphere
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnFittingSphere(occurrences, channel=0, overrideExistingUVs=True, useAABB=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
Boolean | useAABB | If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB) |
mapUvOnMBB
Generate texture coordinates using the projection on object Minimum Bounding Box
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnMBB(occurrences, useLocalMBB=False, uv3dSize=100, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Bool | useLocalMBB | If enabled, uses part own bounding box, else use global one |
Distance | uv3dSize | 3D size of the UV space [0-1] |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mapUvOnPlane
Generate texture coordinates using the projection on a plane
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnPlane(occurrences, plane, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Plane | plane | Plane definition |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mapUvOnSphere
Generate texture coordinates using the projection on a sphere
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mapUvOnSphere(occurrences, sphere, channel=0, overrideExistingUVs=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Sphere | sphere | Sphere definition |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | overrideExistingUVs | If True, override existing UVs on channel |
mergeUVIslandsAffine
Minimizes the number of seams in the UV mapping by merging UV islands using affine transformation (recommanded for hard surfaces)
Warning
This function is tagged as EXPERIMENTAL.
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mergeUVIslandsAffine(occurrences, channel=0, scaleWeights=0, maxScaleVariationFactor=1.2, curvatureWeights=-1, usePolygonsWeights=1, useVerticesWeights=-1, allowedTransformations=0, allowUVInversion=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | UV channel to merge |
Double | scaleWeights | Weight to assign to scale for the merging priority |
Double | maxScaleVariationFactor | Maximum scaling factor allowed, -1 meaning no limits |
Double | curvatureWeights | Weight to assign to curvature for the merging priority |
Double | usePolygonsWeights | Use polygons weights to prioritize seams between polygons with less weight. The value represents the feature weight |
Double | useVerticesWeights | Use vertices weights to prioritize seams where vertices with less weight. The value represents the feature weight |
TransformationType | allowedTransformations | Allowed transformation: TRSOnly or TRS+Skew |
Boolean | allowUVInversion | Allow merged UVs to be inverted |
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)
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.mergeUVIslandsRelaxed(occurrences, channel=0, targetIslandCount=0, energyThreshold=0.01, forceIsolatedFaces=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | UV channel to use |
Int | targetIslandCount | Target number of islands (zero means the algorithm runs until no more merging is possible) |
Double | energyThreshold | Max energy allowed during local reparametrization |
Boolean | forceIsolatedFaces | UV islands consisting in a single isolated face completely surrounded by another island are forced to be merged, without reparametrization. |
normalizeUV
Normalize UVs to fit in the [0-1] uv space
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.normalizeUV(occurrences, sourceUVChannel=0, destinationUVChannel=-1, uniform=True, sharedUVSpace=True, ignoreNullIslands=False)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | sourceUVChannel | UV Channel to normalize |
Int | destinationUVChannel | UV channel to store the normalized UV (if -1, sourceUVChannel will be replaced) |
Boolean | uniform | If true, the scale will be uniform. Else UV can be deformed with a non-uniform scale |
Boolean | sharedUVSpace | If true, all parts will be processed as if they were merged to avoid overlapping of their UV coordinates |
Boolean | ignoreNullIslands | If true, islands with null height and width will be ignored and their UV coordinates will be set to [0,0] (Slower if enabled) |
removeUV
Remove one or all UV channel(s)
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.removeUV(occurrences, channel=-1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | The UV channel to remove (all if channel=-1) |
repackUV
Pack existing UV (create atlas)
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.repackUV(occurrences, channel, shareMap, resolution, padding, uniformRatio, iterations, removeOverlaps) -> scene.OccurrenceList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | channel | The UV channel to repack |
Boolean | shareMap | If True, the UV of all given parts will be packed together |
Int | resolution | Resolution wanted for the final map |
UInt | padding | Set the padding (in pixels) between UV islands |
Boolean | uniformRatio | If true, UV of different part will have the same ratio |
Int | iterations | Fitting iterations |
Boolean | removeOverlaps | Remove overlaps to avoid multiple triangles UVs to share the same pixel |
Returns
Type | Description |
---|---|
OccurrenceList | Parts which failed to be repacked at this resolution (try to increase the resolution or decrease the padding) |
resizeUVsToTextureSize
Rescale the UV coordinates to fit the input texture size
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.scaleUV
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.resizeUVsToTextureSize(occurrences, TextureSize=100, channel=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to use for the rescaling |
Distance | TextureSize | Texture size to use for the UV coordinates (in millimeters) |
Int | channel | UV channel to use |
scaleUV
Apply a scale on texture coordinates
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.swapUvChannels
- algo.unwrapUV
Declaration
algo.scaleUV(occurrences, scaleU, scaleV, channel=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Double | scaleU | Scale to apply to U coordinate |
Double | scaleV | Scale to apply to V coordinate |
Int | channel | UV channel to transform |
swapUvChannels
Swap two UV channels
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.unwrapUV
Declaration
algo.swapUvChannels(occurrences, firstChannel=0, secondChannel=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
Int | firstChannel | First UV Channel to swap |
Int | secondChannel | Second UV Channel to swap |
unwrapUV
Unwrap UV islands
Warning
This function is tagged as EXPERIMENTAL.
See also:
- algo.alignUVIslands
- algo.applyUvTransform
- algo.automaticUVMapping
- algo.copyUV
- algo.getRatioUV3D
- algo.getUVQualityMetrics
- algo.getUvAabr
- algo.mapUvOnAABB
- algo.mapUvOnBox
- algo.mapUvOnCubicAABB
- algo.mapUvOnCustomAABB
- algo.mapUvOnCylinder
- algo.mapUvOnFittingCylinder
- algo.mapUvOnFittingSphere
- algo.mapUvOnMBB
- algo.mapUvOnPlane
- algo.mapUvOnSphere
- algo.mergeUVIslandsAffine
- algo.mergeUVIslandsRelaxed
- algo.normalizeUV
- algo.removeUV
- algo.repackUV
- algo.resizeUVsToTextureSize
- algo.scaleUV
- algo.swapUvChannels
Declaration
algo.unwrapUV(occurrences, method=0, channel=-1, createSeamsFromLoI=False, iterMax=50, tolerance=0.00001)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
UnwrapUVMethod | method | Minimization method to use for unwrapping (isometric or conformal) |
Int | channel | The UV channel which will contains the texture coordinates |
Boolean | createSeamsFromLoI | Use Lines of Interest to generate UV islands |
Int | iterMax | For iterative solvers: set the maximum number of iterations allowed |
Double | tolerance | For iterative solvers: set the maximum error threshold |
getFittingCylinder
Declaration
algo.getFittingCylinder(occurrences, useAABB, forcedAxis) -> geom.Affine
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to fit |
Boolean | useAABB | If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB) |
Vector3 | forcedAxis | Forced axis of the Cylinder when using MBB |
Returns
Type | Description |
---|---|
Affine | Affine transformation of the cylinder |
getFittingSphere
Declaration
algo.getFittingSphere(occurrences, useAABB) -> geom.Affine
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to fit |
Boolean | useAABB | If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB) |
Returns
Type | Description |
---|---|
Affine | Affine transformation of the sphere |
bakeMaps
Bake texture maps on meshes from self or other meshes
See also:
Declaration
algo.bakeMaps(destinationOccurrences, sourceOccurrences, mapsToBake, channel, resolution, padding, shareMaps, mapSuffix, additionalCustomMaps, tolerance, method, opacityThreshold, useCurrentPosition, offset, callbackList, oneToOne, reuseMaps, outputUsedMap) -> material.ImageList
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | destinationOccurrences | Occurrences of the meshes where to store the baked map |
OccurrenceList | sourceOccurrences | Occurrences of components from which to bake maps (if empty use destination) |
BakeMapList | mapsToBake | List of map to generate (Normal, Diffuse, ...) |
Int | channel | UV channel of destOccurrence to use for the map generation |
Int | resolution | Map resolution |
Int | padding | 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 |
Boolean | shareMaps | If true, all the destinationOccurrences will share the same maps |
String | mapSuffix | Add a suffix to the map names |
CustomBakeMapList | additionalCustomMaps | Additional custom maps to bake |
Distance | tolerance | Tolerance of projection for baking from source to destination |
BakingMethod | method | Method to find source color if source occurrences are different than destination occurrences (Prefer ProjOnly for point clouds and RayOnly for meshes) |
Coeff | opacityThreshold | If the opacity is under this threshold, considers as fully transparent and store the color behind the intersection |
Boolean | useCurrentPosition | Use the current position instead of the T-Pose of the input occurrence |
Distance | offset | Offset from mesh |
getPixelValueList | callbackList | Callbacks that returns a color |
Boolean | oneToOne | If true, each occurrence in sourceOccurrences will be baked to the occurrence in destinationOccurrences at the same index |
ImageList | reuseMaps | 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) |
Boolean | outputUsedMap | If True, an extra maps contained used pixels is output at the end of bakedMaps. It can be used by reuseMaps |
Returns
Type | Description |
---|---|
ImageList | Baked map list |
convertNormalMap
Convert an existing normal map between Object-space and Tangent-space
See also:
Declaration
algo.convertNormalMap(partOccurrences, normalMap, uvChannel, sourceIsObjectSpace, destinationIsObjectSpace, sourceIsRightHanded, destinationIsRightHanded, replaceMap, resolution, padding) -> material.Image
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | partOccurrences | Occurrences of components using the given map |
Image | normalMap | Source normal map to convert |
Int | uvChannel | UV channel used on the given map |
Boolean | sourceIsObjectSpace | If True, consider the given normalMap in Object-space representation, else Tangent-space |
Boolean | destinationIsObjectSpace | If True, convert the given normalMap to Object-space representation, else Tangent-space |
Boolean | sourceIsRightHanded | Considers source normal map as part of a right-handed coordinates system |
Boolean | destinationIsRightHanded | Generate destination normal map as part of a right-handed coordinates system |
Boolean | replaceMap | If true, the given normalMap will be replaced by the converted one |
Int | resolution | New map resolution (if replaceMap=false), if resolution=-1, the input resolution will be used |
Int | padding | 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
Type | Description |
---|---|
Image | Converted normal map (equals normalMap if replaceMap=true) |
createBillboard
Create a billboard imposter
See also:
Declaration
algo.createBillboard(occurrences, resolution, XPositive, XNegative, YPositive, YNegative, ZPositive, ZNegative, moveFacesToCenter, leftHandedNormalMap) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to bake in the billboard |
Int | resolution | Total resolution of the billboard (contains all wanted faces) |
Bool | XPositive | Bake face facing X+ |
Bool | XNegative | Bake face facing X- |
Bool | YPositive | Bake face facing Y+ |
Bool | YNegative | Bake face facing Y- |
Bool | ZPositive | Bake face facing Z+ |
Bool | ZNegative | Bake face facing Z- |
Bool | moveFacesToCenter | If true, all face are moved to the center of the AABB of the occurrences, else it will shape an AABB |
Bool | leftHandedNormalMap | If true, a left handed normal map will be generated |
Returns
Type | Description |
---|---|
Occurrence | Resulting billboard |
fillNormalMap
Fill normal map (useful after a decimation for example)
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
algo.fillNormalMap(normalMap)
Parameters
Type | Name | Description |
---|---|---|
Image | normalMap | Source normal map to convert |
orientNormalMap
Orient a tangent space normal map (all Z positive)
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
algo.orientNormalMap(normalMap)
Parameters
Type | Name | Description |
---|---|---|
Image | normalMap | Normal map to orient |
barySmooth
Smooth the tessellations by moving the vertices to the barycenter of their neighbors
See also:
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.barySmooth(occurrences, iteration=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Int | iteration | Number of iterations |
crackMoebiusStrips
Remove moebius strip by topologically cracking them (make it orientable)
See also:
- algo.barySmooth
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.crackMoebiusStrips(occurrences, maxEdgeCount=3)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
Int | maxEdgeCount | Maximum number of edges to crack to remove one moebius strip |
crackNonManifoldVertices
Splits non-manifold vertices
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.crackNonManifoldVertices(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
createCavityOccurrences
Identify cavities and create occurrences to show them
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.createCavityOccurrences(occurrences, voxelSize, minimumCavityVolume, mode, parent) -> scene.Occurrence
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences set to identify cavities |
Distance | voxelSize | Size of the voxels in mm |
Volume | minimumCavityVolume | Minimum volume of a cavity in cubic meter |
InnerOuterOption | mode | Select where to place camera (all cavities, only outer or only inner cavities) |
Occurrence | parent | 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
Type | Description |
---|---|
Occurrence | Parent occurrence of the cavity occurrences |
invertPolygonFacesOrientation
Invert the orientation of tessellation elements
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.invertPolygonFacesOrientation(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
moebiusCracker
Splits moebius ring
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.moebiusCracker(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
orientNormals
Orient existing normal according to the polygons clockwise
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.orientNormals(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to orient normals |
remeshSurfacicHoles
Resmesh surfacic holes of tessellations
Warning
This function is tagged as EXPERIMENTAL.
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.remeshSurfacicHoles(occurrences, maxDiameter=0, refine=True, numberOfNeighbors=3, fillWithMaterial=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | maxDiameter | Maximum surfacic holes diameters |
Boolean | refine | Refine mesh for more details in holes |
Int | numberOfNeighbors | Number of neighboring vertices to use for the MLS projection |
Material | fillWithMaterial | If set, the given material will be used to fill the holes |
removeDegeneratedPolygons
Remove some kinds of degenerated polygons
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.removeDegeneratedPolygons(occurrences, tolerance=0.1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | tolerance | Degenerated tolerance |
removeMultiplePolygon
Remove multiple polygon
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.removeMultiplePolygon(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
removeZFighting
Remove Z-fighting (surfaces overlapping) by slightly shrinking the selected parts' surfaces
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.removeZFighting(occurrences) -> geom.Distance
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to process |
Returns
Type | Description |
---|---|
Distance | Offset value used by the algorithm |
repairMesh
Launch the repair process to repair a disconnected or not clean tessellation
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.repairMesh(occurrences, tolerance=0.1, crackNonManifold=True, orient=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Distance | tolerance | Connection tolerance |
Bool | crackNonManifold | At the end of the repair process, crack resulting non-manifold edges |
Boolean | orient | If true reorient the model |
repairNullNormals
Create normal on an existing normal set when normal is null (polygons appears black)
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.separateToManifold
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.repairNullNormals(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair null normals |
separateToManifold
Remove non manifold edges and try to reconnect manifold groups of triangles
Warning
This function is tagged as EXPERIMENTAL.
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.sewBoundary
- algo.vertexOffset
Declaration
algo.separateToManifold(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
sewBoundary
Sew boundaries between them
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.vertexOffset
Declaration
algo.sewBoundary(occurrences, maxDistance)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
Distance | maxDistance | Maximum distance between bundaries |
vertexOffset
Move the vertices by the offsset along their normal
See also:
- algo.barySmooth
- algo.crackMoebiusStrips
- algo.crackNonManifoldVertices
- algo.createCavityOccurrences
- algo.invertPolygonFacesOrientation
- algo.moebiusCracker
- algo.orientNormals
- algo.remeshSurfacicHoles
- algo.removeDegeneratedPolygons
- algo.removeMultiplePolygon
- algo.removeZFighting
- algo.repairMesh
- algo.repairNullNormals
- algo.separateToManifold
- algo.sewBoundary
Declaration
algo.vertexOffset(occurrences, offset=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to process |
Distance | offset | Displacement |
orientFromFace
Orient all connected polygons in the same orientation of the polygon selectionned
See also:
Declaration
algo.orientFromFace()
orientPolygonFaces
Orient tessellation elements
See also:
Declaration
algo.orientPolygonFaces(occurrences, makeOrientable=True, useArea=False, orientStrategy=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Boolean | makeOrientable | Crack moebius strips to make the model orientable |
Boolean | useArea | 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:
Declaration
algo.orientPolygonFacesAdvanced(occurrences, voxelSize=100, minimumCavityVolume=1, resolution=64, mode=0, considerTransparentOpaque=True, orientStrategy=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to orient |
Distance | voxelSize | Size of the voxels in mm (smaller it is, more viewpoints there are) |
Volume | minimumCavityVolume | Minimum volume of a cavity in cubic meter (smaller it is, more viewpoints there are) |
Int | resolution | Resolution of the visibility viewer |
InnerOuterOption | mode | Select where to place camera (all cavities, only outer or only inner cavities) |
Boolean | considerTransparentOpaque | If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque |
OrientStrategyAdvanced | orientStrategy | Strategy to adopt with this algorithm |
orientPolygonFacesFromCamera
Properly orient all polygons in the same direction, using a specified viewpoint
See also:
Declaration
algo.orientPolygonFacesFromCamera(occurrences, cameraPosition, cameraDirection, cameraUp, resolution=1024, fovX=90)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to orient |
Point3 | cameraPosition | Camera position |
Point3 | cameraDirection | Camera direction |
Point3 | cameraUp | Camera up vector |
Int | resolution | Resolution of the visibility viewer |
Double | fovX | Horizontal field of view (in degree) |
equilateralize
Sswap edges to make triangles more equilateral
See also:
Declaration
algo.equilateralize(occurrences, maxIterations=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Int | maxIterations | Maximum number of swapping iteration |
quadify
Merge all triangle polygons in the meshes to quadrangles
See also:
Declaration
algo.quadify(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
requadify
Advanced function to requadify a triangle tessellation coming from full quad mesh
See also:
Declaration
algo.requadify(occurrences, forceFullQuad=True)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Bool | forceFullQuad | Force the results to be only full quad. It it's impossible, nothing is done |
triangularize
Split all non-triangle polygons in the meshes to triangles
See also:
Declaration
algo.triangularize(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | 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:
Declaration
algo.createVertexWeightsFromVertexColors(occurrences, offset=0, scale=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Double | offset | Offset value for weight computation |
Double | scale | 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:
Declaration
algo.createVertexWeightsFromVisibilityAttributes(occurrences, offset=0, scale=1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Double | offset | Offset value for weight computation |
Double | scale | Scale value for weight computation |
deleteVertexWeights
Remove any existing vertex weights attributes on given occurrences
See also:
Declaration
algo.deleteVertexWeights(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
createVisibilityAttributes
Create visibility attributes on tessellations
See also:
Declaration
algo.createVisibilityAttributes(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to create attributes |
deleteVisibilityAttributes
Delete visibility attributes on tessellations
See also:
Declaration
algo.deleteVisibilityAttributes(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to delete attributes |
flagVisibilityAttributesOnTransparents
Add one count to all visiblility attributes (poly and patch) on transparent patches
See also:
Declaration
algo.flagVisibilityAttributesOnTransparents(occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to create attributes |
transferVisibilityToPolygonalWeight
Set Polygonal Weight Attribute from Visibility Attribute
Warning
This function is tagged as EXPERIMENTAL.
See also:
Declaration
algo.transferVisibilityToPolygonalWeight(occurrences, Mode=0)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
VisibilityToWeightMode | Mode | Mode used to compute visibility |