Asset Transformer SDK (ex Pixyz) AlgoInterface Class
Read time 72 minutes
Last updated 21 hours ago Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Algo
public class AlgoInterface : Interface
Methods
GetLastError
public static string GetLastError()
Returns
AssembleCAD
Assemble faces of CAD shapes.
[HandleProcessCorruptedStateExceptions] public void AssembleCAD(OccurrenceList occurrences, double tolerance, bool removeDuplicatedFaces = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to assemble. double tolerance Assembling tolerance. bool removeDuplicatedFaces If True, duplicated faces will be removed.
BackToInitialBRep
Create the BRep shape from a Tessellated shape with Domain Patch Attributes (after tessellate).
[HandleProcessCorruptedStateExceptions] public void BackToInitialBRep(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
BakeImpostor
Bakes impostors textures.
[HandleProcessCorruptedStateExceptions] public OctahedralImpostor BakeImpostor(uint occurrence, int XFrames, int YFrames, bool hemi = false, int resolution = 1024, int padding = 0, bool roughness = false, bool metallic = false, bool ao = false)
Parameters
Returns
BakeVertexAttributes
Bake vertex attributes on meshes from other meshes.
[HandleProcessCorruptedStateExceptions] public void BakeVertexAttributes(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, bool skinnedMesh, bool positions, bool useCurrentPositionAsTPose = false)
Parameters
Type Name Description OccurrenceList destinationOccurrences Occurrences of the meshes where to store the baked vertex attributes. OccurrenceList sourceOccurrences Occurrences of components from which to bake vertex attributes. bool skinnedMesh Enabling skinned mesh baking (joint assignation for animation transfer). bool positions Enabling vertex position baking. bool useCurrentPositionAsTPose Use the current position as the T-Pose.
CalculateNormalsInPointClouds
WARNING: this function is tagged as 'EXPERIMENTAL' calculate the normal of each point of a Point Cloud.
[HandleProcessCorruptedStateExceptions] public void CalculateNormalsInPointClouds(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process.
ConfigureFunctionLogger
[HandleProcessCorruptedStateExceptions] public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters
Type Name Description string functionName bool enableFunction bool enableParameters bool enableExecutionTime
CrackCADMoebiusStrip
Detect Moebius strip and crack them if there is somme of them in the selection.
[HandleProcessCorruptedStateExceptions] public void CrackCADMoebiusStrip(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to check.
CrackEdges
Crack polygonal edges according to given criteria (deprecated, use crackMeshEdges instead).
[Obsolete] [HandleProcessCorruptedStateExceptions] public void CrackEdges(OccurrenceList occurrences, bool useAttributesFilter = true, double sharpAngleFilter = 45, bool useNonManifoldFilter = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool useAttributesFilter Filters by attribute. double sharpAngleFilter Sharp angle in degree to filter by edges sharpness, if the angle is negative do not filter. bool useNonManifoldFilter Filters by manifold-ness.
CrackMeshEdges
Crack polygonal edges according to given criteria.
[HandleProcessCorruptedStateExceptions] public void CrackMeshEdges(OccurrenceList occurrences, bool normal = false, bool uvs = false, IntList uvChannels = null, bool loi = false, bool patches = false, bool nman = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool normal Crack on sharp normals. bool uvs Crack on UV seams. IntList uvChannels If empty and uvs=true, crack all UV channel, else only channel specified in the list. bool loi Crack on identifier Lines of Interests. bool patches Crack on patch borders. bool nman Crack on non-manifolds.
CreateFreeEdgesFromPatches
Create free edges from patch borders.
[HandleProcessCorruptedStateExceptions] public void CreateFreeEdgesFromPatches(OccurrenceList 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).
[HandleProcessCorruptedStateExceptions] public void CreateIdentifiedPatchesFromPatches(OccurrenceList 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.
[HandleProcessCorruptedStateExceptions] public uint CreateIndexMapFromOccurrences(OccurrenceList occurrences, int uvChannel, bool createTexture1D)
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
CreateNormals
Create normal attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void CreateNormals(OccurrenceList occurrences, double sharpEdge = 45, bool overriding = true, bool useAreaWeighting = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to create attributes. double sharpEdge Edges with an angle between their polygons greater than sharpEdge will be considered sharp. If negative, smooth normals only. bool overriding If true, override existing normals, else only create normals on meshes without normals. bool 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.
[HandleProcessCorruptedStateExceptions] public uint CreatePointCloudKDTree(OccurrenceList occurrences, int depth, bool addToScene = true)
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
CreateTangents
Create tangent attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void CreateTangents(OccurrenceList occurrences, int uvChannel = 0, bool overriding = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to create attributes. int uvChannel UV channel to use for the tangents creation. bool overriding 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.
[HandleProcessCorruptedStateExceptions] public void CreateVertexColorFromMaterials(OccurrenceList occurrenceList)
Parameters
CreateVisibilityPatchesFromPatch
Create visibility patches from existing patches.
[HandleProcessCorruptedStateExceptions] public void CreateVisibilityPatchesFromPatch(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
Decimate
Reduce the polygon count by removing some vertices.
[HandleProcessCorruptedStateExceptions] public void Decimate(OccurrenceList occurrences, double surfacicTolerance, double lineicTolerance = 0.1, double normalTolerance = 5, double texCoordTolerance = -1, bool releaseConstraintOnSmallArea = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double surfacicTolerance Maximum distance between surfacic vertices and resulting simplified surfaces. double lineicTolerance Maximum distance between lineic vertices and resulting simplified lines. double normalTolerance Maximum angle between original normals and those interpolated on the simplified surface. double texCoordTolerance Maximum distance (in 3D space) between original texcoords and those interpolated on the simplified surface. bool releaseConstraintOnSmallArea If True, release constraint of normal and/or texcoord tolerance on small areas (according to surfacicTolerance).
DecimateEdgeCollapse
WARNING: this function is tagged as 'EXPERIMENTAL' reduce the polygon count by collapsing some edges to obtain an simplified mesh.
[HandleProcessCorruptedStateExceptions] public void DecimateEdgeCollapse(OccurrenceList occurrences, double surfacicTolerance, double boundaryWeight = 1, double normalWeight = 1, double UVWeight = 1, double sharpNormalWeight = 1, double UVSeamWeight = 10, double normalMaxDeviation = -1, bool forbidUVOverlaps = true, double UVMaxDeviation = -1, double UVSeamMaxDeviation = -1, bool protectTopology = false, QualitySpeedTradeoff qualityTradeoff = QualitySpeedTradeoff.PreferQuality)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double 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. double normalMaxDeviation Constraint the normals deviation on decimated model. bool 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. bool 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.
[HandleProcessCorruptedStateExceptions] public void DecimatePointClouds(OccurrenceList occurrences, double tolerance = 500)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double 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).
[HandleProcessCorruptedStateExceptions] public void DecimateTarget(OccurrenceList occurrences, DecimateOptionsSelector targetStrategy, UVImportanceEnum UVImportance = UVImportanceEnum.PreserveSeamsAndReduceDeformation, bool protectTopology = false, ulong iterativeThreshold = 5000000, bool processMeshIndependently = false, int maxQuadricAge = -1)
Parameters
Type Name Description 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. bool 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). bool 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.
[HandleProcessCorruptedStateExceptions] public void DeleteAttibute(uint occurrence, AttributType type)
Parameters
Type Name Description uint occurrence Occurrence to detele attribute from. AttributType type Attribute type.
DeleteBRepShapes
Delete BRep representation on parts.
[HandleProcessCorruptedStateExceptions] public void DeleteBRepShapes(OccurrenceList occurrences, bool onlyTessellated = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool onlyTessellated If True, delete only BRep represensation on part with a tessellated shape.
DeleteFreeVertices
Delete all free vertices of the mesh of given parts.
[HandleProcessCorruptedStateExceptions] public void DeleteFreeVertices(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
DeleteLines
Delete all free line of the mesh of given parts.
[HandleProcessCorruptedStateExceptions] public void DeleteLines(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
DeleteNormals
Remove normal attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void DeleteNormals(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to delete.
DeletePatches
Delete patches attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void DeletePatches(OccurrenceList occurrences, bool keepOnePatchByMaterial = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool 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.
[HandleProcessCorruptedStateExceptions] public void DeletePolygons(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
DeleteTangents
Remove tangent attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void DeleteTangents(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to delete.
DeleteTextureCoordinates
Delete texture coordinates on tessellations.
[HandleProcessCorruptedStateExceptions] public void DeleteTextureCoordinates(OccurrenceList occurrences, int 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.
[HandleProcessCorruptedStateExceptions] public void DeleteVisibilityPatches(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
EvalDecimateErrorForTarget
Returns the max error to set to reach a given target.
[HandleProcessCorruptedStateExceptions] public double EvalDecimateErrorForTarget(OccurrenceList occurrences, DecimateOptionsSelector TargetStrategy, double boundaryWeight = 1, double normalWeight = 1, double UVWeight = 1, double sharpNormalWeight = 1, double UVSeamWeight = 10, bool forbidUVFoldovers = true, bool protectTopology = false)
Parameters
Type Name Description 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). bool forbidUVFoldovers Forbids UVs to fold over and overlap each other during the decimation. bool 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
ExtractNeutralAxis
Extract neutral axis from tessellations.
[HandleProcessCorruptedStateExceptions] public void ExtractNeutralAxis(OccurrenceList occurrences, double maxDiameter, bool removeOriginalMesh)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double maxDiameter Maximum diameter of beams. bool removeOriginalMesh Remove or not the original mesh at the end of the algorithm.
FilletMesh
WARNING: this function is tagged as 'EXPERIMENTAL' Fillet a mesh according to its Lines of Interest.
[HandleProcessCorruptedStateExceptions] public void FilletMesh(OccurrenceList occurrences, double value, FilletingMode filletingMode = FilletingMode.Width, int subdivisionNb = 0, bool createFlatChamfer = false, uint material = 0, int uvChannel = -1)
Parameters
Type Name Description OccurrenceList occurrences Input occurrences. double value Value (mm). FilletingMode filletingMode Filleting mode. int subdivisionNb Number of subdivision. bool createFlatChamfer If there is 0 subdivision, should the fillet be a planar flat chamfer?. uint 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.
[HandleProcessCorruptedStateExceptions] public void FilterHiddenPolygons(OccurrenceList occurrences, double voxelSize)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double voxelSize Size of voxels.
FilterMeshVertexColors
Smooth mesh vertex colors by applying to adjacent vertices a combination of different Gaussian filters for feature preservation.
[HandleProcessCorruptedStateExceptions] public void FilterMeshVertexColors(OccurrenceList occurrences, double sigmaPos = 5, double sigmaValue = 0.2, double sigmaNormal = 15)
Parameters
Type Name Description OccurrenceList occurrences Mesh occurrences the filter must be applied on. double sigmaPos Variance of the Gaussian filter applied to distances between adjacent vertex positions. double sigmaValue Variance of the Gaussian filter applied to differences between adjacent vertex colors (in [0, 1]). double sigmaNormal Variance of the Gaussian filter applied to angular differences between adjacent vertex normals (in degree).
FindBestPivotBetweenOccurrences
Try to compute the pivot point between 2 sets of occurrences.
[HandleProcessCorruptedStateExceptions] public Matrix4 FindBestPivotBetweenOccurrences(OccurrenceList assembly1, OccurrenceList assembly2, double precision = -1)
Parameters
Returns
GetAllAxisFromCADModel
Return all the main axis contained in the CAD models given.
[HandleProcessCorruptedStateExceptions] public GetAllAxisFromCADModelReturn GetAllAxisFromCADModel(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to check.
Returns
GetMeshVertexColors
Returns arrays containing the vertex colors of all meshes being children of the provided occurrence list.
[HandleProcessCorruptedStateExceptions] public ColorAlphaListList GetMeshVertexColors(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences from which meshes are gathered.
Returns
GetOptimalTextureResolution
WARNING: this function is tagged as 'EXPERIMENTAL' Returns the optimal resolution based on a number of texels per 3D space units (e.g : mm).
[HandleProcessCorruptedStateExceptions] public int GetOptimalTextureResolution(OccurrenceList occurrences, double texelPerMm)
Parameters
Type Name Description OccurrenceList occurrences Occurrences on which to compute optimal texture resolution. double texelPerMm Number of texel per millimeter in a 3D space.
Returns
GetTessellations
Returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh).
[HandleProcessCorruptedStateExceptions] public TessellationList GetTessellations(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
Returns
GetUV3dRatio
WARNING: this function is tagged as 'EXPERIMENTAL' Returns the ratio of size between UV and 3D (max value, actually at the 90th percentil).
[HandleProcessCorruptedStateExceptions] public double GetUV3dRatio(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences on which to compute optimal texture resolution.
Returns
GetVisibilityStats
Returns the visibility statistics for some occurrences.
[HandleProcessCorruptedStateExceptions] public GetVisibilityStatsReturn GetVisibilityStats(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
Returns
GetVisualComparisonFootprint
Compute the visual footprint of the difference between two sets of occurrences.
[HandleProcessCorruptedStateExceptions] public double GetVisualComparisonFootprint(OccurrenceList originalOccurrences, OccurrenceList comparedOccurrences, int resolution = 512, int viewpointCount = 256, double threshold = 0.2, bool onHemisphereOnly = false)
Parameters
Type Name Description 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
IdentifyLinesOfInterest
Identify LoI according to given criteria. It will create a new LoI attribute on the mesh that can be used afterward by some functions.
[HandleProcessCorruptedStateExceptions] public void IdentifyLinesOfInterest(OccurrenceList occurrences, bool normal = false, bool uvs = false, IntList uvChannels = null, bool border = false, bool patches = false, bool nman = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool normal Add LoI on sharp normals. bool 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. bool border Add LoI on boundary edges. bool patches Add LoI on submesh borders. bool nman Add LoI on non-manifolds edges.
IdentifyPatches
Create patches (submeshes) on meshes (needed by some functions).
[HandleProcessCorruptedStateExceptions] public void IdentifyPatches(OccurrenceList occurrences, bool useAttributesFilter = true, double sharpAngleFilter = 45, bool useBoundaryFilter = true, bool useNonManifoldFilter = true, bool useLineEdgeFilter = true, bool useQuadLineFilter = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool useAttributesFilter Filters by attributes. double sharpAngleFilter Sharp angle in degree to filter by edges sharpness, if the angle is negative do not filter. bool useBoundaryFilter Filters by boundaries. bool useNonManifoldFilter Filters by manifold-ness. bool useLineEdgeFilter Filters by edge. bool useQuadLineFilter Filters by quad lines.
IdentifySharpEdges
WARNING: this function is tagged as 'EXPERIMENTAL' Mark as Lines Of Interest the sharp edges.
[HandleProcessCorruptedStateExceptions] public void IdentifySharpEdges(OccurrenceList occurrences, double minSharpAngle, double maxSharpAngle = 180, ConvexityFilter convexity = ConvexityFilter.OnConvexAndConcave, bool onlyExplicitSharp = false)
Parameters
Type Name Description OccurrenceList occurrences Input occurrences. double minSharpAngle The angle between the normals - all edges sharpest than this will be filleted. double maxSharpAngle All edges sharpest than this won't be filleted. ConvexityFilter convexity Fillet sharp edges that are convex, concave or both. bool 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.
[HandleProcessCorruptedStateExceptions] public void InvertTangents(OccurrenceList occurrences, bool invertW = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences to invert tangents on. bool invertW If true, only inverse the w components of tangent. Else, inverse the xyz vector.
LineToTexture
WARNING: this function is tagged as 'EXPERIMENTAL' Generate a textured quadrangle over an existing mesh of coplanar lines.
[HandleProcessCorruptedStateExceptions] public void LineToTexture(OccurrenceList lines, UseColorOption useColor, int resolution = 512, int thickness = 5)
Parameters
Type Name Description 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.
[HandleProcessCorruptedStateExceptions] public OccurrenceFeaturesList ListFeatures(OccurrenceList occurrences, bool throughHoles = true, bool blindHoles = false, double maxDiameter = -1)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool throughHoles List through holes. bool blindHoles List blind holes. double maxDiameter Maximum diameter of the holes to be list (-1=no max diameter).
Returns
LoopSubdivMesh
Apply Loop Subdivision on Triangle-only Mesh.
[HandleProcessCorruptedStateExceptions] public void LoopSubdivMesh(OccurrenceList occurrences, int depth)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. int depth Subdivision depth.
MergeVertices
Merge near vertices according to the given distance.
[HandleProcessCorruptedStateExceptions] public void MergeVertices(OccurrenceList occurrences, double maxDistance, TopologyCategoryMask mask)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double maxDistance Maximum distance between two vertex to merge. TopologyCategoryMask mask Topological category of the vertices to merge.
MeshBooleanOperation
WARNING: this function is tagged as 'EXPERIMENTAL' Computes the boolean operation between the meshes of two occurrence lists.
[HandleProcessCorruptedStateExceptions] public uint MeshBooleanOperation(OccurrenceList occurrencesA, OccurrenceList occurrencesB, MeshBooleanOperation operation)
Parameters
Returns
MeshComparison
WARNING: this function is tagged as 'EXPERIMENTAL' compare two meshes.
[HandleProcessCorruptedStateExceptions] public double MeshComparison(uint mesh_1, uint mesh_2)
Parameters
Returns
MeshComparisonBatch
WARNING: this function is tagged as 'EXPERIMENTAL' compare each couple of meshes and returns the maximum for each couple.
[HandleProcessCorruptedStateExceptions] public DistanceList MeshComparisonBatch(OccurrenceList meshes1, OccurrenceList meshes2)
Parameters
Returns
MeshIntersections
WARNING: this function is tagged as 'EXPERIMENTAL' Computes the list of polylines at the intersections of the meshes of two occurrence lists.
[HandleProcessCorruptedStateExceptions] public Point3ListList MeshIntersections(OccurrenceList occurrencesA, OccurrenceList occurrencesB)
Parameters
Returns
NoiseMesh
Apply noise to vertex positions along their normals.
[HandleProcessCorruptedStateExceptions] public void NoiseMesh(OccurrenceList occurrences, double maxAmplitude)
Parameters
Type Name Description OccurrenceList occurrences Part occurrencess to noise. double maxAmplitude Maximum distance between original vertex and noisy vertex.
OptimizeCADLoops
Optimize CAD Face loops by merging useless loop edges.
[HandleProcessCorruptedStateExceptions] public void OptimizeCADLoops(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to optimize.
OptimizeForRendering
Optimize mesh for rendering (lossless, only reindexing).
[HandleProcessCorruptedStateExceptions] public void OptimizeForRendering(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to optimize.
OptimizeSubMeshes
Sort sub meshes by materials.
[HandleProcessCorruptedStateExceptions] public void OptimizeSubMeshes(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Part occurrencess to process.
OptimizeTextureSize
WARNING: this function is tagged as 'EXPERIMENTAL' Resizes scene textures based on a number of texels per 3D space units (e.g: mm).
[HandleProcessCorruptedStateExceptions] public void OptimizeTextureSize(uint root, double texelPerMm)
Parameters
Type Name Description uint 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.
[HandleProcessCorruptedStateExceptions] public void RemoveHoles(OccurrenceList occurrences, bool throughHoles, bool blindHoles, bool surfacicHoles, double maxDiameter, uint fillWithMaterial = 0)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool throughHoles Remove through holes. bool blindHoles Remove blind holes. bool surfacicHoles Remove surfacic holes. double maxDiameter Maximum diameter of the holes to be removed (-1=no max diameter). uint 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.
[HandleProcessCorruptedStateExceptions] public void RepairCAD(OccurrenceList occurrences, double tolerance, bool orient = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to clean. double tolerance Tolerance. bool orient If true reorient the model.
SegmentMesh
WARNING: this function is tagged as 'EXPERIMENTAL' Segment Mesh into clusters guided by edge sharpnesses.
[HandleProcessCorruptedStateExceptions] public void SegmentMesh(OccurrenceList occurrences, bool overwriteLoI = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool overwriteLoI Overwrite the lines-of-interest parameters if true, else add them.
SetFeatureComponentMaxIndex
Remap Index map of each FeatureComponent of selected occurrences.
[HandleProcessCorruptedStateExceptions] public void SetFeatureComponentMaxIndex(OccurrenceList occurrences, int maxIndex)
Parameters
SetMeshVertexColors
Specify vertex colors for all meshes being children of the provided occurrence list.
[HandleProcessCorruptedStateExceptions] public void SetMeshVertexColors(OccurrenceList occurrences, ColorAlphaListList vertexColors)
Parameters
Type Name Description OccurrenceList occurrences Occurrences from which meshes are gathered. ColorAlphaListList vertexColors List of vertex color arrays for each occurrence.
SmoothMesh
[HandleProcessCorruptedStateExceptions] public void SmoothMesh(OccurrenceList occurrences, CostEvaluation mode, int maxIterations = 100, bool lockSignificantEdges = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. CostEvaluation mode Computation of cost. int maxIterations Maximum number of swapping iteration. bool lockSignificantEdges Forbid to swap significant edges (e.g. UV seams, sharp edges, patch borders, ...).
SplitUVForAtlas
[HandleProcessCorruptedStateExceptions] public void SplitUVForAtlas(OccurrenceList occurrences)
Parameters
Sweep
WARNING: this function is tagged as 'EXPERIMENTAL' Extrudes a circular section along an underlying polyline (curve).
[HandleProcessCorruptedStateExceptions] public void Sweep(OccurrenceList occurrences, double radius, int sides, bool createNormals, bool keepLines, bool generateUV)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to check. double radius Radius of cylinders. int sides Number of points to create cylinders. bool createNormals bool keepLines bool generateUV
Tessellate
Create a tessellated representation from a CAD representation for each given part.
[HandleProcessCorruptedStateExceptions] public void Tessellate(OccurrenceList occurrences, double maxSag, double maxLength, double maxAngle, bool createNormals = true, UVGenerationMode uvMode = UVGenerationMode.NoUV, int uvChannel = 1, double uvPadding = 0, bool createTangents = false, bool createFreeEdges = false, bool keepBRepShape = true, bool overrideExistingTessellation = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to tessellate. double maxSag Maximum distance between the geometry and the tessellation. double maxLength Maximum length of elements. double maxAngle Maximum angle between normals of two adjacent elements. bool 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. bool createTangents If true, tangents will be generated. bool createFreeEdges If true, free edges will be created for each patch borders. bool keepBRepShape If true, BRep shapes will be kept for Back to Brep or Retessellate. bool overrideExistingTessellation If true, already tessellated parts will be re-tessellated.
TessellatePointClouds
WARNING: this function is tagged as 'EXPERIMENTAL' Tessellate point clouds to replace the geometry with a polygonal connect mesh.
[HandleProcessCorruptedStateExceptions] public void TessellatePointClouds(OccurrenceList occurrences, int kNeighbors = 20, bool keepPoints = false, bool colorize = true)
Parameters
Type Name Description OccurrenceList occurrences int kNeighbors The number of neighbor points used to compute normals. bool keepPoints Keep points after meshing if enabled. bool 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.
[HandleProcessCorruptedStateExceptions] public void TessellateRelativelyToAABB(OccurrenceList occurrences, double maxSag, double sagRatio, double maxLength, double maxAngle, bool createNormals = true, UVGenerationMode uvMode = UVGenerationMode.NoUV, int uvChannel = 1, double uvPadding = 0, bool createTangents = false, bool createFreeEdges = false, bool keepBRepShape = true, bool overrideExistingTessellation = false)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to tessellate. double maxSag Maximum distance between the geometry and the tessellation. double sagRatio Maximum ratio distance between the geometry and the tessellation. double maxLength Maximum length of elements. double maxAngle Maximum angle between normals of two adjacent elements. bool 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. bool createTangents If true, tangents will be generated. bool createFreeEdges If true, free edges will be created for each patch borders. bool keepBRepShape If true, BRep shapes will be kept for Back to Brep or Retessellate. bool overrideExistingTessellation If true, already tessellated parts will be re-tessellated.
TransferUV
Transfer UV from a mesh to another mesh.
[HandleProcessCorruptedStateExceptions] public void TransferUV(uint source, uint destination, int sourceChannel = 0, int destinationChannel = 0, double tolerance = 0.001)
Parameters
Type Name Description uint source Occurrence of the source mesh. uint destination Occurrence of the destination mesh. int sourceChannel Source UV channel to bake. int destinationChannel Destination UV channel to bake to. double tolerance Geometric tolerance for point projection.
VoxelizePointClouds
Explode point clouds to voxels.
[HandleProcessCorruptedStateExceptions] public void VoxelizePointClouds(OccurrenceList occurrences, double voxelSize = 500)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double voxelSize Size of voxels.
BakeAOMap
Ray tracing based ambient occlusion computation.
[HandleProcessCorruptedStateExceptions] public ImageList BakeAOMap(uint sessionId, int samples = 32, bool bentNormals = false, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. int samples Number of rays cast for occlusion detection (must be a power of two in the range [8, 4096]). bool bentNormals If true, bent normals are baked in addition to AO. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeDepthMap
Depth map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeDepthMap(uint sessionId, double normalizeValue = 1, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. double normalizeValue Divisor applied to depth values before storage to texture. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeDiffuseMap
Diffuse map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeDiffuseMap(uint sessionId, bool withTransparency = false, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. bool withTransparency If true, surface transparency is stored in the alpha channel. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeDisplacementMap
Displacement map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeDisplacementMap(uint sessionId, bool normalize = true, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. bool normalize If true, displacement vectors are remapped to [-1,1]. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeEmissiveMap
Emissive map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeEmissiveMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeFeatureMap
Feature map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeFeatureMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeMaterialAOMap
AO baking from the source material.
[HandleProcessCorruptedStateExceptions] public ImageList BakeMaterialAOMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeMaterialIdMap
Color map baking based on source material Ids.
[HandleProcessCorruptedStateExceptions] public ImageList BakeMaterialIdMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeMaterialPropertyMap
Baking of custom material properties.
[HandleProcessCorruptedStateExceptions] public ImageList BakeMaterialPropertyMap(uint sessionId, string propertyName, int nComponents = 3, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. string propertyName Name of the material property to bake (must be a color, a coeff or a texture). int nComponents Expected number of components per pixel for the resulting maps. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeMetallicMap
Metallic map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeMetallicMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeNormalMap
Normal map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeNormalMap(uint sessionId, Space sourceSpace = Space.Tangent, Space destinationSpace = Space.Tangent, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. Space sourceSpace The space in which source normal vectors are defined. Space destinationSpace The space in which destination normal vectors are defined. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeOccurrencePropertyMap
Occurrence property map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeOccurrencePropertyMap(uint sessionId, string propertyName, int nComponents = 3, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. string propertyName Name of the occurrence property to bake (must be a color, a coeff or a texture). int nComponents Expected number of components per pixel for the resulting maps. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeOpacityMap
Opacity map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeOpacityMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakePartIdMap
Color map baking based on the source part Ids.
[HandleProcessCorruptedStateExceptions] public ImageList BakePartIdMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakePositionMap
Position map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakePositionMap(uint sessionId, bool local = false, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. bool local If true, position is baked in local space, otherwise in global space. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeRoughnessMap
Roughness map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeRoughnessMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeSpecularMap
Specular map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeSpecularMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeUVMap
Source UV coordinates baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeUVMap(uint sessionId, int uvChannel = 0, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. int uvChannel The channel from which UVs are baked. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BakeValidityMap
Validity map baking, distinguishing baked pixels from non baked pixels.
[HandleProcessCorruptedStateExceptions] public ImageList BakeValidityMap(uint sessionId, double validValue = 1, double invalidValue = 0)
Parameters
Type Name Description uint sessionId Baking session Id. double validValue Value used for filling baked texels. double invalidValue Value used for filling unbaked texels.
Returns
BakeVertexColorMap
Vertex color map baking.
[HandleProcessCorruptedStateExceptions] public ImageList BakeVertexColorMap(uint sessionId, ColorAlpha? defaultColor = null)
Parameters
Type Name Description uint sessionId Baking session Id. ColorAlpha defaultColor Color used for filling unbaked texels.
Returns
BeginBakingSession
Start a new baking session. This must be called prior to any of the bake*Something*Map function.
[HandleProcessCorruptedStateExceptions] public uint BeginBakingSession(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, int uvChannel = 0, int resolution = 1024, double rayOffset = 0, double rayMaxDist = -1, double opacityThreshold = -1, bool useCurrentPosition = false, bool shareMaps = true, ElementFilter sourceElements = ElementFilter.Polygons)
Parameters
Type Name Description 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). int uvChannel UV channel of destOccurrence to use for the map generation. int resolution Map resolution. double rayOffset Offset from source mesh. double rayMaxDist Maximum search distance for ray tracing during baking computation (-1 means infinity). double opacityThreshold If the opacity is under this threshold, considers as fully transparent and store the color behind the intersection. bool useCurrentPosition Use the current position instead of the T-Pose of the input occurrence. bool shareMaps If true, all the destinationOccurrences will share the same maps. ElementFilter sourceElements Defines the type of elements from which baking is performed (polygons or points).
Returns
BeginVertexBakingSession
Start a new baking session. This must be called prior to any of the bake*Something*Map function.
[HandleProcessCorruptedStateExceptions] public uint BeginVertexBakingSession(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, double rayOffset = 0, double rayMaxDist = -1, double opacityThreshold = -1, bool useCurrentPosition = false, ElementFilter sourceElements = ElementFilter.Polygons)
Parameters
Type Name Description 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). double rayOffset Offset from source mesh. double rayMaxDist Maximum search distance for ray tracing during baking computation (-1 means infinity). double opacityThreshold If the opacity is under this threshold, considers as fully transparent and store the color behind the intersection. bool useCurrentPosition Use the current position instead of the T-Pose of the input occurrence. ElementFilter sourceElements Defines the type of elements from which baking is performed (polygons or points).
Returns
CombineMaterials
Combine materials found on occurrences subtrees into one baked material and assign it to part occurrences.
[HandleProcessCorruptedStateExceptions] public void CombineMaterials(OccurrenceList occurrences, BakeOption bakingOptions, bool overrideExistingUVs = true, bool singularizeOnAO = false)
Parameters
Type Name Description OccurrenceList occurrences Root occurrences to process. BakeOption bakingOptions Baking options. bool overrideExistingUVs If true, use axis-aligned bounding box mapping to regenerate new UVs, instead of repacking existing ones from channel 0. bool singularizeOnAO If true, singularize all instances in the selected subtree if we want to bake AO in the texture.
EndBakingSession
End and destroy an existing baking session.
[HandleProcessCorruptedStateExceptions] public void EndBakingSession(uint sessionId)
Parameters
Type Name Description uint sessionId Id of the baking session to end.
FetchBakedMap
Returns information about one texel of a baked map (occurrence, polygon ID, parametric coordinates, material ID). Must be called inside a (begin/end)BakingSession block.
[HandleProcessCorruptedStateExceptions] public BakedValue FetchBakedMap(uint sessionId, uint x, uint y, uint mapId = 0)
Parameters
Type Name Description uint sessionId Baking session Id. uint x X coordinate of the map pixel to fetch. uint y Y coordinate of the map pixel to fetch. uint mapId Id of the map to fetch, if several are available.
Returns
FetchBakedVertex
Returns information about a baked vertex (occurrence, polygon ID, parametric coordinates, material ID). Must be called inside a (begin/end)BakingSession block.
[HandleProcessCorruptedStateExceptions] public BakedValue FetchBakedVertex(uint sessionId, uint n, uint dstId = 0)
Parameters
Type Name Description uint sessionId Baking session Id. uint n ID of the vertex to check. uint dstId Id of the destination occurrence the vertex belongs to, if several are provided.
Returns
SetBakingSessionPadding
Change the dilation applied to maps baked from the given session. All maps baked after the call to this function will be affected by the new value. The default value of a newly created session is 2.
[HandleProcessCorruptedStateExceptions] public void SetBakingSessionPadding(uint sessionId, int padding)
Parameters
Type Name Description uint sessionId Baking session Id. int padding Number of pixels to fill around baked islands. -1 means infinite dilation.
ConvexDecomposition
WARNING: this function is tagged as 'EXPERIMENTAL' Explode each mesh to approximated convex decomposition.
[HandleProcessCorruptedStateExceptions] public OccurrenceList ConvexDecomposition(OccurrenceList occurrences, int maxCount, int vertexCount, bool approximate, int resolution = 100000, double concavity = 0.001)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. int maxCount Maximum number of convex hull to generated. int vertexCount Maximum number of vertices per convex hull. bool approximate Approximate method. int resolution Resolution. double concavity Concavity.
Returns
ExplodeBodies
Explode all CAD Parts by body. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions] public void ExplodeBodies(OccurrenceList occurrences, bool groupOpenShells = false)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. bool 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.
[HandleProcessCorruptedStateExceptions] public void ExplodeByMaterials(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process.
ExplodeByTopoDimension
Separate polygons, lines and points into different occurrences.
[HandleProcessCorruptedStateExceptions] public OccurrenceList ExplodeByTopoDimension(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process.
Returns
ExplodeByVertexCount
Explode part occurrences to respect a maximum vertex count.
[HandleProcessCorruptedStateExceptions] public void ExplodeByVertexCount(OccurrenceList occurrences, int maxVertexCount, int maxTriangleCount, bool countMergedVerticesOnce = true)
Parameters
Type Name Description 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). bool countMergedVerticesOnce If true, one vertex used in several triangles with different normals will be counted once (for Unity must be False).
ExplodeByVoxel
WARNING: this function is tagged as 'EXPERIMENTAL' Explode parts by voxel. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions] public void ExplodeByVoxel(OccurrenceList occurrences, double voxelSize)
Parameters
ExplodeConnectedMeshes
Explode connected set of polygons to part occurrences. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions] public void ExplodeConnectedMeshes(OccurrenceList occurrences, bool explodeNonManifoldEdges = false)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. bool explodeNonManifoldEdges Split connected components along non-manifold edges.
ExplodePatches
Explode all parts by patch.
[HandleProcessCorruptedStateExceptions] public void ExplodePatches(OccurrenceList 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.
[HandleProcessCorruptedStateExceptions] public void CreateVisibilityInformation(OccurrenceList occurrences, SelectionLevel level, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, uint root = 0, bool onHemisphereOnly = false)
Parameters
Type Name Description 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). bool considerTransparentOpaque If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque. uint 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.
[HandleProcessCorruptedStateExceptions] public void CreateVisibilityInformationAdvanced(OccurrenceList occurrences, SelectionLevel level, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = false, uint root = 0)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. SelectionLevel level Level of geometries to create visibility information on: Parts, Patches or Polygons. double voxelSize Size of the voxels in mm (smaller it is, more viewpoints there are). double 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). bool considerTransparentOpaque If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque. uint root Specify another root for occluder scene.
CreateVisibilityInformationFromViewPoints
Create visilibity information on parts viewed from a given set of camera.
[HandleProcessCorruptedStateExceptions] public void CreateVisibilityInformationFromViewPoints(OccurrenceList occurrences, Point3List cameraPositions, Point3List cameraDirections, Point3List cameraUps, int resolution, double fovX = 90, bool considerTransparentOpaque = false, uint root = 0)
Parameters
Type Name Description 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). bool considerTransparentOpaque If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque. uint root Specify another root for occluder scene.
FindOccludedPartOccurrences
Get part occurrences not viewed from a sphere around the scene.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindOccludedPartOccurrences(OccurrenceList occurrences, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, uint root = 0, bool onHemisphereOnly = false)
Parameters
Type Name Description 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). bool considerTransparentOpaque If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque. uint root Specify another root for occluder scene. bool onHemisphereOnly Create viewpoints only in the Y+ hemisphere of the bounding sphere.
Returns
FindOccludedPartOccurrencesAdvanced
Get part occurrences not viewed from a set of voxel based view points.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindOccludedPartOccurrencesAdvanced(OccurrenceList occurrences, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = false, uint root = 0)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double voxelSize Size of the voxels in mm (smaller it is, more viewpoints there are). double 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). bool considerTransparentOpaque If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque. uint root Specify another root for occluder scene.
Returns
RemoveOccludedGeometries
Delete part occurrences, patches or polygons not viewed from a sphere around the scene.
[HandleProcessCorruptedStateExceptions] public BoolList RemoveOccludedGeometries(OccurrenceList occurrences, SelectionLevel level, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null, bool onHemisphereOnly = false)
Parameters
Type Name Description 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). bool 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
RemoveOccludedGeometriesAdvanced
Delete part occurrences, patches or polygons not seen from voxel based view points.
[HandleProcessCorruptedStateExceptions] public BoolList RemoveOccludedGeometriesAdvanced(OccurrenceList occurrences, SelectionLevel level, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. SelectionLevel level Level of geometries to remove : Parts, Patches or Polygons. double voxelSize Size of the voxels in mm (smaller it is, more viewpoints there are). double 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). bool 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
RemoveOccludedGeometriesFromPoints
Delete part occurrences, patches or polygons not viewed from spheres generated with a set of camera position.
[HandleProcessCorruptedStateExceptions] public BoolList RemoveOccludedGeometriesFromPoints(OccurrenceList occurrences, SelectionLevel level, Point3List positions, int resolution, int sphereCount, double fovX = 90, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null)
Parameters
Type Name Description 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). bool 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
RemoveOccludedGeometriesFromViewPoints
Delete part occurrences, patches or polygons not viewed from a set of camera position/orientation.
[HandleProcessCorruptedStateExceptions] public BoolList RemoveOccludedGeometriesFromViewPoints(OccurrenceList occurrences, SelectionLevel level, Point3List positions, Point3List directions, Point3List ups, int resolution, double fovX = 90, bool considerTransparentOpaque = false, int adjacencyDepth = 1, OccurrenceList occluders = null)
Parameters
Type Name Description 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). bool 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
CreateOcclusionMesh
WARNING: this function is tagged as 'EXPERIMENTAL' Compute an occluder or an occludee with the occurrences selected.
[HandleProcessCorruptedStateExceptions] public uint CreateOcclusionMesh(OccurrenceList occurrences, CreateOccluder type, double voxelSize, int gap)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. CreateOccluder type Type of what we create. double voxelSize Size of voxels. int gap Dilation iterations on the voxel grid.
Returns
DualContouring
WARNING: this function is tagged as 'EXPERIMENTAL' Replace the tessellations of the selected parts by a retopology based on a dual-contouring.
[HandleProcessCorruptedStateExceptions] public uint DualContouring(OccurrenceList occurrences, double filteringSize, double voxelSize, double tolerance, bool sameSizeOnAllAxis)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of part to process. double filteringSize Filtering size - must be a multiple of 2 of voxelSize. double voxelSize Voxel size used for the reconstruction. double tolerance Tolerance for the quadric error used for the simplification of the octree. bool sameSizeOnAllAxis If true, use the maximum axis length of the AABB for all axis.
Returns
MarchingCubes
Replace the tessellations of the selected parts by a marching cube representation.
[HandleProcessCorruptedStateExceptions] public uint MarchingCubes(OccurrenceList occurrences, double voxelSize, ElementFilter elements = ElementFilter.Polygons, int dilation = 0, bool surfacic = false)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double 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). bool surfacic Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight.
Returns
ProxyMesh
Replace the tessellations of the selected parts by a proxy mesh based on a voxelization.
[HandleProcessCorruptedStateExceptions] public uint ProxyMesh(OccurrenceList occurrences, double voxelSize, ElementFilter elements = ElementFilter.Polygons, int dilation = 0, bool surfacic = false)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double 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). bool surfacic Prefer this mode if the source is surfacic, the result is not guaranteed to be watertight.
Returns
Retopologize
WARNING: this function is tagged as 'EXPERIMENTAL' Replace the tessellations of the selected parts by a retopology of the external hull.
[HandleProcessCorruptedStateExceptions] public uint Retopologize(OccurrenceList occurrences, int targetTriangleCount, bool pureQuad, bool pointCloud, double precision = -1)
Parameters
Type Name Description 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. double precision If set, define the precision of the features to preserve.
Returns
Voxelize
Replace the tessellations of the selected parts by a voxelization of the external skin.
[HandleProcessCorruptedStateExceptions] public uint Voxelize(OccurrenceList occurrences, double voxelSize, ElementFilter elements = ElementFilter.Polygons, int dilation = 0, bool useCurrentAnimationPosition = false)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double 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. bool useCurrentAnimationPosition Use the current animation position instead of the t-pose.
Returns
ReplaceBy
Replace geometries by other shapes, or primitives.
[HandleProcessCorruptedStateExceptions] public void ReplaceBy(OccurrenceList occurrences, ReplaceByOption replaceBy)
Parameters
ReplaceByBox
Replace objects by a bounding box.
[HandleProcessCorruptedStateExceptions] public void ReplaceByBox(OccurrenceList occurrences, ReplaceByBoxType boxType)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to replace. ReplaceByBoxType boxType Bounding box type, oriented, axis-aligned, ...
ReplaceByConvexHull
WARNING: this function is tagged as 'EXPERIMENTAL' Replace objects by convex hull.
[HandleProcessCorruptedStateExceptions] public void ReplaceByConvexHull(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to replace.
ReplaceByPrimitive
Replace objects by a primitive shapes.
[HandleProcessCorruptedStateExceptions] public void ReplaceByPrimitive(OccurrenceList occurrences, PrimitiveShapeParameters primitive, bool generateUV = true)
Parameters
SawWithAABB
Saw the mesh with an axis-aligned bounding box. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions] public void SawWithAABB(OccurrenceList occurrences, AABB aabb, SawingMode mode, string innerSuffix = "_inner", string outerSuffix = "_outer")
Parameters
Type Name Description 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.
[HandleProcessCorruptedStateExceptions] public void SawWithOBB(OccurrenceList occurrences, OBB obb, SawingMode mode, string innerSuffix = "_inner", string 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.
[HandleProcessCorruptedStateExceptions] public uint SawWithOctree(OccurrenceList occurrences, AABB aabb, int maxDepth, int maxTrianglesByLeaf = -1, double sawTolerance = 0)
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
SawWithPlane
Saw the mesh with a plane. New parts will be placed as children of input part occurrences.
[HandleProcessCorruptedStateExceptions] public void SawWithPlane(OccurrenceList occurrences, Point3 planeOrigin, Point3 planeNormal, SawingMode mode, string innerSuffix = "_inner", string outerSuffix = "_outer", double tolerance = 0)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. Point3 planeOrigin The plane origin. Point3 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).
[HandleProcessCorruptedStateExceptions] public void ConvertSimilarPartOccurrencesToInstances(OccurrenceList occurrences, bool checkMeshTopo, bool checkVertexPositions, int vertexPositionPrecision, bool checkUVTopo, bool checkUVVertexPositions, int UVPositionprecision)
Parameters
Type Name Description OccurrenceList occurrences Occurrence for which we want to find similar parts and create instances using prototypes. bool checkMeshTopo bool checkVertexPositions int vertexPositionPrecision bool checkUVTopo bool checkUVVertexPositions int UVPositionprecision
ConvertSimilarPartOccurrencesToInstancesFast
Create instances from similar part occurrences with a fast but approximate method. This can be used to repair instances or to simplify a model that has similar parts that could be instantiated instead to reduce the number of unique meshes (reduces drawcalls, GPU memory usage and file size). Using 1.0 (100%) in all similarity criteria is non destructive. Using lower values will help finding more similar parts, even if their polycount or dimensions varies a bit.
[HandleProcessCorruptedStateExceptions] public void ConvertSimilarPartOccurrencesToInstancesFast(OccurrenceList occurrences, double dimensionsSimilarity, double polycountSimilarity, bool ignoreSymmetry)
Parameters
Type Name Description OccurrenceList occurrences Root occurrences for which we want to find similar part occurrences and create instances using prototypes. double 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. double 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. bool ignoreSymmetry If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
FindSimilarPartOccurrencesFast
Find part occurrences in the whole scene that are similar to the input part occurrences. If multiple part occurrences are passed as input, the output will contain similar part occurrences corresponding to each input part occurrence.
[HandleProcessCorruptedStateExceptions] public OccurrenceList FindSimilarPartOccurrencesFast(OccurrenceList occurrences, double dimensionsSimilarity, double polycountSimilarity, bool ignoreSymmetry)
Parameters
Type Name Description OccurrenceList occurrences Occurrences for which we want to find similar part occurrences in the scene. double 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. double 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. bool ignoreSymmetry If True, symmetries will be ignored, otherwise negative scaling will be applied in the occurrence transformation.
Returns
AlignUVIslands
WARNING: this function is tagged as 'EXPERIMENTAL' Align with the axes the UVs of the islands.
[HandleProcessCorruptedStateExceptions] public void AlignUVIslands(OccurrenceList occurrences, int channel = 0, double usePolygonsWeights = 0, double useVerticesWeights = 0, AlignmentMode alignmentMode = AlignmentMode.Auto)
Parameters
Type Name Description 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.
[HandleProcessCorruptedStateExceptions] public void ApplyUvTransform(OccurrenceList occurrences, Matrix4 matrix, int channel = 0)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. Matrix4 matrix Transformationmatrix. int channel UV channel to transform.
AutomaticUVMapping
WARNING: this function is tagged as 'EXPERIMENTAL' Generates the texture coordinates and automatically find seams.
[HandleProcessCorruptedStateExceptions] public void AutomaticUVMapping(OccurrenceList occurrences, int channel = 0, double maxAngleDistorsion = 0.5, double maxAreaDistorsion = -1, bool sharpToSeam = true, bool forbidOverlapping = true, uint resolution = 1024, uint padding = 1)
Parameters
Type Name Description 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.
[HandleProcessCorruptedStateExceptions] public void CopyUV(OccurrenceList occurrences, int sourceChannel = 0, int 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.
[HandleProcessCorruptedStateExceptions] public DoubleList GetRatioUV3D(OccurrenceList occurrences, RatioUV3DMode ratioMode, int channel = 0)
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
GetUVQualityMetrics
Compute UV mapping qualitative metrics.
[HandleProcessCorruptedStateExceptions] public GetUVQualityMetricsReturn GetUVQualityMetrics(OccurrenceList occurrences, uint channel)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. uint channel UV channel to use.
Returns
GetUvAabr
Compute the UV Axis Aligned Bounding Rectangle of a set of occurrences.
[HandleProcessCorruptedStateExceptions] public AABR GetUvAabr(OccurrenceList occurrences, int channel = 0)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. int channel UV channel to transform.
Returns
HasOverlappingUV
Check if a UV channel contains overlapping UVs.
[HandleProcessCorruptedStateExceptions] public bool HasOverlappingUV(OccurrenceList occurrences, uint channel, uint resolution = 1024)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. uint channel UV channel to use. uint resolution Resolution of rasterization grid used to check for overlaps.
Returns
MapUvOnAABB
Generate texture coordinates using the projection on object Axis Aligned Bounding Box.
[HandleProcessCorruptedStateExceptions] public void MapUvOnAABB(OccurrenceList occurrences, bool useLocalAABB, double uv3dSize, int channel = 0, bool overrideExistingUVs = true, bool ignoreScale = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. bool useLocalAABB If enabled, uses part own bounding box, else use global one. double uv3dSize 3D size of the UV space [0-1]. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel. bool ignoreScale If this and useLocalAABB are true, ignore local scale.
MapUvOnBox
Generate texture coordinates using the projection on a box.
[HandleProcessCorruptedStateExceptions] public void MapUvOnBox(OccurrenceList occurrences, Box box, int channel = 0, bool overrideExistingUVs = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. Box box Box definition. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MapUvOnCubicAABB
Generate texture coordinates using the projection on object AABB, with same scale on each axis.
[HandleProcessCorruptedStateExceptions] public void MapUvOnCubicAABB(OccurrenceList occurrences, double uv3dSize, int channel = 0, bool overrideExistingUVs = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. double uv3dSize 3D size of the UV space [0-1]. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MapUvOnCustomAABB
Generate texture coordinates using the projection on custom AABB.
[HandleProcessCorruptedStateExceptions] public void MapUvOnCustomAABB(OccurrenceList occurrences, AABB aabb, double uv3dSize, int channel = 0, bool overrideExistingUVs = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. AABB aabb Axis aligned bounding box to project on. double uv3dSize 3D size of the UV space [0-1]. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MapUvOnCylinder
Generate texture coordinates using the projection on a cylinder.
[HandleProcessCorruptedStateExceptions] public void MapUvOnCylinder(OccurrenceList occurrences, Cylinder cylinder, int channel = 0, bool overrideExistingUVs = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. Cylinder cylinder Cylinder definition. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MapUvOnFittingCylinder
Generate texture coordinates using the projection on a fitting cylinder.
[HandleProcessCorruptedStateExceptions] public void MapUvOnFittingCylinder(OccurrenceList occurrences, int channel = 0, bool overrideExistingUVs = true, bool useAABB = true, Point3? forcedAxis = null)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel. bool useAABB If true use for the fitting the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB). Point3 forcedAxis Forced axis of the Cylinder.
MapUvOnFittingSphere
Generate texture coordinates using the projection on a fitting sphere.
[HandleProcessCorruptedStateExceptions] public void MapUvOnFittingSphere(OccurrenceList occurrences, int channel = 0, bool overrideExistingUVs = true, bool useAABB = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel. bool 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.
[HandleProcessCorruptedStateExceptions] public void MapUvOnMBB(OccurrenceList occurrences, bool useLocalMBB, double uv3dSize, int channel = 0, bool 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. double uv3dSize 3D size of the UV space [0-1]. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MapUvOnPlane
Generate texture coordinates using the projection on a plane.
[HandleProcessCorruptedStateExceptions] public void MapUvOnPlane(OccurrenceList occurrences, Plane plane, int channel = 0, bool overrideExistingUVs = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. Plane plane Plane definition. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MapUvOnSphere
Generate texture coordinates using the projection on a sphere.
[HandleProcessCorruptedStateExceptions] public void MapUvOnSphere(OccurrenceList occurrences, Sphere sphere, int channel = 0, bool overrideExistingUVs = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. Sphere sphere Sphere definition. int channel The UV channel which will contains the texture coordinates. bool overrideExistingUVs If True, override existing UVs on channel.
MergeUVIslandsAffine
WARNING: this function is tagged as 'EXPERIMENTAL' Minimizes the number of seams in the UV mapping by merging UV islands using affine transformation (recommanded for hard surfaces).
[HandleProcessCorruptedStateExceptions] public void MergeUVIslandsAffine(OccurrenceList occurrences, int channel = 0, double scaleWeights = 0, double maxScaleVariationFactor = 1.2, double curvatureWeights = -1, double usePolygonsWeights = 1, double useVerticesWeights = -1, TransformationType allowedTransformations = TransformationType.TRSOnly, bool allowUVInversion = false, double rotationStep = -1)
Parameters
Type Name Description 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. bool allowUVInversion Allow merged UVs to be inverted. double rotationStep Constrains rotation steps to the specified angle (in degrees). If set to -1, allows free rotation.
MergeUVIslandsRelaxed
Minimizes the number of seams in the UV mapping by merging UV islands using local reparametrization near the UV seams (recommanded for organic surfaces).
[HandleProcessCorruptedStateExceptions] public void MergeUVIslandsRelaxed(OccurrenceList occurrences, int channel, int targetIslandCount = 0, double energyThreshold = 0.01, bool forceIsolatedFaces = true)
Parameters
Type Name Description 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. bool 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.
[HandleProcessCorruptedStateExceptions] public void NormalizeUV(OccurrenceList occurrences, int sourceUVChannel, int destinationUVChannel = -1, bool uniform = true, bool sharedUVSpace = true, bool 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). bool uniform If true, the scale will be uniform. Else UV can be deformed with a non-uniform scale. bool sharedUVSpace If true, all parts will be processed as if they were merged to avoid overlapping of their UV coordinates. bool 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).
[HandleProcessCorruptedStateExceptions] public void RemoveUV(OccurrenceList occurrences, int 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).
[HandleProcessCorruptedStateExceptions] public OccurrenceList RepackUV(OccurrenceList occurrences, int channel = 0, bool shareMap = true, int resolution = 1024, uint padding = 2, bool uniformRatio = false, int iterations = 3, bool removeOverlaps = true)
Parameters
Type Name Description OccurrenceList occurrences Part occurrences to process. int channel The UV channel to repack. bool 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. bool uniformRatio If true, UV of different part will have the same ratio. int iterations Fitting iterations. bool removeOverlaps Remove overlaps to avoid multiple triangles UVs to share the same pixel.
Returns
ResizeUVsToTextureSize
Rescale the UV coordinates to fit the input texture size.
[HandleProcessCorruptedStateExceptions] public void ResizeUVsToTextureSize(OccurrenceList occurrences, double TextureSize, int channel = 0)
Parameters
Type Name Description OccurrenceList occurrences Occurrences to use for the rescaling. double TextureSize Texture size to use for the UV coordinates (in millimeters). int channel UV channel to use.
ScaleUV
Apply a scale on texture coordinates.
[HandleProcessCorruptedStateExceptions] public void ScaleUV(OccurrenceList occurrences, double scaleU, double scaleV, int channel = 0)
Parameters
Type Name Description 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.
[HandleProcessCorruptedStateExceptions] public void SwapUvChannels(OccurrenceList occurrences, int firstChannel, int secondChannel)
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
WARNING: this function is tagged as 'EXPERIMENTAL' Unwrap UV islands.
[HandleProcessCorruptedStateExceptions] public void UnwrapUV(OccurrenceList occurrences, UnwrapUVMethod method, int channel = -1, bool createSeamsFromLoI = false, int iterMax = 50, double tolerance = 1E-05)
Parameters
Type Name Description 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. bool 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
Returns the fitting cylinder of a set of occurrences (based on MBB).
[HandleProcessCorruptedStateExceptions] public Affine GetFittingCylinder(OccurrenceList occurrences, bool useAABB = true, Point3? forcedAxis = null)
Parameters
Type Name Description OccurrenceList occurrences Occurrences to fit. bool useAABB If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB). Point3 forcedAxis Forced axis of the Cylinder when using MBB.
Returns
GetFittingSphere
Returns the fitting sphere of a set of occurrences.
[HandleProcessCorruptedStateExceptions] public Affine GetFittingSphere(OccurrenceList occurrences, bool useAABB = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences to fit. bool useAABB If true use the global Axis Aligned Bounding Box (AABB), else use a Minimum Bounding Box (MBB).
Returns
ConvertNormalMap
Convert an existing normal map between Object-space and Tangent-space.
[HandleProcessCorruptedStateExceptions] public uint ConvertNormalMap(OccurrenceList partOccurrences, uint normalMap, int uvChannel = 0, Space sourceSpace = Space.Object, Space destinationSpace = Space.Tangent, bool sourceIsRightHanded = true, bool destinationIsRightHanded = true, bool replaceMap = true, int resolution = -1, int padding = 1)
Parameters
Type Name Description OccurrenceList partOccurrences Occurrences of components using the given map. uint normalMap Source normal map to convert. int uvChannel UV channel used on the given map. Space sourceSpace Defines the space (object, world or tangent) from which the given normalMap is converted. Space destinationSpace Defines the space (object, world or tangent) to which the given normalMap is converted. bool sourceIsRightHanded Considers source normal map as part of a right-handed coordinates system. bool destinationIsRightHanded Generate destination normal map as part of a right-handed coordinates system. bool 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
CreateBillboard
Create a billboard imposter.
[HandleProcessCorruptedStateExceptions] public uint CreateBillboard(OccurrenceList occurrences, int resolution = 1024, bool XPositive = true, bool XNegative = true, bool YPositive = true, bool YNegative = true, bool ZPositive = true, bool ZNegative = true, bool moveFacesToCenter = true, bool leftHandedNormalMap = false)
Parameters
Type Name Description 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
FillNormalMap
WARNING: this function is tagged as 'EXPERIMENTAL' Fill normal map (useful after a decimation for example).
[HandleProcessCorruptedStateExceptions] public void FillNormalMap(uint normalMap)
Parameters
Type Name Description uint normalMap Source normal map to convert.
OrientNormalMap
WARNING: this function is tagged as 'EXPERIMENTAL' Orient a tangent space normal map (all Z positive).
[HandleProcessCorruptedStateExceptions] public void OrientNormalMap(uint normalMap)
Parameters
Type Name Description uint normalMap Normal map to orient.
BarySmooth
Smooth the tessellations by moving the vertices to the barycenter of their neighbors.
[HandleProcessCorruptedStateExceptions] public void BarySmooth(OccurrenceList occurrences, int iteration = 1)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. int iteration Number of iterations.
CrackMoebiusStrips
Remove moebius strip by topologically cracking them (make it orientable).
[HandleProcessCorruptedStateExceptions] public void CrackMoebiusStrips(OccurrenceList occurrences, int maxEdgeCount = 3)
Parameters
Type Name Description 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.
[HandleProcessCorruptedStateExceptions] public void CrackNonManifoldVertices(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to repair.
CreateCavityOccurrences
Identify cavities and create occurrences to show them.
[HandleProcessCorruptedStateExceptions] public uint CreateCavityOccurrences(OccurrenceList occurrences, double voxelSize, double minimumCavityVolume, InnerOuterOption mode = InnerOuterOption.All, uint parent = 0)
Parameters
Type Name Description OccurrenceList occurrences Occurrences set to identify cavities. double voxelSize Size of the voxels in mm. double minimumCavityVolume Minimum volume of a cavity in cubic meter. InnerOuterOption mode Select where to place camera (all cavities, only outer or only inner cavities). uint 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
InvertPolygonFacesOrientation
Invert the orientation of tessellation elements.
[HandleProcessCorruptedStateExceptions] public void InvertPolygonFacesOrientation(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
MoebiusCracker
Splits moebius ring.
[HandleProcessCorruptedStateExceptions] public void MoebiusCracker(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to repair.
OrientNormals
Orient existing normal according to the polygons clockwise.
[HandleProcessCorruptedStateExceptions] public void OrientNormals(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to orient normals.
RemeshSurfacicHoles
WARNING: this function is tagged as 'EXPERIMENTAL' Resmesh surfacic holes of tessellations.
[HandleProcessCorruptedStateExceptions] public void RemeshSurfacicHoles(OccurrenceList occurrences, double maxDiameter = 0, bool refine = true, int numberOfNeighbors = 3, uint fillWithMaterial = 0)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double maxDiameter Maximum surfacic holes diameters. bool refine Refine mesh for more details in holes. int numberOfNeighbors Number of neighboring vertices to use for the MLS projection. uint fillWithMaterial If set, the given material will be used to fill the holes.
RemoveDegeneratedPolygons
Remove some kinds of degenerated polygons.
[HandleProcessCorruptedStateExceptions] public void RemoveDegeneratedPolygons(OccurrenceList occurrences, double tolerance)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double tolerance Degenerated tolerance.
RemoveMultiplePolygon
Remove multiple polygon.
[HandleProcessCorruptedStateExceptions] public void RemoveMultiplePolygon(OccurrenceList 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.
[HandleProcessCorruptedStateExceptions] public double RemoveZFighting(OccurrenceList occurrences)
Parameters
Returns
RepairMesh
Launch the repair process to repair a disconnected or not clean tessellation.
[HandleProcessCorruptedStateExceptions] public void RepairMesh(OccurrenceList occurrences, double tolerance, bool crackNonManifold = true, bool orient = true)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. double tolerance Connection tolerance. bool crackNonManifold At the end of the repair process, crack resulting non-manifold edges. bool orient If true reorient the model.
RepairNullNormals
Create normal on an existing normal set when normal is null (polygons appears black).
[HandleProcessCorruptedStateExceptions] public void RepairNullNormals(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to repair null normals.
SeparateToManifold
WARNING: this function is tagged as 'EXPERIMENTAL' Remove non manifold edges and try to reconnect manifold groups of triangles.
[HandleProcessCorruptedStateExceptions] public void SeparateToManifold(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
SewBoundary
Sew boundaries between them.
[HandleProcessCorruptedStateExceptions] public void SewBoundary(OccurrenceList occurrences, double maxDistance)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to repair. double maxDistance Maximum distance between bundaries.
VertexOffset
Move the vertices by the offsset along their normal.
[HandleProcessCorruptedStateExceptions] public void VertexOffset(OccurrenceList occurrences, double offset = 1)
Parameters
OrientFromFace
Orient all connected polygons in the same orientation of the polygon selectionned.
[HandleProcessCorruptedStateExceptions] public void OrientFromFace()
OrientPolygonFaces
Orient tessellation elements.
[HandleProcessCorruptedStateExceptions] public void OrientPolygonFaces(OccurrenceList occurrences, bool makeOrientable = true, bool useArea = false, OrientStrategy orientStrategy = OrientStrategy.ExteriorOnly)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process. bool makeOrientable Crack moebius strips to make the model orientable. bool 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.
[HandleProcessCorruptedStateExceptions] public void OrientPolygonFacesAdvanced(OccurrenceList occurrences, double voxelSize, double minimumCavityVolume, int resolution, InnerOuterOption mode = InnerOuterOption.All, bool considerTransparentOpaque = true, OrientStrategyAdvanced orientStrategy = OrientStrategyAdvanced.VisibilityByConnected)
Parameters
Type Name Description OccurrenceList occurrences Occurrences to orient. double voxelSize Size of the voxels in mm (smaller it is, more viewpoints there are). double 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). bool 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.
[HandleProcessCorruptedStateExceptions] public void OrientPolygonFacesFromCamera(OccurrenceList occurrences, Point3 cameraPosition, Point3 cameraDirection, Point3 cameraUp, int resolution, double 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.
[HandleProcessCorruptedStateExceptions] public void Equilateralize(OccurrenceList occurrences, int 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.
[HandleProcessCorruptedStateExceptions] public void Quadify(OccurrenceList 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.
[HandleProcessCorruptedStateExceptions] public void Requadify(OccurrenceList occurrences, bool 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.
[HandleProcessCorruptedStateExceptions] public void Triangularize(OccurrenceList 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.
[HandleProcessCorruptedStateExceptions] public void CreateVertexWeightsFromVertexColors(OccurrenceList occurrences, double offset = 0, double 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.
[HandleProcessCorruptedStateExceptions] public void CreateVertexWeightsFromVisibilityAttributes(OccurrenceList occurrences, double offset = 0, double 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.
[HandleProcessCorruptedStateExceptions] public void DeleteVertexWeights(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to process.
CreateVisibilityAttributes
Create visibility attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void CreateVisibilityAttributes(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to create attributes.
DeletePolygonalWeightAttribute
WARNING: this function is tagged as 'EXPERIMENTAL' Delete Polygonal Weight attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void DeletePolygonalWeightAttribute(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to delete attributes.
DeleteVisibilityAttributes
Delete visibility attributes on tessellations.
[HandleProcessCorruptedStateExceptions] public void DeleteVisibilityAttributes(OccurrenceList 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.
[HandleProcessCorruptedStateExceptions] public void FlagVisibilityAttributesOnTransparents(OccurrenceList occurrences)
Parameters
Type Name Description OccurrenceList occurrences Occurrences of components to create attributes.
TransferVisibilityToPolygonalWeight
WARNING: this function is tagged as 'EXPERIMENTAL' Set Polygonal Weight Attribute from Visibility Attribute.
[HandleProcessCorruptedStateExceptions] public void TransferVisibilityToPolygonalWeight(OccurrenceList occurrences, VisibilityToWeightMode Mode)
Parameters