org.jcae.mesh.bora.ds
Class BCADGraphCell

java.lang.Object
  extended by org.jcae.mesh.bora.ds.BCADGraphCell

public class BCADGraphCell
extends java.lang.Object

Graph cell. This class is a decorator for the CAD graph.


Constructor Summary
BCADGraphCell(BCADGraph g, CADShape s, CADShapeEnum t)
          Constructor.
 
Method Summary
 void addImplicitConstraints(CADShapeEnum cse, boolean recursive)
           
 void addParent(BCADGraphCell that)
           
 void addSubMeshConstraint(BSubMesh sub, Constraint cons)
           
 java.util.Iterator<BCADGraphCell> allShapesExplorer(CADShapeEnum cse)
          Returns an iterator on all geometrical elements of a given type.
 java.util.Iterator<BCADGraphCell> allShapesIterator()
          Returns an iterator on all immediate sub-shapes.
 void bindReversed(BCADGraphCell that)
          Binds two cells containing reversed shapes together.
 java.util.Iterator<BDiscretization> discretizationIterator()
          Returns an iterator on BDiscretization instances bound to this cell.
 BDiscretization getDiscretizationSubMesh(BSubMesh sub)
          Returns the BDiscretization instance corresponding to a given submesh.
 BCADGraph getGraph()
          Returns CAD graph.
 int getId()
          Returns cell id.
 int getOrientation()
          Returns shape orientation.
 java.util.Collection<BCADGraphCell> getParents()
           
 BCADGraphCell getReversed()
          Returns cell containing reversed shape.
 CADShape getShape()
          Returns CAD shape.
 CADShapeEnum getType()
          Returns CAD shape type.
 void setId(int i)
          Sets cell id.
 java.util.Iterator<BCADGraphCell> shapesExplorer(CADShapeEnum cse)
          Returns an iterator on geometrical elements of a given type.
 java.util.Iterator<BCADGraphCell> shapesIterator()
          Returns an iterator on immediate sub-shapes.
 java.lang.String toString()
           
 java.util.Iterator<BCADGraphCell> uniqueShapesExplorer(CADShapeEnum cse)
          Returns an iterator on unique geometrical elements.
 java.util.Iterator<BCADGraphCell> uniqueShapesIterator()
          Returns an iterator on immediate sub-shapes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BCADGraphCell

public BCADGraphCell(BCADGraph g,
                     CADShape s,
                     CADShapeEnum t)
Constructor.

Parameters:
g - graph cell
s - CAD shape contained in this cell
t - CAD shape type
Method Detail

getId

public int getId()
Returns cell id.

Returns:
cell id

setId

public void setId(int i)
Sets cell id.

Parameters:
i - cell id

getGraph

public BCADGraph getGraph()
Returns CAD graph.

Returns:
CAD graph

getShape

public CADShape getShape()
Returns CAD shape.

Returns:
CAD shape

getOrientation

public int getOrientation()
Returns shape orientation.

Returns:
shape orientation

getReversed

public BCADGraphCell getReversed()
Returns cell containing reversed shape.

Returns:
cell containing reversed shape

getType

public CADShapeEnum getType()
Returns CAD shape type.

Returns:
CAD shape type

getParents

public java.util.Collection<BCADGraphCell> getParents()

addParent

public void addParent(BCADGraphCell that)

bindReversed

public void bindReversed(BCADGraphCell that)
Binds two cells containing reversed shapes together. These shapes then contain the same discretizations.


shapesExplorer

public java.util.Iterator<BCADGraphCell> shapesExplorer(CADShapeEnum cse)
Returns an iterator on geometrical elements of a given type. CAD graph is traversed recursively and geometrical elements of a given type are returned. There are no duplicates, but shapes with different orientations may both be listed.

Parameters:
cse - CAD shape type
Returns:
iterator on geometrical elements.

uniqueShapesExplorer

public java.util.Iterator<BCADGraphCell> uniqueShapesExplorer(CADShapeEnum cse)
Returns an iterator on unique geometrical elements. CAD graph is traversed recursively and geometrical elements of a given type are returned. There are no duplicates, shapes with different orientations are listed only once.

Parameters:
cse - CAD shape type
Returns:
iterator on unique geometrical elements.

allShapesExplorer

public java.util.Iterator<BCADGraphCell> allShapesExplorer(CADShapeEnum cse)
Returns an iterator on all geometrical elements of a given type. CAD graph is traversed recursively and geometrical elements of a given type are returned, even if they have already been seen.

Parameters:
cse - CAD shape type
Returns:
iterator on all geometrical elements.

shapesIterator

public java.util.Iterator<BCADGraphCell> shapesIterator()
Returns an iterator on immediate sub-shapes. There are no duplicates, but shapes with different orientations may both be listed.

Returns:
an iterator on immediate sub-shapes

uniqueShapesIterator

public java.util.Iterator<BCADGraphCell> uniqueShapesIterator()
Returns an iterator on immediate sub-shapes. There are no duplicates, shapes with different orientations are listed only once.

Returns:
an iterator on immediate sub-shapes

allShapesIterator

public java.util.Iterator<BCADGraphCell> allShapesIterator()
Returns an iterator on all immediate sub-shapes.

Returns:
an iterator on all immediate sub-shapes

getDiscretizationSubMesh

public BDiscretization getDiscretizationSubMesh(BSubMesh sub)
Returns the BDiscretization instance corresponding to a given submesh.

Parameters:
sub - submesh
Returns:
the discretization corresponding to a given submesh.

addSubMeshConstraint

public void addSubMeshConstraint(BSubMesh sub,
                                 Constraint cons)

discretizationIterator

public java.util.Iterator<BDiscretization> discretizationIterator()
Returns an iterator on BDiscretization instances bound to this cell.


addImplicitConstraints

public void addImplicitConstraints(CADShapeEnum cse,
                                   boolean recursive)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object