OCC Main Page | ModelingAlgorithms | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingAlgorithms
TKMesh
BRepMesh


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>


Public Member Functions

Standard_EXPORT 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)
Standard_EXPORT 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.

Standard_EXPORT void Add (const TopoDS_Shape &shape)
Standard_EXPORT void Add (const TopoDS_Face &face)
Standard_BooleanInternalVerticesMode ()
 Returns mode defining if internal vertices on faces
are taken into consideration or not. If this mode is equal to true
that internal vertices on faces are considered during triangulation.
Default value is equal to false (old behaviour).
.
Standard_EXPORT BRepMesh_Status CurrentFaceStatus () const
Standard_EXPORT Standard_Boolean Update (const TopoDS_Edge &Edge, const TopoDS_Face &Face, const Handle(Geom2d_Curve)&C, const Standard_Real defedge, const Standard_Real first, const Standard_Real last)
Standard_EXPORT Standard_Real Control (const Handle(BRepAdaptor_HSurface)&caro, const Standard_Real defface, BRepMesh_ListOfVertex &inter, TColStd_ListOfInteger &badTri, TColStd_ListOfInteger &nulTri, BRepMesh_Delaun &trigu, const Standard_Boolean isfirst)
Standard_EXPORT Standard_Integer Uindex (const MeshShape_SurfacePoint &P) const
Standard_EXPORT Standard_Integer Vindex (const MeshShape_SurfacePoint &P) const
Standard_EXPORT void Append (MeshShape_ListOfSurfacePoint &pntsOnSurf, const MeshShape_SurfacePoint &P)
Standard_EXPORT gp_XY FindUV (const TopoDS_Vertex &V, const gp_Pnt2d &XY, const Standard_Integer ip, const Handle(BRepAdaptor_HSurface)&S, const Standard_Real mindist)
Standard_EXPORT Standard_Integer NbDomains () const
 Gives the number of domains. For each domain
there is a different TopFace.
.
Standard_EXPORT const TopoDS_Face & DomainFace (const Standard_Integer Index) const
 Gives the TopFace of the domain <index>.
.
Standard_EXPORT Standard_Integer NbTriangles () const
 Gives the number of built triangles.
.
Standard_EXPORT const BRepMesh_TriangleTriangle (const Standard_Integer Index) const
 Gives the triangle of <index>.
.
Standard_EXPORT Standard_Integer NbEdges () const
 Gives the number of built Edges
.
Standard_EXPORT const BRepMesh_EdgeEdge (const Standard_Integer Index) const
 Gives the edge of index <index>.
.
Standard_EXPORT Standard_Integer NbVertices () const
 Gives the number of built Vertices.
.
Standard_EXPORT const BRepMesh_VertexVertex (const Standard_Integer Index) const
 Gives the vertex of <index>.
.
Standard_EXPORT const gp_Pnt & Pnt (const Standard_Integer Index) const
 Gives the location3d of the vertex of <index>.
.
Standard_EXPORT void VerticesOfDomain (const Standard_Integer Index, MeshDS_MapOfInteger &Indices) const
 Gives the list of indices of the vertices of the
domain <index>.
.
Standard_EXPORT void EdgesOfDomain (const Standard_Integer Index, MeshDS_MapOfInteger &Indices) const
 Gives the list of indices of the edges of the
domain <index>.
.
Standard_EXPORT void TrianglesOfDomain (const Standard_Integer Index, MeshDS_MapOfInteger &Indices) const
 Gives the list of indices of the triangles
of the domain <index>.
.
Standard_EXPORT 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.
.
Standard_EXPORT const gp_Pnt & Point3d (const Standard_Integer Index) const
 Gives the 3d space location of the vertex <index>.
.
Standard_EXPORT void Normal (const Standard_Integer Index, gp_Pnt &Pon, gp_Dir &Nor) const
 Gives the normale of the vertex of <index> on
his face.

This function create at each call the surface.
To optimize the systematic computing you can use
the folowing loop :

Surface mySurface(DomainFace(theDomain));
loop-On-Vertices-Of-theDomain {
GeomTool::Normal(mySurface, u, v, Pnt, Dir);
}

WARNING : The vertex from wich the <u> and <v> are
used is on <thedomain>.

.
Standard_EXPORT Handle_BRepMesh_DataStructureOfDelaun Result () const
 Gives the data structure of the mesh.
.
Standard_EXPORT Standard_Real GetDeflection () const
 returns the deflection value.

Standard_EXPORT Standard_Real GetAngle () const
 returns the deflection value.

Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Member Functions

