Class AlgoInterface
Inherited Members
Namespace: UnityEngine.Pixyz.Algo
Syntax
public class AlgoInterface : Interface
Methods
AlignUVIslands(OccurrenceList, int, double, double, AlignmentMode)
WARNING: this function is tagged as 'EXPERIMENTAL'
Align with the axes the UVs of the islands
Declaration
[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(OccurrenceList, Matrix4, int)
Apply a transformation matrix on texture coordinates
Declaration
[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 |
AssembleCAD(OccurrenceList, double, bool)
Assemble faces of CAD shapes
Declaration
[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 |
AutomaticUVMapping(OccurrenceList, int, double, double, bool, bool, uint, uint)
WARNING: this function is tagged as 'EXPERIMENTAL'
Generates the texture coordinates and automatically find seams
Declaration
[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 |
BackToInitialBRep(OccurrenceList)
Create the BRep shape from a Tessellated shape with Domain Patch Attributes (after tessellate)
Declaration
[HandleProcessCorruptedStateExceptions]
public void BackToInitialBRep(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
BakeImpostor(uint, int, int, bool, int, int, bool, bool, bool)
bakes impostors textures
Declaration
[HandleProcessCorruptedStateExceptions]
public OctahedralImpostor BakeImpostor(uint occurrence, int XFrames, int YFrames, bool hemi = false, int resolution = 1024, int padding = 0, bool roughness = false, bool metallic = false, bool ao = false)
Parameters
Type | Name | Description |
---|---|---|
uint | occurrence | |
int | XFrames | |
int | YFrames | |
bool | hemi | |
int | resolution | |
int | padding | |
bool | roughness | |
bool | metallic | |
bool | ao |
Returns
Type | Description |
---|---|
OctahedralImpostor |
BakeMaps(OccurrenceList, OccurrenceList, BakeMapList, int, int, int, bool, string, CustomBakeMapList, double, BakingMethod, double, bool, double, getPixelValueList, bool, ImageList, bool)
Bake texture maps on meshes from self or other meshes
Declaration
[HandleProcessCorruptedStateExceptions]
public ImageList BakeMaps(OccurrenceList destinationOccurrences, OccurrenceList sourceOccurrences, BakeMapList mapsToBake, int channel = 0, int resolution = 1024, int padding = 1, bool shareMaps = true, string mapSuffix = "", CustomBakeMapList additionalCustomMaps = null, double tolerance = -1, BakingMethod method = BakingMethod.RayOnly, double opacityThreshold = 0.1, bool useCurrentPosition = false, double offset = 0, getPixelValueList callbackList = null, bool oneToOne = false, ImageList reuseMaps = null, bool outputUsedMap = false)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | destinationOccurrences | Occurrences of the meshes where to store the baked map |
OccurrenceList | sourceOccurrences | Occurrences of components from which to bake maps (if empty use destination) |
BakeMapList | mapsToBake | List of map to generate (Normal, Diffuse, ...) |
int | channel | UV channel of destOccurrence to use for the map generation |
int | resolution | Map resolution |
int | padding | Add padding to the map. A negative value means that the texture will be filled, and the padding for uv island is the absolute value |
bool | shareMaps | If true, all the destinationOccurrences will share the same maps |
string | mapSuffix | Add a suffix to the map names |
CustomBakeMapList | additionalCustomMaps | Additional custom maps to bake |
double | tolerance | Tolerance of projection for baking from source to destination |
BakingMethod | method | Method to find source color if source occurrences are different than destination occurrences (Prefer ProjOnly for point clouds and RayOnly for meshes) |
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 |
double | offset | Offset from mesh |
getPixelValueList | callbackList | Callbacks that returns a color |
bool | oneToOne | If true, each occurrence in sourceOccurrences will be baked to the occurrence in destinationOccurrences at the same index |
ImageList | reuseMaps | Allow to use existing image instead of creating new ones (override shareMaps=true) the maps must be in the same order than mapsToBake+additionalCustomMaps+callbackList + usedMap (see: outputUsedMap) |
bool | outputUsedMap | If True, an extra maps contained used pixels is output at the end of bakedMaps. It can be used by reuseMaps |
Returns
Type | Description |
---|---|
ImageList |
BakeVertexAttributes(OccurrenceList, OccurrenceList, bool, bool, bool)
Bake vertex attributes on meshes from other meshes
Declaration
[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 |
BarySmooth(OccurrenceList, int)
Smooth the tessellations by moving the vertices to the barycenter of their neighbors
Declaration
[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 |
CalculateNormalsInPointClouds(OccurrenceList)
WARNING: this function is tagged as 'EXPERIMENTAL'
calculate the normal of each point of a Point Cloud
Declaration
[HandleProcessCorruptedStateExceptions]
public void CalculateNormalsInPointClouds(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
CombineMaterials(OccurrenceList, BakeOption, bool, bool)
Combine materials found on occurrences subtrees into one baked material and assign it to part occurrences
Declaration
[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, override existing UVs on channel |
bool | singularizeOnAO | If true, singularize all instances in the selected subtree if we want to bake AO in the texture |
CombineMeshesByMaterials(OccurrenceList, bool, MergeHiddenPartsMode)
Explode and (re)merge a set of mesh parts by visible materials
Declaration
[HandleProcessCorruptedStateExceptions]
public OccurrenceList CombineMeshesByMaterials(OccurrenceList occurrences, bool mergeNoMaterials = true, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.Destroy)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of the parts to merge |
bool | mergeNoMaterials | If true, merge all parts with no active material together, else do not merge them |
MergeHiddenPartsMode | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately |
Returns
Type | Description |
---|---|
OccurrenceList |
ConfigureFunctionLogger(string, bool, bool, bool)
Declaration
[HandleProcessCorruptedStateExceptions]
public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters
Type | Name | Description |
---|---|---|
string | functionName | |
bool | enableFunction | |
bool | enableParameters | |
bool | enableExecutionTime |
ConvertNormalMap(OccurrenceList, uint, int, bool, bool, bool, bool, bool, int, int)
Convert an existing normal map between Object-space and Tangent-space
Declaration
[HandleProcessCorruptedStateExceptions]
public uint ConvertNormalMap(OccurrenceList partOccurrences, uint normalMap, int uvChannel = 0, bool sourceIsObjectSpace = true, bool destinationIsObjectSpace = false, 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 |
bool | sourceIsObjectSpace | If True, consider the given normalMap in Object-space representation, else Tangent-space |
bool | destinationIsObjectSpace | If True, convert the given normalMap to Object-space representation, else Tangent-space |
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
Type | Description |
---|---|
uint |
ConvertSimilarPartOccurrencesToInstances(OccurrenceList, bool, bool, int, bool, bool, int, bool)
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).
Declaration
[HandleProcessCorruptedStateExceptions]
public void ConvertSimilarPartOccurrencesToInstances(OccurrenceList occurrences, bool checkMeshTopo, bool checkVertexPositions, int vertexPositionPrecision, bool checkUVTopo, bool checkUVVertexPositions, int UVPositionprecision, bool keepExistingPrototypes)
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 | |
bool | keepExistingPrototypes |
ConvertSimilarPartOccurrencesToInstancesFast(OccurrenceList, double, double, bool, bool, bool)
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.
Declaration
[HandleProcessCorruptedStateExceptions]
public void ConvertSimilarPartOccurrencesToInstancesFast(OccurrenceList occurrences, double dimensionsSimilarity, double polycountSimilarity, bool ignoreSymmetry, bool keepExistingPrototypes, bool createNewOccurrencesForPrototypes)
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. |
bool | keepExistingPrototypes | If True, existing prototypes will be kept. Otherwise, the selection will be singularized and instanced will be created from scratch. |
bool | createNewOccurrencesForPrototypes | If True, a new occurrence will be created for each prototype. Those occurrences won't appear in the hierarchy, and so deleting one of the part in the scene has no risks of singularizing. If set to False, an arbitrary occurrence will be used as the prototype for other similar occurrences, which is less safe but will result in less occurrences. |
ConvexDecomposition(OccurrenceList, int, int, bool, int, double)
WARNING: this function is tagged as 'EXPERIMENTAL'
Explode each mesh to approximated convex decomposition
Declaration
[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
Type | Description |
---|---|
OccurrenceList |
CopyUV(OccurrenceList, int, int)
Copy an UV channel to another UV channel
Declaration
[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 |
CrackCADMoebiusStrip(OccurrenceList)
Detect Moebius strip and crack them if there is somme of them in the selection
Declaration
[HandleProcessCorruptedStateExceptions]
public void CrackCADMoebiusStrip(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to check |
CrackEdges(OccurrenceList, bool, double, bool)
crack polygonal edges according to given criteria (deprecated, use crackMeshEdges instead)
Declaration
[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(OccurrenceList, bool, bool, IntList, bool, bool, bool)
crack polygonal edges according to given criteria
Declaration
[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 |
CrackMoebiusStrips(OccurrenceList, int)
Remove moebius strip by topologically cracking them (make it orientable)
Declaration
[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(OccurrenceList)
Splits non-manifold vertices
Declaration
[HandleProcessCorruptedStateExceptions]
public void CrackNonManifoldVertices(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
CreateBillboard(OccurrenceList, int, bool, bool, bool, bool, bool, bool, bool, bool)
Create a billboard imposter
Declaration
[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
Type | Description |
---|---|
uint |
CreateCavityOccurrences(OccurrenceList, double, double, InnerOuterOption, uint)
Identify cavities and create occurrences to show them
Declaration
[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
Type | Description |
---|---|
uint |
CreateFreeEdgesFromPatches(OccurrenceList)
Create free edges from patch borders
Declaration
[HandleProcessCorruptedStateExceptions]
public void CreateFreeEdgesFromPatches(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
CreateIdentifiedPatchesFromPatches(OccurrenceList)
Create identified patch from existing patch (this is useful before cloning for baking)
Declaration
[HandleProcessCorruptedStateExceptions]
public void CreateIdentifiedPatchesFromPatches(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
CreateIndexMapFromOccurrences(OccurrenceList, int, bool)
Create an IndexMap and add an UVSet so that each mesh will have UVs refering to one different pixel of the index map and that pixel will have the value i for occurrences[i]. Warning: all occurrences will be singularized
Declaration
[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
Type | Description |
---|---|
uint |
CreateNormals(OccurrenceList, double, bool, bool)
Create normal attributes on tessellations
Declaration
[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 |
CreateOcclusionMesh(OccurrenceList, CreateOccluder, double, int)
WARNING: this function is tagged as 'EXPERIMENTAL'
Compute an occluder or an occludee with the occurrences selected
Declaration
[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
Type | Description |
---|---|
uint |
CreatePointCloudKDTree(OccurrenceList, int, bool)
Create a KD-Tree from some point clouds occurrence, the given occurrences are deleted (even if they contains triangles) and the KD-Tree is represented in a new occurrence sub tree
Declaration
[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
Type | Description |
---|---|
uint |
CreateTangents(OccurrenceList, int, bool)
Create tangent attributes on tessellations
Declaration
[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(OccurrenceList)
Bake vertex colors using main material color. May duplicate some vertices
Declaration
[HandleProcessCorruptedStateExceptions]
public void CreateVertexColorFromMaterials(OccurrenceList occurrenceList)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrenceList |
CreateVertexWeightsFromVertexColors(OccurrenceList, double, double)
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
Declaration
[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(OccurrenceList, double, double)
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
Declaration
[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 |
CreateVisibilityAttributes(OccurrenceList)
Create visibility attributes on tessellations
Declaration
[HandleProcessCorruptedStateExceptions]
public void CreateVisibilityAttributes(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to create attributes |
CreateVisibilityInformation(OccurrenceList, SelectionLevel, int, int, double, bool, uint, bool)
Create visilibity information on part occurrences viewed from a set of camera automatically placed on a sphere around the scene
Declaration
[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(OccurrenceList, SelectionLevel, double, double, int, InnerOuterOption, bool, uint)
Create visilibity information on part occurrences viewed from a set of voxel based view points.
Declaration
[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(OccurrenceList, Point3List, Point3List, Point3List, int, double, bool, uint)
Create visilibity information on parts viewed from a given set of camera
Declaration
[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 |
CreateVisibilityPatchesFromPatch(OccurrenceList)
Create visibility patches from existing patches
Declaration
[HandleProcessCorruptedStateExceptions]
public void CreateVisibilityPatchesFromPatch(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Decimate(OccurrenceList, double, double, double, double, bool)
reduce the polygon count by removing some vertices
Declaration
[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(OccurrenceList, double, double, double, double, double, double, double, bool, double, double, bool, QualitySpeedTradeoff)
WARNING: this function is tagged as 'EXPERIMENTAL'
reduce the polygon count by collapsing some edges to obtain an simplified mesh
Declaration
[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(OccurrenceList, double)
decimate Point Cloud Occurrences according to tolerance
Declaration
[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(OccurrenceList, DecimateOptionsSelector, UVImportanceEnum, bool, ulong, bool, int)
reduce the polygon count by collapsing some edges to obtain a target triangle count (iterative version that use less memory)
Declaration
[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(uint, AttributType)
Delete designed attribute on tessellations
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteAttibute(uint occurrence, AttributType type)
Parameters
Type | Name | Description |
---|---|---|
uint | occurrence | Occurrence to detele attribute from |
AttributType | type | Attribute type |
DeleteBRepShapes(OccurrenceList, bool)
Delete BRep representation on parts
Declaration
[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(OccurrenceList)
Delete all free vertices of the mesh of given parts
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteFreeVertices(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
DeleteLines(OccurrenceList)
Delete all free line of the mesh of given parts
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteLines(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
DeleteNormals(OccurrenceList)
Remove normal attributes on tessellations
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteNormals(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to delete |
DeletePatches(OccurrenceList, bool)
Delete patches attributes on tessellations
Declaration
[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(OccurrenceList)
Delete all polygons of the mesh of given parts
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeletePolygons(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
DeleteTangents(OccurrenceList)
Remove tangent attributes on tessellations
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteTangents(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to delete |
DeleteTextureCoordinates(OccurrenceList, int)
Delete texture coordinates on tessellations
Declaration
[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) |
DeleteVertexWeights(OccurrenceList)
Remove any existing vertex weights attributes on given occurrences
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteVertexWeights(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
DeleteVisibilityAttributes(OccurrenceList)
Delete visibility attributes on tessellations
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteVisibilityAttributes(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to delete attributes |
DeleteVisibilityPatches(OccurrenceList)
delete the visibility patches of given occurrences
Declaration
[HandleProcessCorruptedStateExceptions]
public void DeleteVisibilityPatches(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
DualContouring(OccurrenceList, double, double, double, bool)
WARNING: this function is tagged as 'EXPERIMENTAL'
Replace the tessellations of the selected parts by a retopology based on a dual-contouring
Declaration
[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
Type | Description |
---|---|
uint |
Equilateralize(OccurrenceList, int)
Sswap edges to make triangles more equilateral
Declaration
[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 |
EvalDecimateErrorForTarget(OccurrenceList, DecimateOptionsSelector, double, double, double, double, double, bool, bool)
returns the max error to set to reach a given target
Declaration
[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
Type | Description |
---|---|
double |
ExplodeBodies(OccurrenceList, bool)
Explode all CAD Parts by body. New parts will be placed as children of input part occurrences.
Declaration
[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(OccurrenceList)
Explode all parts by material. New parts will be placed as children of input part occurrences.
Declaration
[HandleProcessCorruptedStateExceptions]
public void ExplodeByMaterials(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
ExplodeByVertexCount(OccurrenceList, int, int, bool)
Explode part occurrences to respect a maximum vertex count
Declaration
[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(OccurrenceList, double)
WARNING: this function is tagged as 'EXPERIMENTAL'
Explode parts by voxel. New parts will be placed as children of input part occurrences.
Declaration
[HandleProcessCorruptedStateExceptions]
public void ExplodeByVoxel(OccurrenceList occurrences, double voxelSize)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
double | voxelSize | Voxel size |
ExplodeConnectedMeshes(OccurrenceList, bool)
Explode connected set of polygons to part occurrences. New parts will be placed as children of input part occurrences.
Declaration
[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(OccurrenceList)
Explode all parts by patch
Declaration
[HandleProcessCorruptedStateExceptions]
public void ExplodePatches(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
ExtractNeutralAxis(OccurrenceList, double, bool)
Extract neutral axis from tessellations
Declaration
[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 |
FillNormalMap(uint)
WARNING: this function is tagged as 'EXPERIMENTAL'
Fill normal map (useful after a decimation for example)
Declaration
[HandleProcessCorruptedStateExceptions]
public void FillNormalMap(uint normalMap)
Parameters
Type | Name | Description |
---|---|---|
uint | normalMap | Source normal map to convert |
FilletMesh(OccurrenceList, double, FilletingMode, int, bool, uint, int)
WARNING: this function is tagged as 'EXPERIMENTAL'
Fillet a mesh according to its Lines of Interest
Declaration
[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(OccurrenceList, double)
remove hidden polygons using voxels and cavities
Declaration
[HandleProcessCorruptedStateExceptions]
public void FilterHiddenPolygons(OccurrenceList occurrences, double voxelSize)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
double | voxelSize | Size of voxels |
FindBestPivotBetweenOccurrences(OccurrenceList, OccurrenceList, double)
Try to compute the pivot point between 2 sets of occurrences
Declaration
[HandleProcessCorruptedStateExceptions]
public Matrix4 FindBestPivotBetweenOccurrences(OccurrenceList assembly1, OccurrenceList assembly2, double precision = -1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | assembly1 | Set occurrences 1 |
OccurrenceList | assembly2 | Set occurrences 2 |
double | precision | Precision used to determine if elements are similar |
Returns
Type | Description |
---|---|
Matrix4 |
FindOccludedPartOccurrences(OccurrenceList, int, int, double, bool, uint, bool)
get part occurrences not viewed from a sphere around the scene
Declaration
[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
Type | Description |
---|---|
OccurrenceList |
FindOccludedPartOccurrencesAdvanced(OccurrenceList, double, double, int, InnerOuterOption, bool, uint)
get part occurrences not viewed from a set of voxel based view points.
Declaration
[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
Type | Description |
---|---|
OccurrenceList |
FindSimilarPartOccurrencesFast(OccurrenceList, double, double, bool)
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.
Declaration
[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
Type | Description |
---|---|
OccurrenceList |
FlagVisibilityAttributesOnTransparents(OccurrenceList)
Add one count to all visiblility attributes (poly and patch) on transparent patches
Declaration
[HandleProcessCorruptedStateExceptions]
public void FlagVisibilityAttributesOnTransparents(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to create attributes |
GetAllAxisFromCADModel(OccurrenceList)
Return all the main axis contained in the CAD models given
Declaration
[HandleProcessCorruptedStateExceptions]
public GetAllAxisFromCADModelReturn GetAllAxisFromCADModel(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to check |
Returns
Type | Description |
---|---|
GetAllAxisFromCADModelReturn |
GetFittingCylinder(OccurrenceList, bool, Point3?)
Returns the fitting cylinder of a set of occurrences (based on MBB)
Declaration
[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
Type | Description |
---|---|
Affine |
GetFittingSphere(OccurrenceList, bool)
Returns the fitting sphere of a set of occurrences
Declaration
[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
Type | Description |
---|---|
Affine |
GetLastError()
Declaration
public static string GetLastError()
Returns
Type | Description |
---|---|
string |
GetOptimalTextureResolution(OccurrenceList, double)
WARNING: this function is tagged as 'EXPERIMENTAL'
Returns the optimal resolution based on a number of texels per 3D space units (e.g : mm)
Declaration
[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
Type | Description |
---|---|
int |
GetRatioUV3D(OccurrenceList, RatioUV3DMode, int)
Compute the ratio between the UV and the 3D size
Declaration
[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
Type | Description |
---|---|
DoubleList |
GetTessellations(OccurrenceList)
returns all the tessellation of the given occurrences (only returns editable mesh, see algo.toEditableMesh)
Declaration
[HandleProcessCorruptedStateExceptions]
public TessellationList GetTessellations(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Returns
Type | Description |
---|---|
TessellationList |
GetUV3dRatio(OccurrenceList)
WARNING: this function is tagged as 'EXPERIMENTAL'
Returns the ratio of size between UV and 3D (max value, actually at the 90th percentil)
Declaration
[HandleProcessCorruptedStateExceptions]
public double GetUV3dRatio(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences on which to compute optimal texture resolution |
Returns
Type | Description |
---|---|
double |
GetUVQualityMetrics(OccurrenceList, uint)
Compute UV mapping qualitative metrics.
Declaration
[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
Type | Description |
---|---|
GetUVQualityMetricsReturn |
GetUvAabr(OccurrenceList, int)
Compute the UV Axis Aligned Bounding Rectangle of a set of occurrences
Declaration
[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
Type | Description |
---|---|
AABR |
GetVisibilityStats(OccurrenceList)
returns the visibility statistics for some occurrences
Declaration
[HandleProcessCorruptedStateExceptions]
public GetVisibilityStatsReturn GetVisibilityStats(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
Returns
Type | Description |
---|---|
GetVisibilityStatsReturn |
GetVisualComparisonFootprint(OccurrenceList, OccurrenceList, int, int, double, bool)
Compute the visual footprint of the difference between two sets of occurrences
Declaration
[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
Type | Description |
---|---|
double |
IdentifyLinesOfInterest(OccurrenceList, bool, bool, IntList, bool, bool, bool)
Identify LoI according to given criteria. It will create a new LoI attribute on the mesh that can be used afterward by some functions
Declaration
[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(OccurrenceList, bool, double, bool, bool, bool, bool)
Create patches (submeshes) on meshes (needed by some functions)
Declaration
[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(OccurrenceList, double, double, ConvexityFilter, bool)
WARNING: this function is tagged as 'EXPERIMENTAL'
Mark as Lines Of Interest the sharp edges
Declaration
[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 |
InvertPolygonFacesOrientation(OccurrenceList)
Invert the orientation of tessellation elements
Declaration
[HandleProcessCorruptedStateExceptions]
public void InvertPolygonFacesOrientation(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
InvertTangents(OccurrenceList, bool)
Invert tangents orientation (usefull to switch between right-handed/left-handed normal maps
Declaration
[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(OccurrenceList, UseColorOption, int, int)
WARNING: this function is tagged as 'EXPERIMENTAL'
Generate a textured quadrangle over an existing mesh of coplanar lines
Declaration
[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(OccurrenceList, bool, bool, double)
List features from tessellations
Declaration
[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
Type | Description |
---|---|
OccurrenceFeaturesList |
LoopSubdivMesh(OccurrenceList, int)
Apply Loop Subdivision on Triangle-only Mesh
Declaration
[HandleProcessCorruptedStateExceptions]
public void LoopSubdivMesh(OccurrenceList occurrences, int depth)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
int | depth | Subdivision depth |
MapUvOnAABB(OccurrenceList, bool, double, int, bool, bool)
Generate texture coordinates using the projection on object Axis Aligned Bounding Box
Declaration
[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(OccurrenceList, Box, int, bool)
Generate texture coordinates using the projection on a box
Declaration
[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(OccurrenceList, double, int, bool)
Generate texture coordinates using the projection on object AABB, with same scale on each axis
Declaration
[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(OccurrenceList, AABB, double, int, bool)
Generate texture coordinates using the projection on custom AABB
Declaration
[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(OccurrenceList, Cylinder, int, bool)
Generate texture coordinates using the projection on a cylinder
Declaration
[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(OccurrenceList, int, bool, bool, Point3?)
Generate texture coordinates using the projection on a fitting cylinder
Declaration
[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(OccurrenceList, int, bool, bool)
Generate texture coordinates using the projection on a fitting sphere
Declaration
[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(OccurrenceList, bool, double, int, bool)
Generate texture coordinates using the projection on object Minimum Bounding Box
Declaration
[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(OccurrenceList, Plane, int, bool)
Generate texture coordinates using the projection on a plane
Declaration
[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(OccurrenceList, Sphere, int, bool)
Generate texture coordinates using the projection on a sphere
Declaration
[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 |
MarchingCubes(OccurrenceList, double, ElementFilter, int, bool)
Replace the tessellations of the selected parts by a marching cube representation
Declaration
[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
Type | Description |
---|---|
uint |
MergeUVIslandsAffine(OccurrenceList, int, double, double, double, double, double, TransformationType, bool)
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)
Declaration
[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)
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 |
MergeUVIslandsRelaxed(OccurrenceList, int, int, double, bool)
Minimizes the number of seams in the UV mapping by merging UV islands using local reparametrization near the UV seams (recommanded for organic surfaces)
Declaration
[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. |
MergeVertices(OccurrenceList, double, TopologyCategoryMask)
merge near vertices according to the given distance
Declaration
[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(OccurrenceList, OccurrenceList, MeshBooleanOperation)
WARNING: this function is tagged as 'EXPERIMENTAL'
Computes the boolean operation between the meshes of two occurrence lists
Declaration
[HandleProcessCorruptedStateExceptions]
public uint MeshBooleanOperation(OccurrenceList occurrencesA, OccurrenceList occurrencesB, MeshBooleanOperation operation)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrencesA | Occurrences A |
OccurrenceList | occurrencesB | Occurrences B |
MeshBooleanOperation | operation | The operation to perform |
Returns
Type | Description |
---|---|
uint |
MeshComparison(uint, uint)
WARNING: this function is tagged as 'EXPERIMENTAL'
compare two meshes
Declaration
[HandleProcessCorruptedStateExceptions]
public double MeshComparison(uint mesh_1, uint mesh_2)
Parameters
Type | Name | Description |
---|---|---|
uint | mesh_1 | |
uint | mesh_2 |
Returns
Type | Description |
---|---|
double |
MeshComparisonBatch(OccurrenceList, OccurrenceList)
WARNING: this function is tagged as 'EXPERIMENTAL'
compare each couple of meshes and returns the maximum for each couple
Declaration
[HandleProcessCorruptedStateExceptions]
public DistanceList MeshComparisonBatch(OccurrenceList meshes1, OccurrenceList meshes2)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | meshes1 | |
OccurrenceList | meshes2 |
Returns
Type | Description |
---|---|
DistanceList |
MeshIntersections(OccurrenceList, OccurrenceList)
WARNING: this function is tagged as 'EXPERIMENTAL'
Computes the list of polylines at the intersections of the meshes of two occurrence lists
Declaration
[HandleProcessCorruptedStateExceptions]
public Point3ListList MeshIntersections(OccurrenceList occurrencesA, OccurrenceList occurrencesB)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrencesA | Occurrences A |
OccurrenceList | occurrencesB | Occurrences B |
Returns
Type | Description |
---|---|
Point3ListList |
MoebiusCracker(OccurrenceList)
Splits moebius ring
Declaration
[HandleProcessCorruptedStateExceptions]
public void MoebiusCracker(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
NoiseMesh(OccurrenceList, double)
Apply noise to vertex positions along their normals
Declaration
[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 |
NormalizeUV(OccurrenceList, int, int, bool, bool, bool)
Normalize UVs to fit in the [0-1] uv space
Declaration
[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) |
OptimizeCADLoops(OccurrenceList)
Optimize CAD Face loops by merging useless loop edges
Declaration
[HandleProcessCorruptedStateExceptions]
public void OptimizeCADLoops(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to optimize |
OptimizeForRendering(OccurrenceList)
Optimize mesh for rendering (lossless, only reindexing)
Declaration
[HandleProcessCorruptedStateExceptions]
public void OptimizeForRendering(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to optimize |
OptimizeSubMeshes(OccurrenceList)
Sort sub meshes by materials
Declaration
[HandleProcessCorruptedStateExceptions]
public void OptimizeSubMeshes(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrencess to process |
OptimizeTextureSize(uint, double)
WARNING: this function is tagged as 'EXPERIMENTAL'
Resizes scene textures based on a number of texels per 3D space units (e.g: mm)
Declaration
[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 |
OrientFromFace()
Orient all connected polygons in the same orientation of the polygon selectionned
Declaration
[HandleProcessCorruptedStateExceptions]
public void OrientFromFace()
OrientNormalMap(uint)
WARNING: this function is tagged as 'EXPERIMENTAL'
Orient a tangent space normal map (all Z positive)
Declaration
[HandleProcessCorruptedStateExceptions]
public void OrientNormalMap(uint normalMap)
Parameters
Type | Name | Description |
---|---|---|
uint | normalMap | Normal map to orient |
OrientNormals(OccurrenceList)
Orient existing normal according to the polygons clockwise
Declaration
[HandleProcessCorruptedStateExceptions]
public void OrientNormals(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to orient normals |
OrientPolygonFaces(OccurrenceList, bool, bool, OrientStrategy)
Orient tessellation elements
Declaration
[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(OccurrenceList, double, double, int, InnerOuterOption, bool, OrientStrategyAdvanced)
Properly orient all polygons in the same direction, using voxel based view points placement.
Declaration
[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(OccurrenceList, Point3, Point3, Point3, int, double)
Properly orient all polygons in the same direction, using a specified viewpoint
Declaration
[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) |
ProxyMesh(OccurrenceList, double, ElementFilter, int, bool)
Replace the tessellations of the selected parts by a proxy mesh based on a voxelization
Declaration
[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
Type | Description |
---|---|
uint |
Quadify(OccurrenceList)
Merge all triangle polygons in the meshes to quadrangles
Declaration
[HandleProcessCorruptedStateExceptions]
public void Quadify(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
RemeshSurfacicHoles(OccurrenceList, double, bool, int, uint)
WARNING: this function is tagged as 'EXPERIMENTAL'
Resmesh surfacic holes of tessellations
Declaration
[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(OccurrenceList, double)
Remove some kinds of degenerated polygons
Declaration
[HandleProcessCorruptedStateExceptions]
public void RemoveDegeneratedPolygons(OccurrenceList occurrences, double tolerance)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
double | tolerance | Degenerated tolerance |
RemoveHoles(OccurrenceList, bool, bool, bool, double, uint)
Remove some features from tessellations
Declaration
[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 |
RemoveMultiplePolygon(OccurrenceList)
Remove multiple polygon
Declaration
[HandleProcessCorruptedStateExceptions]
public void RemoveMultiplePolygon(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair |
RemoveOccludedGeometries(OccurrenceList, SelectionLevel, int, int, double, bool, int, OccurrenceList, bool)
Delete part occurrences, patches or polygons not viewed from a sphere around the scene
Declaration
[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
Type | Description |
---|---|
BoolList |
RemoveOccludedGeometriesAdvanced(OccurrenceList, SelectionLevel, double, double, int, InnerOuterOption, bool, int, OccurrenceList)
Delete part occurrences, patches or polygons not seen from voxel based view points.
Declaration
[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
Type | Description |
---|---|
BoolList |
RemoveOccludedGeometriesFromPoints(OccurrenceList, SelectionLevel, Point3List, int, int, double, bool, int, OccurrenceList)
Delete part occurrences, patches or polygons not viewed from spheres generated with a set of camera position
Declaration
[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
Type | Description |
---|---|
BoolList |
RemoveOccludedGeometriesFromViewPoints(OccurrenceList, SelectionLevel, Point3List, Point3List, Point3List, int, double, bool, int, OccurrenceList)
Delete part occurrences, patches or polygons not viewed from a set of camera position/orientation
Declaration
[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
Type | Description |
---|---|
BoolList |
RemoveUV(OccurrenceList, int)
Remove one or all UV channel(s)
Declaration
[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) |
RemoveZFighting(OccurrenceList)
Remove Z-fighting (surfaces overlapping) by slightly shrinking the selected parts' surfaces
Declaration
[HandleProcessCorruptedStateExceptions]
public double RemoveZFighting(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to process |
Returns
Type | Description |
---|---|
double |
RepackUV(OccurrenceList, int, bool, int, uint, bool, int, bool)
Pack existing UV (create atlas)
Declaration
[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
Type | Description |
---|---|
OccurrenceList |
RepairCAD(OccurrenceList, double, bool)
Repair CAD shapes, assemble faces, remove duplicated faces, optimize loops and repair topology
Declaration
[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 |
RepairMesh(OccurrenceList, double, bool, bool)
Launch the repair process to repair a disconnected or not clean tessellation
Declaration
[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(OccurrenceList)
Create normal on an existing normal set when normal is null (polygons appears black)
Declaration
[HandleProcessCorruptedStateExceptions]
public void RepairNullNormals(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to repair null normals |
ReplaceBy(OccurrenceList, ReplaceByOption)
Replace geometries by other shapes, or primitives
Declaration
[HandleProcessCorruptedStateExceptions]
public void ReplaceBy(OccurrenceList occurrences, ReplaceByOption replaceBy)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
ReplaceByOption | replaceBy | Shape replacement option |
ReplaceByBox(OccurrenceList, ReplaceByBoxType)
Replace objects by a bounding box
Declaration
[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(OccurrenceList)
WARNING: this function is tagged as 'EXPERIMENTAL'
Replace objects by convex hull
Declaration
[HandleProcessCorruptedStateExceptions]
public void ReplaceByConvexHull(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
ReplaceByPrimitive(OccurrenceList, PrimitiveShapeParameters, bool)
Replace objects by a primitive shapes
Declaration
[HandleProcessCorruptedStateExceptions]
public void ReplaceByPrimitive(OccurrenceList occurrences, PrimitiveShapeParameters primitive, bool generateUV = true)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to replace |
PrimitiveShapeParameters | primitive | Primitive type and parameters |
bool | generateUV | Primitive type and parameters |
Requadify(OccurrenceList, bool)
Advanced function to requadify a triangle tessellation coming from full quad mesh
Declaration
[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 |
ResizeUVsToTextureSize(OccurrenceList, double, int)
Rescale the UV coordinates to fit the input texture size
Declaration
[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 |
Retopologize(OccurrenceList, int, bool, bool, double)
WARNING: this function is tagged as 'EXPERIMENTAL'
Replace the tessellations of the selected parts by a retopology of the external hull
Declaration
[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
Type | Description |
---|---|
uint |
SawWithAABB(OccurrenceList, AABB, SawingMode, string, string)
Saw the mesh with an axis-aligned bounding box. New parts will be placed as children of input part occurrences.
Declaration
[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(OccurrenceList, OBB, SawingMode, string, string)
Saw the mesh with an oriented bounding box. New parts will be placed as children of input part occurrences.
Declaration
[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(OccurrenceList, AABB, int, int, double)
Saw and split the mesh with an octree. New parts will be placed as children of input part occurrences.
Declaration
[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
Type | Description |
---|---|
uint |
SawWithPlane(OccurrenceList, Point3, Point3, SawingMode, string, string, double)
Saw the mesh with a plane. New parts will be placed as children of input part occurrences.
Declaration
[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 |
ScaleUV(OccurrenceList, double, double, int)
Apply a scale on texture coordinates
Declaration
[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 |
SegmentMesh(OccurrenceList, bool)
WARNING: this function is tagged as 'EXPERIMENTAL'
Segment Mesh into clusters guided by edge sharpnesses.
Declaration
[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 |
SeparateToManifold(OccurrenceList)
WARNING: this function is tagged as 'EXPERIMENTAL'
Remove non manifold edges and try to reconnect manifold groups of triangles
Declaration
[HandleProcessCorruptedStateExceptions]
public void SeparateToManifold(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
SetFeatureComponentMaxIndex(OccurrenceList, int)
Remap Index map of each FeatureComponent of selected occurrences
Declaration
[HandleProcessCorruptedStateExceptions]
public void SetFeatureComponentMaxIndex(OccurrenceList occurrences, int maxIndex)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | |
int | maxIndex |
SewBoundary(OccurrenceList, double)
Sew boundaries between them
Declaration
[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 |
SmoothMesh(OccurrenceList, CostEvaluation, int, bool)
Declaration
[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(OccurrenceList)
Declaration
[HandleProcessCorruptedStateExceptions]
public void SplitUVForAtlas(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Input occurrences |
SwapUvChannels(OccurrenceList, int, int)
Swap two UV channels
Declaration
[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 |
Sweep(OccurrenceList, double, int, bool, bool, bool)
WARNING: this function is tagged as 'EXPERIMENTAL'
Extrudes a circular section along an underlying polyline (curve)
Declaration
[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(OccurrenceList, double, double, double, bool, UVGenerationMode, int, double, bool, bool, bool, bool)
Create a tessellated representation from a CAD representation for each given part
Declaration
[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(OccurrenceList, int, bool, bool)
WARNING: this function is tagged as 'EXPERIMENTAL'
Tessellate point clouds to replace the geometry with a polygonal connect mesh
Declaration
[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(OccurrenceList, double, double, double, double, bool, UVGenerationMode, int, double, bool, bool, bool, bool)
Creates a tessellated representation from a CAD representation for each given part. It multiplies the length of the diagonal of the bounding box by the sagRatio. If the output value is above maxSag, then maxSag is used as tessellation value. Else if the output value is below maxSag, it is used as tessellation value.
Declaration
[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(uint, uint, int, int, double)
Transfer UV from a mesh to another mesh
Declaration
[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 |
TransferVisibilityToPolygonalWeight(OccurrenceList, VisibilityToWeightMode)
WARNING: this function is tagged as 'EXPERIMENTAL'
Set Polygonal Weight Attribute from Visibility Attribute
Declaration
[HandleProcessCorruptedStateExceptions]
public void TransferVisibilityToPolygonalWeight(OccurrenceList occurrences, VisibilityToWeightMode Mode)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
VisibilityToWeightMode | Mode | Mode used to compute visibility |
Triangularize(OccurrenceList)
Split all non-triangle polygons in the meshes to triangles
Declaration
[HandleProcessCorruptedStateExceptions]
public void Triangularize(OccurrenceList occurrences)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences of components to process |
UnwrapUV(OccurrenceList, UnwrapUVMethod, int, bool, int, double)
WARNING: this function is tagged as 'EXPERIMENTAL'
Unwrap UV islands
Declaration
[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 |
VertexOffset(OccurrenceList, double)
Move the vertices by the offsset along their normal
Declaration
[HandleProcessCorruptedStateExceptions]
public void VertexOffset(OccurrenceList occurrences, double offset = 1)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Occurrences to process |
double | offset | Displacement |
Voxelize(OccurrenceList, double, ElementFilter, int, bool)
Replace the tessellations of the selected parts by a voxelization of the external skin
Declaration
[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
Type | Description |
---|---|
uint |
VoxelizePointClouds(OccurrenceList, double)
Explode point clouds to voxels
Declaration
[HandleProcessCorruptedStateExceptions]
public void VoxelizePointClouds(OccurrenceList occurrences, double voxelSize = 500)
Parameters
Type | Name | Description |
---|---|---|
OccurrenceList | occurrences | Part occurrences to process |
double | voxelSize | Size of voxels |