Class SymmetryVisitorRobustMesh
java.lang.Object
cz.fidentis.analyst.engines.symmetry.SymmetryVisitor
cz.fidentis.analyst.engines.symmetry.impl.SymmetryVisitorRobust
cz.fidentis.analyst.engines.symmetry.impl.SymmetryVisitorRobustMesh
- All Implemented Interfaces:
MeshVisitor
A robust implementation of symmetry plane estimation for manifold triangle meshes.
The code is based on the
... paper.
This extension uses the similarity of Gaussian curvature values (the static weight)
and the symmetry of normal vectors (the dynamic weight) in the computation,
along with Wendland’s similarity function. The computation is a bit slower
in general (depends on parameters set, of course) that the super-class,
but the weights should help the algorithm to better deal with damaged faces,
i.e., when only a small fragment of a face is available.
Although the pruning of candidate planes and the measurement of their quality
is similar to the SymmetryVisitorMesh
implementation, this code
is much slower with similar quality of results :-( Probably the price for
robustness (need to be further researched).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A helper class that copies input mesh point and moves them so that the given centroid is in the space origin. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Two points whose Euclidean distance or curvature difference is less than this value are considered the same and skipped from generating candidate planes -
Constructor Summary
ConstructorsConstructorDescriptionSymmetryVisitorRobustMesh
(PointSamplingConfig samplingStrategy1, PointSamplingConfig samplingStrategy2) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected Set
<CandidatePlaneRobust> generateCandidates
(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid) Copies mesh samples, moves them to the space origin, and then computes candidate planes.protected void
measureSymmetry
(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid, Set<CandidatePlaneRobust> candidates) Copies mesh samples, moves them to the space origin, and then measures the quality of candidate planes.void
visitMeshFacet
(MeshFacet facet) The inspection method to be implemented by specific visitors.Methods inherited from class cz.fidentis.analyst.engines.symmetry.impl.SymmetryVisitorRobust
calculateSymmetryPlane, dispose, getSymmetryPlane
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.data.mesh.MeshVisitor
isThreadSafe
-
Field Details
-
EQUALS_EPS
public static final double EQUALS_EPSTwo points whose Euclidean distance or curvature difference is less than this value are considered the same and skipped from generating candidate planes- See Also:
-
-
Constructor Details
-
SymmetryVisitorRobustMesh
public SymmetryVisitorRobustMesh(PointSamplingConfig samplingStrategy1, PointSamplingConfig samplingStrategy2) Constructor.- Parameters:
samplingStrategy1
- Downsampling strategy for finding candidate planes. Must not benull
UseNoSumpling
strategy to avoid downsampling.samplingStrategy2
- Downsampling strategy for finding the best candidate. Must not benull
UseNoSumpling
strategy to avoid downsampling.
-
-
Method Details
-
visitMeshFacet
Description copied from interface:MeshVisitor
The inspection method to be implemented by specific visitors.- Specified by:
visitMeshFacet
in interfaceMeshVisitor
- Overrides:
visitMeshFacet
in classSymmetryVisitorRobust
- Parameters:
facet
- Mesh facet to be visited.
-
generateCandidates
protected Set<CandidatePlaneRobust> generateCandidates(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid) Copies mesh samples, moves them to the space origin, and then computes candidate planes. This implementation uses curvature and normal vectors to prune candidates.- Overrides:
generateCandidates
in classSymmetryVisitorRobust
- Parameters:
meshSamples
- Downsampled meshcentroid
- Centroid of the downsampled mesh- Returns:
- Candidate planes
-
measureSymmetry
protected void measureSymmetry(List<MeshPoint> meshSamples, javax.vecmath.Point3d centroid, Set<CandidatePlaneRobust> candidates) Copies mesh samples, moves them to the space origin, and then measures the quality of candidate planes. The results are stored in the candidate planes.- Overrides:
measureSymmetry
in classSymmetryVisitorRobust
- Parameters:
meshSamples
- Downsampled meshcentroid
- Centroid of the downsampled meshcandidates
- Candidate planes
-