Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.
More...

#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 <br>
     deflection used   for the polygonalisation   of <br>
     each edge will be <defle> * Size of Edge. <br>
     the deflection used for the faces will be the maximum <br>
     deflection of their edges. <br>


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.
More...

 
void Perform (const TopoDS_Shape &shape)
 Build triangulation on the whole shape
More...
 
void Add (const TopoDS_Face &face, const TopTools_IndexedDataMapOfShapeListOfShape &ancestor)
 Record a face for further processing.
More...
 
void Process (const TopoDS_Face &face) const
 Triangulate a face previously recorded for
processing by call to Add(). Can be executed in
parallel threads.
More...
 
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).
More...
 
Standard_Boolean IsParallel () const
 Returns the multi-threading usage flag.
More...
 
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.
More...
 
void RemoveAllMutexes ()
 Removes all created mutexes
More...
 
Standard_Integer NbTriangles () const
 Gives the number of built triangles.
More...
 
const BRepMesh_TriangleTriangle (const Standard_Integer Index) const
 Gives the triangle of <Index>.
More...
 
Standard_Integer NbEdges () const
 Gives the number of built Edges
More...
 
const BRepMesh_EdgeEdge (const Standard_Integer Index) const
 Gives the edge of index <Index>.
More...
 
Standard_Integer NbVertices () const
 Gives the number of built Vertices.
More...
 
const BRepMesh_VertexVertex (const Standard_Integer Index) const
 Gives the vertex of <Index>.
More...
 
const gp_PntPnt (const Standard_Integer Index) const
 Gives the location3d of the vertex of <Index>.
More...
 
void VerticesOfDomain (BRepMesh_MapOfInteger &Indices) const
 Gives the list of indices of the vertices
More...
 
void EdgesOfDomain (BRepMesh_MapOfInteger &Indices) const
 Gives the list of indices of the edges
More...
 
void TrianglesOfDomain (BRepMesh_MapOfInteger &Indices) const
 Gives the list of indices of the triangles
More...
 
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.
More...
 
const gp_PntPoint3d (const Standard_Integer Index) const
 Gives the 3d space location of the vertex <Index>.
More...
 
Standard_Real GetDeflection () const
 returns the deflection value.
More...
 
Standard_Real GetAngle () const
 returns the deflection value.
More...
 
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.
More...
 
void RemoveFaceAttribute (const TopoDS_Face &face)
 remove face attribute as useless to free locate memory
More...
 
const TopTools_DataMapOfShapeRealGetMapOfDefEdge () const
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

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
More...
 
static void BoxMaxDimension (const Bnd_Box &box, Standard_Real &maxdim)
 Returns the maximal dimension of Bnd_Box
More...
 

Detailed Description

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

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 
)

 if the  boolean    <relative>   is  True,    the <br>
     deflection used   for the polygonalisation   of <br>
     each edge will be <defle> * Size of Edge. <br>
     the deflection used for the faces will be the maximum <br>
     deflection of their edges. <br>


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.

Member Function Documentation

void BRepMesh_FastDiscret::Add ( const TopoDS_Face face,
const TopTools_IndexedDataMapOfShapeListOfShape ancestor 
)

Record a face for further processing.

static void BRepMesh_FastDiscret::BoxMaxDimension ( const Bnd_Box box,
Standard_Real maxdim 
)
static

Returns the maximal dimension of Bnd_Box

void BRepMesh_FastDiscret::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.

BRepMesh_Status BRepMesh_FastDiscret::CurrentFaceStatus ( ) const
const BRepMesh_Edge& BRepMesh_FastDiscret::Edge ( const Standard_Integer  Index) const

Gives the edge of index <Index>.

void BRepMesh_FastDiscret::EdgesOfDomain ( BRepMesh_MapOfInteger Indices) const

Gives the list of indices of the edges

Standard_Real BRepMesh_FastDiscret::GetAngle ( ) const

returns the deflection value.

Standard_Real BRepMesh_FastDiscret::GetDeflection ( ) const

returns the deflection value.

Standard_Boolean BRepMesh_FastDiscret::GetFaceAttribute ( const TopoDS_Face face,
Handle< BRepMesh_FaceAttribute > &  fattrib 
) const

returns the face deflection value.

const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge ( ) const
Standard_Boolean BRepMesh_FastDiscret::InShape ( ) const
Standard_Boolean BRepMesh_FastDiscret::IsParallel ( ) const

Returns the multi-threading usage flag.

Standard_Integer BRepMesh_FastDiscret::NbEdges ( ) const

Gives the number of built Edges

Standard_Integer BRepMesh_FastDiscret::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.

Standard_Integer BRepMesh_FastDiscret::NbTriangles ( ) const

Gives the number of built triangles.

Standard_Integer BRepMesh_FastDiscret::NbVertices ( ) const

Gives the number of built Vertices.

void BRepMesh_FastDiscret::operator() ( const TopoDS_Face face) const
inline
void BRepMesh_FastDiscret::Perform ( const TopoDS_Shape shape)

Build triangulation on the whole shape

const gp_Pnt& BRepMesh_FastDiscret::Pnt ( const Standard_Integer  Index) const

Gives the location3d of the vertex of <Index>.

const gp_Pnt& BRepMesh_FastDiscret::Point3d ( const Standard_Integer  Index) const

Gives the 3d space location of the vertex <Index>.

void BRepMesh_FastDiscret::Process ( const TopoDS_Face face) const

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

static Standard_Real BRepMesh_FastDiscret::RelativeEdgeDeflection ( const TopoDS_Edge edge,
const Standard_Real  defle,
const Standard_Real  dtotale,
Standard_Real cdef 
)
static

Returns computed relative deflection for edge

void BRepMesh_FastDiscret::RemoveAllMutexes ( )

Removes all created mutexes

void BRepMesh_FastDiscret::RemoveFaceAttribute ( const TopoDS_Face face)

remove face attribute as useless to free locate memory

void BRepMesh_FastDiscret::SetParallel ( const Standard_Boolean  theInParallel)

Request algorithm to launch in multiple threads
to improve performance (should be supported by plugin).

Standard_Boolean BRepMesh_FastDiscret::ShapeTrigu ( ) const
const BRepMesh_Triangle& BRepMesh_FastDiscret::Triangle ( const Standard_Integer  Index) const

Gives the triangle of <Index>.

void BRepMesh_FastDiscret::TrianglesOfDomain ( BRepMesh_MapOfInteger Indices) const

Gives the list of indices of the triangles

const BRepMesh_Vertex& BRepMesh_FastDiscret::Vertex ( const Standard_Integer  Index) const

Gives the vertex of <Index>.

void BRepMesh_FastDiscret::VerticesOfDomain ( BRepMesh_MapOfInteger Indices) const

Gives the list of indices of the vertices

Standard_Boolean BRepMesh_FastDiscret::WithShare ( ) const

The documentation for this class was generated from the following file: