Open CASCADE Technology 6.6.0
Public Member Functions | Static Public Member Functions
BRepMesh_FastDiscret Class Reference

Algorithm to mesh a shape with respect of the
frontier the deflection and by option the shared
components.

#include <BRepMesh_FastDiscret.hxx>

Inheritance diagram for BRepMesh_FastDiscret:
Inheritance graph
[legend]

Public Member Functions

 BRepMesh_FastDiscret (const Standard_Real defle, const Standard_Real angle, const Bnd_Box &B, const Standard_Boolean withShare=Standard_True, const Standard_Boolean inshape=Standard_False, const Standard_Boolean relative=Standard_False, const Standard_Boolean shapetrigu=Standard_False)
 BRepMesh_FastDiscret (const Standard_Real defle, const TopoDS_Shape &shape, const Bnd_Box &B, const Standard_Real angle, const Standard_Boolean withShare=Standard_True, const Standard_Boolean inshape=Standard_False, const Standard_Boolean relative=Standard_False, const Standard_Boolean shapetrigu=Standard_False)
 if the boolean <relative> is True, the
deflection used for the polygonalisation of
each edge will be <defle> * Size of Edge.
the deflection used for the faces will be the maximum
deflection of their edges.

if <shapetrigu> is True, the triangulation, if exists
with a correct deflection, can be used to re-triangulate
the shape.

if <inshape> is True, the calculated
triangulation will be stored in the shape.

void Perform (const TopoDS_Shape &shape)
 Build triangulation on the whole shape

void Add (const TopoDS_Face &face, const TopTools_IndexedDataMapOfShapeListOfShape &ancestor)
 Record a face for further processing.

void Process (const TopoDS_Face &face) const
 Triangulate a face previously recorded for
processing by call to Add(). Can be executed in
parallel threads.

void operator() (const TopoDS_Face &face) const
BRepMesh_Status CurrentFaceStatus () const
void SetParallel (const Standard_Boolean theInParallel)
 Request algorithm to launch in multiple threads
to improve performance (should be supported by plugin).

Standard_Boolean IsParallel () const
 Returns the multi-threading usage flag.

void CreateMutexesForSubShapes (const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theType)
 Creates mutexes for each sub-shape of type theType in theShape.
Used to avoid data races.

void RemoveAllMutexes ()
 Removes all created mutexes

Standard_Integer NbTriangles () const
 Gives the number of built triangles.

const BRepMesh_TriangleTriangle (const Standard_Integer Index) const
 Gives the triangle of <Index>.

Standard_Integer NbEdges () const
 Gives the number of built Edges

const BRepMesh_EdgeEdge (const Standard_Integer Index) const
 Gives the edge of index <Index>.

Standard_Integer NbVertices () const
 Gives the number of built Vertices.

const BRepMesh_VertexVertex (const Standard_Integer Index) const
 Gives the vertex of <Index>.

const gp_PntPnt (const Standard_Integer Index) const
 Gives the location3d of the vertex of <Index>.

void VerticesOfDomain (BRepMesh_MapOfInteger &Indices) const
 Gives the list of indices of the vertices

void EdgesOfDomain (BRepMesh_MapOfInteger &Indices) const
 Gives the list of indices of the edges

void TrianglesOfDomain (BRepMesh_MapOfInteger &Indices) const
 Gives the list of indices of the triangles

Standard_Integer NbPoint3d () const
 Gives the number of different location in 3d
space. It is different of the number of
vertices if there is more than one surface.
Even for one surface, the number can be different
if an edge is shared.

const gp_PntPoint3d (const Standard_Integer Index) const
 Gives the 3d space location of the vertex <Index>.

Standard_Real GetDeflection () const
 returns the deflection value.

Standard_Real GetAngle () const
 returns the deflection value.

Standard_Boolean WithShare () const
Standard_Boolean InShape () const
Standard_Boolean ShapeTrigu () const
Standard_Boolean GetFaceAttribute (const TopoDS_Face &face, Handle< BRepMesh_FaceAttribute > &fattrib) const
 returns the face deflection value.

void RemoveFaceAttribute (const TopoDS_Face &face)
 remove face attribute as useless to free locate memory

const TopTools_DataMapOfShapeRealGetMapOfDefEdge () const

Static Public Member Functions

static Standard_Real RelativeEdgeDeflection (const TopoDS_Edge &edge, const Standard_Real defle, const Standard_Real dtotale, Standard_Real &cdef)
 Returns computed relative deflection for edge