Standard_EXPORT void Add (const TopoDS_Edge &edge, const TopoDS_Face &face, const Handle(BRepAdaptor_HSurface)&S, const Handle(Geom2d_Curve)&C, const Standard_Real defedge, const Standard_Real first, const Standard_Real last)
Standard_EXPORT void Add (const TopoDS_Vertex &theVert, const TopoDS_Face &face, const Handle(BRepAdaptor_HSurface)&S)
Standard_EXPORT void InternalVerticesForRectangle (const Handle(BRepAdaptor_HSurface)&caro, BRepMesh_ListOfVertex &inter, const TColStd_ListOfReal &u1pars, const TColStd_ListOfReal &u2pars, const TColStd_ListOfReal &v1pars, const TColStd_ListOfReal &v2pars)
Standard_EXPORT void InternalVertices (const Handle(BRepAdaptor_HSurface)&caro, BRepMesh_ListOfVertex &inter, const Standard_Real defedge, const BRepMesh_Classifier &classifier)
Standard_EXPORT void AddInShape (const TopoDS_Face &face, const Standard_Real defedge)

Private Attributes

MeshShape_DataMapOfIntegerXY myrealuv
Standard_Real angle
Standard_Real deflection
Standard_Real mydtotale
Standard_Boolean WithShare
BRepMesh_DataMapOfVertexInteger vertices
MeshShape_DataMapOfShapeListOfTransient edges
MeshShape_DataMapOfShapeListOfTransient internaledges
Standard_Integer nbDomains
BRepMesh_DataMapOfIntegerFace Domains
Standard_Integer nbLocat
MeshShape_DataMapOfIntegerPnt Location3d
Handle_BRepMesh_DataStructureOfDelaun structure
BRepMesh_ListOfVertex mylistver
TColStd_IndexedMapOfInteger myvemap
BRepMesh_DataMapOfIntegerListOfXY mylocation2d
MeshShape_MapOfCouple mymap
Standard_Real myumin
Standard_Real myumax
Standard_Real myvmin
Standard_Real myvmax
Standard_Boolean myrelative
Standard_Boolean myshapetrigu
Standard_Boolean myinshape
Standard_Boolean myInternalVerticesMode
Standard_Real deltaX
Standard_Real deltaY
TColStd_IndexedMapOfReal myUParam
TColStd_IndexedMapOfReal myVParam
BRepMesh_Status myfacestate
BRepMesh_DataMapOfShapeReal mapdefle
TopTools_ListOfShape mynottriangulated
MeshDS_BaseAllocator myAllocator


Constructor & Destructor Documentation

Standard_EXPORT 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
 

Standard_EXPORT 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

Standard_EXPORT void BRepMesh_FastDiscret::Add const TopoDS_Vertex &  theVert,
const TopoDS_Face &  face,
const Handle(BRepAdaptor_HSurface)&  S
[private]
 

Standard_EXPORT void BRepMesh_FastDiscret::Add const TopoDS_Edge &  edge,
const TopoDS_Face &  face,
const Handle(BRepAdaptor_HSurface)&  S,
const Handle(Geom2d_Curve)&  C,
const Standard_Real  defedge,
const Standard_Real  first,
const Standard_Real  last
[private]
 

Standard_EXPORT void BRepMesh_FastDiscret::Add const TopoDS_Face &  face  ) 
 

Standard_EXPORT void BRepMesh_FastDiscret::Add const TopoDS_Shape &  shape  ) 
 

Standard_EXPORT void BRepMesh_FastDiscret::AddInShape const TopoDS_Face &  face,
const Standard_Real  defedge
[private]
 

Standard_EXPORT void BRepMesh_FastDiscret::Append MeshShape_ListOfSurfacePoint pntsOnSurf,
const MeshShape_SurfacePoint P
 

Standard_EXPORT Standard_Real BRepMesh_FastDiscret::Control const Handle(BRepAdaptor_HSurface)&  caro,
const Standard_Real  defface,
BRepMesh_ListOfVertex inter,
TColStd_ListOfInteger &  badTri,
TColStd_ListOfInteger &  nulTri,
BRepMesh_Delaun trigu,
const Standard_Boolean  isfirst
 

Standard_EXPORT BRepMesh_Status BRepMesh_FastDiscret::CurrentFaceStatus  )  const
 

Standard_EXPORT const TopoDS_Face& BRepMesh_FastDiscret::DomainFace const Standard_Integer  Index  )  const
 

Standard_EXPORT const BRepMesh_Edge& BRepMesh_FastDiscret::Edge const Standard_Integer  Index  )  const
 

Standard_EXPORT void BRepMesh_FastDiscret::EdgesOfDomain const Standard_Integer  Index,
MeshDS_MapOfInteger Indices
const
 

Standard_EXPORT gp_XY BRepMesh_FastDiscret::FindUV const TopoDS_Vertex &  V,
const gp_Pnt2d &  XY,
const Standard_Integer  ip,
const Handle(BRepAdaptor_HSurface)&  S,
const Standard_Real  mindist
 

Standard_EXPORT Standard_Real BRepMesh_FastDiscret::GetAngle  )  const
 

Standard_EXPORT Standard_Real BRepMesh_FastDiscret::GetDeflection  )  const
 

Standard_EXPORT const BRepMesh_FastDiscret::Handle Standard_Type   )  const
 

Standard_EXPORT void BRepMesh_FastDiscret::InternalVertices const Handle(BRepAdaptor_HSurface)&  caro,
BRepMesh_ListOfVertex inter,
const Standard_Real  defedge,
const BRepMesh_Classifier classifier
[private]
 

