Class ConstraintNormal3D

  extended by org.jcae.mesh.amibe.algos2d.ConstraintNormal3D

public class ConstraintNormal3D
extends java.lang.Object

Swap edges if the normals to its adjacent triangles are too different from the normal computed by the CAD engine. Triangles in the 2D parameter space must not be inverted, otherwise some methods do not work any more. But even in this case, if the surface parametrization has large variations over a triangle, triangles may be inverted in the 3D space. The current algorithm is quite naive. It works well, so we did not try to find a better alternative.

For each non-boundary edge, we first check that this edge can be swapped without inverting triangles in 2D space. The normal to the surface at the middle of the edge is computed by the CAD engine. Inner products between this vector and triangle normals are computed, the quelity of this edge is the minimum of the two values. The same computations are performed on swapped triangles, and if the quality is improved, this edge is indeed swapped.

Constructor Summary
ConstraintNormal3D(Mesh2D m)
          Creates a ConstraintNormal3D instance.
Method Summary
 void compute()
          Check all edges.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ConstraintNormal3D(Mesh2D m)
Creates a ConstraintNormal3D instance.

m - the ConstraintNormal3D instance to check.
Method Detail


public void compute()
Check all edges.