static void BoxMaxDimension (const Bnd_Box &box, Standard_Real &maxdim)
 Returns the maximal dimension of Bnd_Box


Constructor & Destructor Documentation

BRepMesh_FastDiscret::BRepMesh_FastDiscret ( const Standard_Real  defle,
const Standard_Real  angle,
const Bnd_Box B,
const Standard_Boolean  withShare = Standard_True,
const Standard_Boolean  inshape = Standard_False,
const Standard_Boolean  relative = Standard_False,
const Standard_Boolean  shapetrigu = Standard_False 
)
BRepMesh_FastDiscret::BRepMesh_FastDiscret ( const Standard_Real  defle,
const TopoDS_Shape shape,
const Bnd_Box B,
const Standard_Real  angle,
const Standard_Boolean  withShare = Standard_True,
const Standard_Boolean  inshape = Standard_False,
const Standard_Boolean  relative = Standard_False,
const Standard_Boolean  shapetrigu = Standard_False 
)

Member Function Documentation

void BRepMesh_FastDiscret::Add ( const TopoDS_Face face,
const TopTools_IndexedDataMapOfShapeListOfShape ancestor 
)
static void BRepMesh_FastDiscret::BoxMaxDimension ( const Bnd_Box box,
Standard_Real maxdim 
) [static]
void BRepMesh_FastDiscret::CreateMutexesForSubShapes ( const TopoDS_Shape theShape,
const TopAbs_ShapeEnum  theType 
)
BRepMesh_Status BRepMesh_FastDiscret::CurrentFaceStatus ( ) const
const BRepMesh_Edge& BRepMesh_FastDiscret::Edge ( const Standard_Integer  Index) const
void BRepMesh_FastDiscret::EdgesOfDomain ( BRepMesh_MapOfInteger Indices) const
Standard_Real BRepMesh_FastDiscret::GetAngle ( ) const
Standard_Real BRepMesh_FastDiscret::GetDeflection ( ) const
Standard_Boolean BRepMesh_FastDiscret::GetFaceAttribute ( const TopoDS_Face face,
Handle< BRepMesh_FaceAttribute > &  fattrib 
) const
const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge ( ) const
Standard_Boolean BRepMesh_FastDiscret::InShape ( ) const
Standard_Boolean BRepMesh_FastDiscret::IsParallel ( ) const
Standard_Integer BRepMesh_FastDiscret::NbEdges ( ) const
Standard_Integer BRepMesh_FastDiscret::NbPoint3d ( ) const
Standard_Integer BRepMesh_FastDiscret::NbTriangles ( ) const
Standard_Integer BRepMesh_FastDiscret::NbVertices ( ) const
void BRepMesh_FastDiscret::operator() ( const TopoDS_Face face) const [inline]
void BRepMesh_FastDiscret::Perform ( const TopoDS_Shape shape)
const gp_Pnt& BRepMesh_FastDiscret::Pnt ( const Standard_Integer  Index) const
const gp_Pnt& BRepMesh_FastDiscret::Point3d ( const Standard_Integer  Index) const
void BRepMesh_FastDiscret::Process ( const TopoDS_Face face) const
static Standard_Real BRepMesh_FastDiscret::RelativeEdgeDeflection ( const TopoDS_Edge edge,
const Standard_Real  defle,
const Standard_Real  dtotale,
Standard_Real cdef 
) [static]
void BRepMesh_FastDiscret::RemoveAllMutexes ( )
void BRepMesh_FastDiscret::RemoveFaceAttribute ( const TopoDS_Face face)
void BRepMesh_FastDiscret::SetParallel ( const Standard_Boolean  theInParallel)
Standard_Boolean BRepMesh_FastDiscret::ShapeTrigu ( ) const
const BRepMesh_Triangle& BRepMesh_FastDiscret::Triangle ( const Standard_Integer  Index) const
void BRepMesh_FastDiscret::TrianglesOfDomain ( BRepMesh_MapOfInteger Indices) const
const BRepMesh_Vertex& BRepMesh_FastDiscret::Vertex ( const Standard_Integer  Index) const
void BRepMesh_FastDiscret::VerticesOfDomain ( BRepMesh_MapOfInteger Indices) const
Standard_Boolean BRepMesh_FastDiscret::WithShare ( ) const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines