Classes | |
| class | NoiseSettings |
| class | AffineXf3f |
| class | BitSet |
| class | FaceBitSet |
| class | VertBitSet |
| class | EdgeBitSet |
| class | UndirectedEdgeBitSet |
| class | Box3f |
| class | Box3i |
| class | DistanceFromWeightedPointsParams |
| class | Color |
| class | CutMeshResult |
| class | CutMeshParameters |
| Parameters of MR::cutMesh. More... | |
| class | CutByProjectionSettings |
| Settings structurer for cutMeshByProjection function. More... | |
| class | FaceFace |
| a pair of faces More... | |
| class | SubdivideFillingSettings |
| class | SmoothFillingSettings |
| class | FillHoleNicelySettings |
| class | SelfIntersectionsSettings |
| Setting set for mesh self-intersections fix. More... | |
| class | SelfIntersections |
| class | FloatGrid |
| wrapper class that helps mrbind to avoid excess MRVDBFloatGrid.h includes More... | |
| class | FreeFormDeformer |
| Class for deforming mesh using Bernstein interpolation. More... | |
| class | ICPProperties |
| parameters of ICP algorithm More... | |
| class | ICP |
| class | Laplacian |
| class | SphereParams |
| class | Matrix3f |
| class | Mesh |
| class | BooleanResult |
| Structure contain boolean result. More... | |
| class | BooleanResultMapper |
| Structure to map old mesh BitSets to new. More... | |
| class | MeshBuilder |
| Building topologies by triangles. More... | |
| class | CollidingTriangleBitsets |
| class | VarEdgeTri |
| class | PreciseCollisionResult |
| class | ComponentsMapResult |
| class | LargeByAreaRegionsResult |
| class | MeshComponents |
| class | DecimateResult |
| Results of MR::decimateMesh. More... | |
| class | DecimateSettings |
| Parameters structure for MR::decimateMesh. More... | |
| class | RemeshSettings |
| class | FillHoleParams |
| Parameters structure for MR::fillHole Structure has some options to control MR::fillHole. More... | |
| class | StitchHolesParams |
| Parameters structure for MR::stitchHoles Structure has some options to control MR::stitchHoles. More... | |
| class | FixMeshDegeneraciesParams |
| class | MeshLoad |
| class | MeshDistanceResult |
| class | MeshMeshSignedDistanceResult |
| class | MeshOrPoints |
| class | MeshOrPointsXf |
| an object and its transformation to global space with other objects More... | |
| class | MeshProjectionResult |
| class | SignedMeshProjectionResult |
| class | MeshRelaxParams |
| class | MeshSave |
| class | SubdivideSettings |
| class | MeshTopology |
| class | MeshTriPoint |
| class | MultiwayICPSamplingParameters |
| Parameters that are used for sampling of the MultiwayICP objects. More... | |
| class | MultiwayICP |
| class | DenoiseViaNormalsSettings |
| class | BaseShellParameters |
| class | OffsetParameters |
| class | SharpOffsetParameters |
| class | GeneralOffsetParameters |
| allows the user to select in the parameters which offset algorithm to call More... | |
| class | PointCloud |
| class | TriangulationParameters |
| Parameters of point cloud triangulation. More... | |
| class | PointOnFace |
| a point located on some mesh's face More... | |
| class | PointsLoad |
| class | PointsSave |
| class | PointsToMeshParameters |
| class | MeshProjectionParameters |
| class | UniformSamplingSettings |
| class | GridMinMax |
| class | MeshToVolumeParams |
| class | GridToMeshSettings |
| parameters of OpenVDB Grid to Mesh conversion using Dual Marching Cubes algorithm More... | |
| class | VdbVolume |
| class | VertCoords |
| class | VertScalars |
| class | Triangulation |
| class | FaceNormals |
| class | VertMap |
| class | FaceMap |
| class | Face2RegionMap |
| class | VertColors |
| class | Vector3f |
| class | Vector3i |
| class | Vector3 |
| class | VoxelsLoad |
| class | VoxelsSave |
| class | WeightedShellParametersBase |
| class | WeightedShellParametersMetric |
| class | WeightedShell |
Functions | |
| FloatGrid | resampled (FloatGrid grid, number voxelScale) |
| resample this grid to fit voxelScale | |
| FloatGrid | resampled (FloatGrid grid, number scaleX, number scaleY, number scaleZ) |
| resample this grid to fit voxelScale | |
| FloatGrid | cropped (FloatGrid grid, Box3i box) |
| returns cropped grid | |
| void | addNoise (Mesh mesh, NoiseSettings settings) |
| Uint32Array | cutMeshByProjection (Mesh mesh, readonly Float32Array contours, CutByProjectionSettings settings) |
| Performs orthographic projection with of given contours to mesh and cut result lines, fails if any point of contours has missed mesh on projection stage or cut contours contains self-intersections. | |
| Mesh | makeConvexHullFromMesh (Mesh mesh) |
| Mesh | makeCube () |
| Mesh | makeCylinderAdvanced (number radius0, number radius1, number start_angle, number arc_size, number length, number resolution) |
| FaceBitSet | fillHoleNicely (Mesh mesh, number holeEdge, FillHoleNicelySettings settings) |
| Mesh | makeSphere (SphereParams params) |
| creates a mesh of sphere with irregular triangulation | |
| Mesh | makeUVSphere (number radius, number horisontalResolution, number verticalResolution) |
| creates a mesh of sphere with regular triangulation (parallels and meridians) | |
| BooleanResult | boolean (Mesh meshA, Mesh meshB, BooleanOperation operation) |
| Performs CSG operation on two meshes. | |
| BooleanResult | boolean (Mesh meshA, Mesh meshB, BooleanOperation operation, BooleanResultMapper mapper) |
| Performs CSG operation on two meshes. | |
| boolean | isInside (Mesh a, Mesh b) |
| checks that arbitrary mesh part A is inside of closed mesh part B | |
| FaceFace | findCollidingTriangles (Mesh a, Mesh b) |
| finds all pairs of colliding triangles from two meshes or two mesh regions | |
| FaceFace | findCollidingTriangles (Mesh a, Mesh b, boolean firstIntersectionOnly) |
| finds all pairs of colliding triangles from two meshes or two mesh regions | |
| CollidingTriangleBitsets | findCollidingTriangleBitsets (Mesh a, Mesh b) |
| the same as findCollidingTriangles, but returns one bite set per mesh with colliding triangles | |
| FaceFace | findSelfCollidingTriangles (Mesh mp) |
| finds all pairs (or the fact of any self-collision) of colliding triangles from one mesh or a region | |
| FaceBitSet | findSelfCollidingTrianglesBS (Mesh mp) |
| the same findSelfCollidingTriangles but returns the union of all self-intersecting faces | |
| DecimateResult | decimateMesh (Mesh mesh, DecimateSettings settings) |
| Performs mesh simplification in mesh region according to the settings. | |
| boolean | remesh (Mesh mesh, RemeshSettings settings) |
| Splits too long and eliminates too short edges from the mesh. | |
| void | makeDegenerateBandAroundRegion (Mesh mesh, FaceBitSet region) |
| Create a band of degenerate faces along the border of the specified region and the rest of the mesh. | |
| void | fillHole (Mesh mesh, number a, FillHoleParams params) |
| Fills hole in mesh | |
| void | fillHoles (Mesh mesh, readonly number as, FillHoleParams params) |
| fill all holes given by their representative edges in | |
| void | stitchHoles (Mesh mesh, number a, number b, StitchHolesParams params) |
| Stitches two holes in Mesh | |
| void | fixMeshDegeneracies (Mesh mesh, FixMeshDegeneraciesParams params) |
| Fixes degenerate faces and short edges in mesh (changes topology) | |
| void | fixMultipleEdges (Mesh mesh) |
| resolves given multiple edges, but splitting all but one edge in each group | |
| FaceBitSet | findDegenerateFaces (Mesh mp, number criticalAspectRatio) |
| finds faces having aspect ratio >= criticalAspectRatio | |
| UndirectedEdgeBitSet | findShortEdges (Mesh mp, number criticalLength) |
| finds edges having length <= criticalLength | |
| FaceBitSet | findHoleComplicatingFaces (Mesh mesh) |
| adds in complicatingFaces the faces not from the wedge with largest angle of faces connected by edges incident to given vertex | |
| MeshDistanceResult | findDistance (Mesh a, Mesh b) |
| computes minimal distance between two meshes or two mesh regions | |
| MeshMeshSignedDistanceResult | findSignedDistanceFromMesh (Mesh a, Mesh b) |
| FillHoleMetric | getCircumscribedMetric (Mesh mesh) |
| FillHoleMetric | getPlaneFillMetric (Mesh mesh, number e) |
| FillHoleMetric | getPlaneNormalizedFillMetric (Mesh mesh, number e) |
| FillHoleMetric | getComplexFillMetric (Mesh mesh, number e) |
| FillHoleMetric | getEdgeLengthFillMetric (Mesh mesh) |
| FillHoleMetric | getUniversalMetric (Mesh mesh) |
| FillHoleMetric | getMinAreaMetric (Mesh mesh) |
| number | calcCombinedFillMetric (Mesh mesh, FaceBitSet filledRegion, FillHoleMetric metric) |
| Computes combined metric after filling a hole. | |
| boolean | relax (Mesh mesh, MeshRelaxParams params) |
| boolean | relaxKeepVolume (Mesh mesh, MeshRelaxParams params) |
| number | subdivideMesh (Mesh mesh, SubdivideSettings settings) |
| FaceBitSet | expandFaces (MeshTopology topology, FaceBitSet region) |
| FaceBitSet | shrinkFaces (MeshTopology topology, FaceBitSet region) |
| FaceBitSet | getBoundaryFaces (MeshTopology topology, FaceBitSet region) |
| returns faces from given region that have at least one neighbor face with shared edge not from the region | |
| VertBitSet | expandVerts (MeshTopology topology, VertBitSet region, number hops) |
| VertBitSet | shrinkVerts (MeshTopology topology, VertBitSet region, number hops) |
| ContinuousContours | orderIntersectionContours (MeshTopology topologyA, MeshTopology topologyB, PreciseCollisionResult intersections) |
| void | meshDenoiseViaNormals (Mesh mesh) |
| void | meshDenoiseViaNormals (Mesh mesh, DenoiseViaNormalsSettings settings) |
| number | suggestVoxelSize (Mesh mp, number approxNumVoxels) |
| computes size of a cubical voxel to get approximately given number of voxels during rasterization | |
| Mesh | offsetMesh (Mesh mp, number offset, OffsetParameters params) |
| Mesh | doubleOffsetMesh (Mesh mp, number offsetA, number offsetB, OffsetParameters params) |
| Mesh | mcOffsetMesh (Mesh mp, number offset, OffsetParameters params) |
| Mesh | mcShellMeshRegion (Mesh mesh, FaceBitSet region, number offset, BaseShellParameters params) |
| Mesh | sharpOffsetMesh (Mesh mp, number offset, SharpOffsetParameters params) |
| Mesh | generalOffsetMesh (Mesh mp, number offset, GeneralOffsetParameters params) |
| Mesh | thickenMesh (Mesh mesh, number offset, GeneralOffsetParameters params) |
| mapping between original mesh and thicken result | |
| CutMeshResult | cutMesh (Mesh mesh, OneMeshContours contours, CutMeshParameters params) |
| Cuts mesh by given contours. | |
| Mesh | makeConvexHullFromPoints (PointCloud pointCloud) |
| PointCloud | meshToPointCloud (Mesh mesh, boolean saveNormals) |
| number | findAvgPointsRadius (PointCloud pointCloud, number avgPoints) |
| Finds the radius of ball, so on average that ball contained avgPoints excluding the central point. | |
| number | findAvgPointsRadius (PointCloud pointCloud, number avgPoints, number samples) |
| Finds the radius of ball, so on average that ball contained avgPoints excluding the central point. | |
| Mesh | triangulatePointCloud (PointCloud pointCloud, TriangulationParameters params) |
| Creates mesh from given point cloud according params Returns empty optional if was interrupted by progress bar. | |
| Mesh | pointsToMeshFusion (PointCloud cloud, PointsToMeshParameters params) |
| Float32Array | findSignedDistances (Mesh refMesh, Mesh mesh, MeshProjectionParameters params) |
| if projector is not given then CPU's computations will be used | |
| CoordinateConverters | getVectorConverters (Mesh a, Mesh b) |
| creates simple converters from Vector3f to Vector3i and back in mesh parts area range | |
| PreciseCollisionResult | findCollidingEdgeTrisPrecise (Mesh a, Mesh b, CoordinateConverters conv) |
| finds all pairs of colliding edges from one mesh and triangle from another mesh | |
| OneMeshContours | getOneMeshIntersectionContours (Mesh meshA, Mesh meshB, ContinuousContours contours, boolean getMeshAIntersections, CoordinateConverters converters) |
| if true, then open self-intersection contours will be prolonged to terminal vertices | |
| VertBitSet | getIncidentVertsFromFaces (MeshTopology topology, FaceBitSet faces) |
| VertBitSet | getIncidentVertsFromEdges (MeshTopology topology, UndirectedEdgeBitSet edges) |
| FaceBitSet | getIncidentFacesFromVerts (MeshTopology topology, VertBitSet verts) |
| FaceBitSet | getIncidentFacesFromEdges (MeshTopology topology, UndirectedEdgeBitSet edges) |
| UndirectedEdgeBitSet | getIncidentEdgesFromFaces (MeshTopology topology, FaceBitSet faces) |
| UndirectedEdgeBitSet | getIncidentEdgesFromEdges (MeshTopology topology, UndirectedEdgeBitSet edges) |
| VertBitSet | getInnerVertsFromFaces (MeshTopology topology, FaceBitSet region) |
| VertBitSet | getInnerVertsFromEdges (MeshTopology topology, UndirectedEdgeBitSet edges) |
| FaceBitSet | getInnerFaces (MeshTopology topology, VertBitSet verts) |
| composes the set of all faces with all their vertices in given set | |
| UndirectedEdgeBitSet | getInnerEdgesFromVerts (MeshTopology topology, VertBitSet verts) |
| UndirectedEdgeBitSet | getInnerEdgesFromFaces (MeshTopology topology, FaceBitSet region) |
| VertBitSet | getBoundaryVerts (MeshTopology topology, FaceBitSet region) |
| composes the set of all boundary vertices for given region (or whole mesh if !region) | |
| Uint32Array | trackRightBoundaryLoop (MeshTopology topology, number e0) |
| Uint32Array | findRightBoundary (MeshTopology topology) |
| Mesh | makeTorus () |
| Mesh | makeTorus (number primaryRadius) |
| Mesh | makeTorus (number primaryRadius, number secondaryRadius) |
| Mesh | makeTorus (number primaryRadius, number secondaryRadius, number primaryResolution) |
| Mesh | makeTorus (number primaryRadius, number secondaryRadius, number primaryResolution, number secondaryResolution) |
| Mesh | makeTorusWithSelfIntersections (number primaryRadius, number secondaryRadius, number primaryResolution, number secondaryResolution) |
| VertBitSet | pointUniformSampling (PointCloud pointCloud, UniformSamplingSettings settings) |
| GridMinMax | evalGridMinMax (FloatGrid grid) |
| Mesh | gridToMesh (FloatGrid grid, GridToMeshSettings settings) |
| converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm | |
| VdbVolume | meshToVolume (Mesh mp, MeshToVolumeParams params) |
| VdbVolume | meshToDistanceVdbVolume (Mesh mp, MeshToVolumeParams params) |
| VdbVolume | floatGridToVdbVolume (FloatGrid grid) |
| VertCoords | computePerVertNormals (Mesh mesh) |
| returns a vector with vertex normals in every element for valid mesh vertices | |
| FaceNormals | computePerFaceNormals (Mesh mesh) |
| returns a vector with face-normal in every element for valid mesh faces | |
| Mesh | makeCube (Vector3f size) |
| Mesh | makeCube (Vector3f size, Vector3f base) |
| MeshProjectionResult | findProjection (Vector3f pt, Mesh mp) |
| computes the closest point on mesh (or its region) to given point | |
| SignedMeshProjectionResult | findSignedDistanceFromPoint (Vector3f pt, Mesh mp) |
| number | getValue (FloatGrid grid, Vector3i p) |
| returns the value at given voxel | |
| void | setValue (FloatGrid grid, Vector3i p, number value) |
| enum BooleanMapObject |
| enum BooleanOperation |
| enum CascadeMode |
| enum DecimateStrategy |
| enum EdgeWeights |
determines the weight of each edge in applications like Laplacian
| Enumerator | |
|---|---|
| Unit | |
| Cotan | |
| enum FillPart |
| enum ForceFill |
This enum defines the MR::cutMesh behaviour in case of bad faces acure basicaly MR::cutMesh removes all faces which contours pass through, adds new edges to topology and fills all removed parts
| Enumerator | |
|---|---|
| None | |
| Good | |
| All | |
| enum ICPExitType |
| enum ICPMethod |
| enum ICPMode |
| enum MeshToVolumeType |
If Strong makes additional efforts to avoid creating multiple edges, in some rare cases it is not possible (cases with extremely bad topology), if you faced one try to use MR::duplicateMultiHoleVertices before MR::fillHole
If Simple avoid creating edges that already exist in topology (default)
If None do not avoid multiple edges
| Enumerator | |
|---|---|
| None | |
| Simple | |
| Strong | |
| enum OffsetMode |
| enum RememberShape |
| enum SignDetectionMode |
| enum VertexMass |
determines the weight or mass of each vertex in applications like Laplacian
| Enumerator | |
|---|---|
| Unit | |
| NeiArea | |
| void addNoise | ( | Mesh | mesh, |
| NoiseSettings | settings ) |
| BooleanResult boolean | ( | Mesh | meshA, |
| Mesh | meshB, | ||
| BooleanOperation | operation ) |
Performs CSG operation on two meshes.
Makes new mesh - result of boolean operation on mesh A and mesh B
| meshA | Input mesh A |
| meshB | Input mesh B |
| operation | CSG operation to perform |
| rigidB2A | Transform from mesh B space to mesh A space |
| mapper | Optional output structure to map mesh A and mesh B topology to result mesh topology |
| BooleanResult boolean | ( | Mesh | meshA, |
| Mesh | meshB, | ||
| BooleanOperation | operation, | ||
| BooleanResultMapper | mapper ) |
Performs CSG operation on two meshes.
Makes new mesh - result of boolean operation on mesh A and mesh B
| meshA | Input mesh A |
| meshB | Input mesh B |
| operation | CSG operation to perform |
| rigidB2A | Transform from mesh B space to mesh A space |
| mapper | Optional output structure to map mesh A and mesh B topology to result mesh topology |
| number calcCombinedFillMetric | ( | Mesh | mesh, |
| FaceBitSet | filledRegion, | ||
| FillHoleMetric | metric ) |
Computes combined metric after filling a hole.
| FaceNormals computePerFaceNormals | ( | Mesh | mesh | ) |
returns a vector with face-normal in every element for valid mesh faces
| VertCoords computePerVertNormals | ( | Mesh | mesh | ) |
returns a vector with vertex normals in every element for valid mesh vertices
| CutMeshResult cutMesh | ( | Mesh | mesh, |
| OneMeshContours | contours, | ||
| CutMeshParameters | params ) |
Cuts mesh by given contours.
This function cuts mesh making new edges paths on place of input contours
| mesh | Input mesh that will be cut |
| contours | Input contours to cut mesh with, find more MR::OneMeshContours |
| params | Parameters describing some cut options, find more MR::CutMeshParameters |
| Uint32Array cutMeshByProjection | ( | Mesh | mesh, |
| readonly Float32Array | contours, | ||
| CutByProjectionSettings | settings ) |
Performs orthographic projection with of given contours to mesh and cut result lines, fails if any point of contours has missed mesh on projection stage or cut contours contains self-intersections.
| mesh | for cutting, it will be changed |
| contours | for projection onto mesh |
| settings | to specify direction and contours to mesh space transformation |
| DecimateResult decimateMesh | ( | Mesh | mesh, |
| DecimateSettings | settings ) |
Performs mesh simplification in mesh region according to the settings.
| Mesh doubleOffsetMesh | ( | Mesh | mp, |
| number | offsetA, | ||
| number | offsetB, | ||
| OffsetParameters | params ) |
Offsets mesh by converting it to voxels and back two times only closed meshes allowed (only Offset mode) typically offsetA and offsetB have distinct signs
| GridMinMax evalGridMinMax | ( | FloatGrid | grid | ) |
| FaceBitSet expandFaces | ( | MeshTopology | topology, |
| FaceBitSet | region ) |
returns given region with all faces sharing an edge with a region face;
| stopEdges | - neighborhood via this edges will be ignored |
| VertBitSet expandVerts | ( | MeshTopology | topology, |
| VertBitSet | region, | ||
| number | hops ) |
| void fillHole | ( | Mesh | mesh, |
| number | a, | ||
| FillHoleParams | params ) |
Fills hole in mesh
Fills given hole represented by one of its edges (having no valid left face), uses fillHoleTrivially if cannot fill hole without multiple edges, default metric: CircumscribedFillMetric
Next picture show, how newly generated faces can be smoothed MR::positionVertsSmoothly MR::subdivideMesh
| mesh | mesh with hole |
| a | EdgeId which represents hole (should not have valid left FaceId) |
| params | parameters of hole filling |
| FaceBitSet fillHoleNicely | ( | Mesh | mesh, |
| number | holeEdge, | ||
| FillHoleNicelySettings | settings ) |
fills a hole in mesh specified by one of its edge, optionally subdivides new patch on smaller triangles, optionally make smooth connection with existing triangles outside the hole
| void fillHoles | ( | Mesh | mesh, |
| readonly number | as, | ||
| FillHoleParams | params ) |
fill all holes given by their representative edges in
| as |
| number findAvgPointsRadius | ( | PointCloud | pointCloud, |
| number | avgPoints ) |
Finds the radius of ball, so on average that ball contained avgPoints excluding the central point.
| samples | the number of test points to find given number of samples in each |
| number findAvgPointsRadius | ( | PointCloud | pointCloud, |
| number | avgPoints, | ||
| number | samples ) |
Finds the radius of ball, so on average that ball contained avgPoints excluding the central point.
| samples | the number of test points to find given number of samples in each |
| PreciseCollisionResult findCollidingEdgeTrisPrecise | ( | Mesh | a, |
| Mesh | b, | ||
| CoordinateConverters | conv ) |
finds all pairs of colliding edges from one mesh and triangle from another mesh
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation |
| anyIntersection | if true then the function returns as fast as it finds any intersection |
| CollidingTriangleBitsets findCollidingTriangleBitsets | ( | Mesh | a, |
| Mesh | b ) |
the same as findCollidingTriangles, but returns one bite set per mesh with colliding triangles
finds all pairs of colliding triangles from two meshes or two mesh regions
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation |
| firstIntersectionOnly | if true then the function returns at most one pair of intersecting triangles and returns faster |
finds all pairs of colliding triangles from two meshes or two mesh regions
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation |
| firstIntersectionOnly | if true then the function returns at most one pair of intersecting triangles and returns faster |
| FaceBitSet findDegenerateFaces | ( | Mesh | mp, |
| number | criticalAspectRatio ) |
finds faces having aspect ratio >= criticalAspectRatio
| MeshDistanceResult findDistance | ( | Mesh | a, |
| Mesh | b ) |
computes minimal distance between two meshes or two mesh regions
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation |
| upDistLimitSq | upper limit on the distance in question, if the real distance is larger then the function exists returning upDistLimitSq and no valid points |
| FaceBitSet findHoleComplicatingFaces | ( | Mesh | mesh | ) |
adds in complicatingFaces the faces not from the wedge with largest angle of faces connected by edges incident to given vertex
| MeshProjectionResult findProjection | ( | Vector3f | pt, |
| Mesh | mp ) |
computes the closest point on mesh (or its region) to given point
| upDistLimitSq | upper limit on the distance in question, if the real distance is larger then the function exits returning upDistLimitSq and no valid point |
| xf | mesh-to-point transformation, if not specified then identity transformation is assumed |
| loDistLimitSq | low limit on the distance in question, if a point is found within this distance then it is immediately returned without searching for a closer one |
| validFaces | if provided then only faces from there will be considered as projections |
| validProjections | if provided then only projections passed this test can be returned |
| Uint32Array findRightBoundary | ( | MeshTopology | topology | ) |
returns all region boundary loops; every loop has region faces on the right, and not-region faces or holes on the left
finds all pairs (or the fact of any self-collision) of colliding triangles from one mesh or a region
if true then treat touching faces as self-intersections too
| FaceBitSet findSelfCollidingTrianglesBS | ( | Mesh | mp | ) |
the same findSelfCollidingTriangles but returns the union of all self-intersecting faces
if true then treat touching faces as self-intersections too
| UndirectedEdgeBitSet findShortEdges | ( | Mesh | mp, |
| number | criticalLength ) |
finds edges having length <= criticalLength
| MeshMeshSignedDistanceResult findSignedDistanceFromMesh | ( | Mesh | a, |
| Mesh | b ) |
| SignedMeshProjectionResult findSignedDistanceFromPoint | ( | Vector3f | pt, |
| Mesh | mp ) |
| Float32Array findSignedDistances | ( | Mesh | refMesh, |
| Mesh | mesh, | ||
| MeshProjectionParameters | params ) |
if projector is not given then CPU's computations will be used
Computes signed distances from given test points to the closest point on the reference mesh: positive value - outside reference mesh, negative - inside reference mesh; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh
| void fixMeshDegeneracies | ( | Mesh | mesh, |
| FixMeshDegeneraciesParams | params ) |
Fixes degenerate faces and short edges in mesh (changes topology)
| void fixMultipleEdges | ( | Mesh | mesh | ) |
resolves given multiple edges, but splitting all but one edge in each group
| Mesh generalOffsetMesh | ( | Mesh | mp, |
| number | offset, | ||
| GeneralOffsetParameters | params ) |
Offsets mesh by converting it to voxels and back using one of three modes specified in the parameters
| FaceBitSet getBoundaryFaces | ( | MeshTopology | topology, |
| FaceBitSet | region ) |
returns faces from given region that have at least one neighbor face with shared edge not from the region
| VertBitSet getBoundaryVerts | ( | MeshTopology | topology, |
| FaceBitSet | region ) |
composes the set of all boundary vertices for given region (or whole mesh if !region)
| FillHoleMetric getCircumscribedMetric | ( | Mesh | mesh | ) |
This metric minimizes the sum of circumcircle radii for all triangles in the triangulation. It is rather fast to calculate, and it results in typically good triangulations. It is measured in length units.
| FillHoleMetric getComplexFillMetric | ( | Mesh | mesh, |
| number | e ) |
This metric minimizes the sum of triangleMetric for all triangles in the triangulation plus the sum edgeMetric for all edges inside and on the boundary of the triangulation. Where triangleMetric is proportional to weighted triangle area and triangle aspect ratio edgeMetric grows with angle between triangles as ( ( 1 - cos( x ) ) / ( 1 + cos( x ) ) ) ^ 4. It is unitless.
| FillHoleMetric getEdgeLengthFillMetric | ( | Mesh | mesh | ) |
Simple metric minimizing the sum of all edge lengths It is measured in length units.
| UndirectedEdgeBitSet getIncidentEdgesFromEdges | ( | MeshTopology | topology, |
| UndirectedEdgeBitSet | edges ) |
| UndirectedEdgeBitSet getIncidentEdgesFromFaces | ( | MeshTopology | topology, |
| FaceBitSet | faces ) |
| FaceBitSet getIncidentFacesFromEdges | ( | MeshTopology | topology, |
| UndirectedEdgeBitSet | edges ) |
| FaceBitSet getIncidentFacesFromVerts | ( | MeshTopology | topology, |
| VertBitSet | verts ) |
| VertBitSet getIncidentVertsFromEdges | ( | MeshTopology | topology, |
| UndirectedEdgeBitSet | edges ) |
| VertBitSet getIncidentVertsFromFaces | ( | MeshTopology | topology, |
| FaceBitSet | faces ) |
| UndirectedEdgeBitSet getInnerEdgesFromFaces | ( | MeshTopology | topology, |
| FaceBitSet | region ) |
| UndirectedEdgeBitSet getInnerEdgesFromVerts | ( | MeshTopology | topology, |
| VertBitSet | verts ) |
| FaceBitSet getInnerFaces | ( | MeshTopology | topology, |
| VertBitSet | verts ) |
composes the set of all faces with all their vertices in given set
| VertBitSet getInnerVertsFromEdges | ( | MeshTopology | topology, |
| UndirectedEdgeBitSet | edges ) |
| VertBitSet getInnerVertsFromFaces | ( | MeshTopology | topology, |
| FaceBitSet | region ) |
| FillHoleMetric getMinAreaMetric | ( | Mesh | mesh | ) |
This metric is for triangulation construction with minimal summed area of triangles. It is measured in squared length units. Warning: this metric can produce degenerated triangles
| OneMeshContours getOneMeshIntersectionContours | ( | Mesh | meshA, |
| Mesh | meshB, | ||
| ContinuousContours | contours, | ||
| boolean | getMeshAIntersections, | ||
| CoordinateConverters | converters ) |
if true, then open self-intersection contours will be prolonged to terminal vertices
Converts contours given in topological terms as the intersections of one mesh's edge and another mesh's triangle (ContinuousContours), into contours of meshA and/or meshB given as a sequence of (primitiveId and Cartesian coordinates); converters are required for better precision in case of degenerations; note that contours should not have intersections
| FillHoleMetric getPlaneFillMetric | ( | Mesh | mesh, |
| number | e ) |
Same as getCircumscribedFillMetric, but with extra penalty for the triangles having normals looking in the opposite side of plane containing left of (e). It is measured in length units.
| FillHoleMetric getPlaneNormalizedFillMetric | ( | Mesh | mesh, |
| number | e ) |
Similar to getPlaneFillMetric with extra penalty for the triangles having normals looking in the opposite side of plane containing left of (e), but the metric minimizes the sum of circumcircle radius times aspect ratio for all triangles in the triangulation. It is measured in length units.
| FillHoleMetric getUniversalMetric | ( | Mesh | mesh | ) |
This metric consists of two parts 1) for each triangle: it is the circumcircle diameter, this avoids the appearance of degenerate triangles; 2) for each edge: square root of double total area of triangles to its left and right times the factor depending extensionally on absolute dihedral angle between left and right triangles, this makes visually triangulated surface as smooth as possible. It is measured in length units. For planar holes it is the same as getCircumscribedMetric.
| Mesh gridToMesh | ( | FloatGrid | grid, |
| GridToMeshSettings | settings ) |
converts OpenVDB Grid into mesh using Dual Marching Cubes algorithm
checks that arbitrary mesh part A is inside of closed mesh part B
| rigidB2A | rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation |
| Mesh makeConvexHullFromPoints | ( | PointCloud | pointCloud | ) |
| Mesh makeCube | ( | ) |
creates box mesh with given min-corner (base) and given size in every dimension; with default parameters, creates unit cube mesh with the centroid in (0,0,0)
creates box mesh with given min-corner (base) and given size in every dimension; with default parameters, creates unit cube mesh with the centroid in (0,0,0)
creates box mesh with given min-corner (base) and given size in every dimension; with default parameters, creates unit cube mesh with the centroid in (0,0,0)
| Mesh makeCylinderAdvanced | ( | number | radius0, |
| number | radius1, | ||
| number | start_angle, | ||
| number | arc_size, | ||
| number | length, | ||
| number | resolution ) |
| void makeDegenerateBandAroundRegion | ( | Mesh | mesh, |
| FaceBitSet | region ) |
Create a band of degenerate faces along the border of the specified region and the rest of the mesh.
The function is useful for extruding the region without changing the existing faces and creating holes
| mesh | - the target mesh |
| region | - the region required to be separated by a band of degenerate faces |
| params | - optional output parameters |
| Mesh makeSphere | ( | SphereParams | params | ) |
creates a mesh of sphere with irregular triangulation
| Mesh makeTorus | ( | ) |
| Mesh makeTorus | ( | number | primaryRadius | ) |
| Mesh makeTorus | ( | number | primaryRadius, |
| number | secondaryRadius ) |
| Mesh makeTorus | ( | number | primaryRadius, |
| number | secondaryRadius, | ||
| number | primaryResolution ) |
| Mesh makeTorus | ( | number | primaryRadius, |
| number | secondaryRadius, | ||
| number | primaryResolution, | ||
| number | secondaryResolution ) |
| Mesh makeTorusWithSelfIntersections | ( | number | primaryRadius, |
| number | secondaryRadius, | ||
| number | primaryResolution, | ||
| number | secondaryResolution ) |
| Mesh makeUVSphere | ( | number | radius, |
| number | horisontalResolution, | ||
| number | verticalResolution ) |
creates a mesh of sphere with regular triangulation (parallels and meridians)
| Mesh mcOffsetMesh | ( | Mesh | mp, |
| number | offset, | ||
| OffsetParameters | params ) |
Offsets mesh by converting it to distance field in voxels (using OpenVDB library if SignDetectionMode::OpenVDB or our implementation otherwise) and back using standard Marching Cubes, as opposed to Dual Marching Cubes in offsetMesh(...)
| Mesh mcShellMeshRegion | ( | Mesh | mesh, |
| FaceBitSet | region, | ||
| number | offset, | ||
| BaseShellParameters | params ) |
Constructs a shell around selected mesh region with the properties that every point on the shall must
| void meshDenoiseViaNormals | ( | Mesh | mesh | ) |
Reduces noise in given mesh, see the article "Mesh Denoising via a Novel Mumford-Shah Framework"
| void meshDenoiseViaNormals | ( | Mesh | mesh, |
| DenoiseViaNormalsSettings | settings ) |
Reduces noise in given mesh, see the article "Mesh Denoising via a Novel Mumford-Shah Framework"
| VdbVolume meshToDistanceVdbVolume | ( | Mesh | mp, |
| MeshToVolumeParams | params ) |
converts mesh (or its part) into a volume filled with signed or unsigned distances to mesh using OpenVDB library; for signed distances the mesh must be closed; *params.outXf is untouched
| PointCloud meshToPointCloud | ( | Mesh | mesh, |
| boolean | saveNormals ) |
Mesh to PointCloud
| VdbVolume meshToVolume | ( | Mesh | mp, |
| MeshToVolumeParams | params ) |
converts mesh (or its part) into a volume filled with signed or unsigned distances to mesh using OpenVDB library; for signed distances the mesh must be closed; prior to conversion, world space is shifted to ensure that the bounding box of offset mesh is in positive quarter-space, and the shift is written in *params.outXf
| Mesh offsetMesh | ( | Mesh | mp, |
| number | offset, | ||
| OffsetParameters | params ) |
Offsets mesh by converting it to distance field in voxels using OpenVDB library, signDetectionMode = Unsigned(from OpenVDB) | OpenVDB | HoleWindingRule, and then converts back using OpenVDB library (dual marching cubes), so result mesh is always closed
| ContinuousContours orderIntersectionContours | ( | MeshTopology | topologyA, |
| MeshTopology | topologyB, | ||
| PreciseCollisionResult | intersections ) |
Combines unordered input intersections (and flips orientation of intersected edges from mesh B) into ordered oriented contours with the properties:
| Mesh pointsToMeshFusion | ( | PointCloud | cloud, |
| PointsToMeshParameters | params ) |
makes mesh from points with normals by constructing intermediate volume with signed distances and then using marching cubes algorithm to extract the surface from there
| VertBitSet pointUniformSampling | ( | PointCloud | pointCloud, |
| UniformSamplingSettings | settings ) |
Sample vertices, removing ones that are too close; returns std::nullopt if it was terminated by the callback
| boolean relax | ( | Mesh | mesh, |
| MeshRelaxParams | params ) |
applies given number of relaxation iterations to the whole mesh ( or some region if it is specified )
| boolean relaxKeepVolume | ( | Mesh | mesh, |
| MeshRelaxParams | params ) |
applies given number of relaxation iterations to the whole mesh ( or some region if it is specified ) do not really keeps volume but tries hard
| boolean remesh | ( | Mesh | mesh, |
| RemeshSettings | settings ) |
Splits too long and eliminates too short edges from the mesh.
resample this grid to fit voxelScale
sets given region voxels value
| Mesh sharpOffsetMesh | ( | Mesh | mp, |
| number | offset, | ||
| SharpOffsetParameters | params ) |
Offsets mesh by converting it to voxels and back post process result using reference mesh to sharpen features
| FaceBitSet shrinkFaces | ( | MeshTopology | topology, |
| FaceBitSet | region ) |
returns given region without all faces sharing an edge with not-region face;
| stopEdges | - neighborhood via this edges will be ignored |
| VertBitSet shrinkVerts | ( | MeshTopology | topology, |
| VertBitSet | region, | ||
| number | hops ) |
| void stitchHoles | ( | Mesh | mesh, |
| number | a, | ||
| number | b, | ||
| StitchHolesParams | params ) |
Stitches two holes in Mesh
Build cylindrical patch to fill space between two holes represented by one of their edges each, default metric: ComplexStitchMetric
Next picture show, how newly generated faces can be smoothed MR::positionVertsSmoothly MR::subdivideMesh
| mesh | mesh with hole |
| a | EdgeId which represents 1st hole (should not have valid left FaceId) |
| b | EdgeId which represents 2nd hole (should not have valid left FaceId) |
| params | parameters of holes stitching |
| number subdivideMesh | ( | Mesh | mesh, |
| SubdivideSettings | settings ) |
splits edges in mesh region according to the settings;
| number suggestVoxelSize | ( | Mesh | mp, |
| number | approxNumVoxels ) |
computes size of a cubical voxel to get approximately given number of voxels during rasterization
| Mesh thickenMesh | ( | Mesh | mesh, |
| number | offset, | ||
| GeneralOffsetParameters | params ) |
mapping between original mesh and thicken result
in case of positive offset, returns the mesh consisting of offset mesh merged with inversed original mesh (thickening mode); in case of negative offset, returns the mesh consisting of inversed offset mesh merged with original mesh (hollowing mode); if your input mesh is open then please specify params.signDetectionMode = SignDetectionMode::Unsigned, and you will get open mesh (with several components) on output if your input mesh is closed then please specify another sign detection mode, and you will get closed mesh (with several components) on output;
| Uint32Array trackRightBoundaryLoop | ( | MeshTopology | topology, |
| number | e0 ) |
returns closed loop of region boundary starting from given region boundary edge (region faces on the right, and not-region faces or holes on the left); if more than two boundary edges connect in one vertex, then the function makes the most abrupt turn to left
| Mesh triangulatePointCloud | ( | PointCloud | pointCloud, |
| TriangulationParameters | params ) |
Creates mesh from given point cloud according params Returns empty optional if was interrupted by progress bar.