Class SplitEdge

  extended by org.jcae.mesh.amibe.algos3d.AbstractAlgoHalfEdge
      extended by org.jcae.mesh.amibe.algos3d.SplitEdge

public class SplitEdge
extends AbstractAlgoHalfEdge

Split long edges. Edges are sorted and splitted in turn, the longest edge being processed first. Example: if a mesh has already been performed with a target size of discr, the following commands will split edges longer then discr/2

   SplitEdge split = new SplitEdge(m, 0.5*discr);
TODO: currently edges longer than sqrt(2)*discr/2 will be splitted When an interior edge is splitted, its midpoint is projected onto the surface by Vertex.discreteProject(Vertex); if this projection fails, this edge is not splitted. It is removed from the tree because there are few chances that this projection works later. This means in particular that an interior edge whose endpoints are both on boundaries cannot be splitted, because discrete projection cannot be performed on boundary nodes. As for now, boundary edges are always splitted, and the new point is in the middle of this edge. In all cases, the distance between the newly inserted point and apical vertices is computed; if it is too low, the edge is not splitted to avoid bad triangles. TODO: edges should be swapped too to improve triangle quality.

Field Summary
Fields inherited from class org.jcae.mesh.amibe.algos3d.AbstractAlgoHalfEdge
maxEdgeLength, mesh, noSwapAfterProcessing, notInTree, notProcessed, nrFinal, nrTriangles, processed, swapped, tolerance, tree
Constructor Summary
SplitEdge(Mesh m, java.util.Map<java.lang.String,java.lang.String> options)
          Creates a SplitEdge instance.
Method Summary
 boolean canProcessEdge(HalfEdge current)
 double cost(HalfEdge e)
static void main(java.lang.String[] args)
 void postProcessAllHalfEdges()
 void preProcessAllHalfEdges()
 HalfEdge processEdge(HalfEdge current, double costCurrent)
 java.util.logging.Logger thisLogger()
Methods inherited from class org.jcae.mesh.amibe.algos3d.AbstractAlgoHalfEdge
addToTree, appendDumpState, appendRestoreState, compute, countInnerTriangles, dumpState, postComputeTree, preProcessEdge, removeFromTree, restoreState, setProgressBarStatus, uniqueOrientation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SplitEdge(Mesh m,
                 java.util.Map<java.lang.String,java.lang.String> options)
Creates a SplitEdge instance.

m - the Mesh instance to refine.
options - map containing key-value pairs to modify algorithm behaviour. Valid keys are size and maxtriangles.
Method Detail


public java.util.logging.Logger thisLogger()
Specified by:
thisLogger in class AbstractAlgoHalfEdge


public void preProcessAllHalfEdges()
Specified by:
preProcessAllHalfEdges in class AbstractAlgoHalfEdge


public double cost(HalfEdge e)
Specified by:
cost in class AbstractAlgoHalfEdge


public boolean canProcessEdge(HalfEdge current)
Specified by:
canProcessEdge in class AbstractAlgoHalfEdge


public HalfEdge processEdge(HalfEdge current,
                            double costCurrent)
Specified by:
processEdge in class AbstractAlgoHalfEdge


public void postProcessAllHalfEdges()
Specified by:
postProcessAllHalfEdges in class AbstractAlgoHalfEdge


public static void main(java.lang.String[] args)
args - xmlDir, -t tolerance | -n triangle, brepFile, output