Standard_EXPORT void BRepMesh_FastDiscret::InternalVerticesForRectangle const Handle(BRepAdaptor_HSurface)&  caro,
BRepMesh_ListOfVertex inter,
const TColStd_ListOfReal &  u1pars,
const TColStd_ListOfReal &  u2pars,
const TColStd_ListOfReal &  v1pars,
const TColStd_ListOfReal &  v2pars
[private]
 

Standard_Boolean & BRepMesh_FastDiscret::InternalVerticesMode  )  [inline]
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::NbDomains  )  const
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::NbEdges  )  const
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::NbPoint3d  )  const
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::NbTriangles  )  const
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::NbVertices  )  const
 

Standard_EXPORT void BRepMesh_FastDiscret::Normal const Standard_Integer  Index,
gp_Pnt &  Pon,
gp_Dir &  Nor
const
 

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

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

Standard_EXPORT Handle_BRepMesh_DataStructureOfDelaun BRepMesh_FastDiscret::Result  )  const
 

Standard_EXPORT const BRepMesh_Triangle& BRepMesh_FastDiscret::Triangle const Standard_Integer  Index  )  const
 

Standard_EXPORT void BRepMesh_FastDiscret::TrianglesOfDomain const Standard_Integer  Index,
MeshDS_MapOfInteger Indices
const
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::Uindex const MeshShape_SurfacePoint P  )  const
 

Standard_EXPORT Standard_Boolean BRepMesh_FastDiscret::Update const TopoDS_Edge &  Edge,
const TopoDS_Face &  Face,
const Handle(Geom2d_Curve)&  C,
const Standard_Real  defedge,
const Standard_Real  first,
const Standard_Real  last
 

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

Standard_EXPORT void BRepMesh_FastDiscret::VerticesOfDomain const Standard_Integer  Index,
MeshDS_MapOfInteger Indices
const
 

Standard_EXPORT Standard_Integer BRepMesh_FastDiscret::Vindex const MeshShape_SurfacePoint P  )  const
 


Field Documentation

Standard_Real BRepMesh_FastDiscret::angle [private]
 

Standard_Real BRepMesh_FastDiscret::deflection [private]
 

Standard_Real BRepMesh_FastDiscret::deltaX [private]
 

Standard_Real BRepMesh_FastDiscret::deltaY [private]
 

BRepMesh_DataMapOfIntegerFace BRepMesh_FastDiscret::Domains [private]
 

MeshShape_DataMapOfShapeListOfTransient BRepMesh_FastDiscret::edges [private]
 

MeshShape_DataMapOfShapeListOfTransient BRepMesh_FastDiscret::internaledges [private]
 

MeshShape_DataMapOfIntegerPnt BRepMesh_FastDiscret::Location3d [private]
 

BRepMesh_DataMapOfShapeReal BRepMesh_FastDiscret::mapdefle [private]
 

MeshDS_BaseAllocator BRepMesh_FastDiscret::myAllocator [private]
 

Standard_Real BRepMesh_FastDiscret::mydtotale [private]
 

BRepMesh_Status BRepMesh_FastDiscret::myfacestate [private]
 

Standard_Boolean BRepMesh_FastDiscret::myinshape [private]
 

Standard_Boolean BRepMesh_FastDiscret::myInternalVerticesMode [private]
 

BRepMesh_ListOfVertex BRepMesh_FastDiscret::mylistver [private]
 

BRepMesh_DataMapOfIntegerListOfXY BRepMesh_FastDiscret::mylocation2d [private]
 

MeshShape_MapOfCouple BRepMesh_FastDiscret::mymap [private]
 

TopTools_ListOfShape BRepMesh_FastDiscret::mynottriangulated [private]
 

MeshShape_DataMapOfIntegerXY BRepMesh_FastDiscret::myrealuv [private]
 

Standard_Boolean BRepMesh_FastDiscret::myrelative [private]
 

Standard_Boolean BRepMesh_FastDiscret::myshapetrigu [private]
 

Standard_Real BRepMesh_FastDiscret::myumax [private]
 

Standard_Real BRepMesh_FastDiscret::myumin [private]
 

TColStd_IndexedMapOfReal BRepMesh_FastDiscret::myUParam [private]
 

TColStd_IndexedMapOfInteger BRepMesh_FastDiscret::myvemap [private]
 

Standard_Real BRepMesh_FastDiscret::myvmax [private]
 

Standard_Real BRepMesh_FastDiscret::myvmin [private]
 

TColStd_IndexedMapOfReal BRepMesh_FastDiscret::myVParam [private]
 

Standard_Integer BRepMesh_FastDiscret::nbDomains [private]
 

Standard_Integer BRepMesh_FastDiscret::nbLocat [private]
 

Handle_BRepMesh_DataStructureOfDelaun BRepMesh_FastDiscret::structure [private]
 

BRepMesh_DataMapOfVertexInteger BRepMesh_FastDiscret::vertices [private]
 

Standard_Boolean BRepMesh_FastDiscret::WithShare [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:41:24 2008 for OpenCASCADE by  doxygen 1.4.1