Open CASCADE Technology  7.0.0
Public Member Functions | Protected Attributes

StlMesh_Mesh Class Reference

Mesh definition. The mesh contains one or several domains. Each mesh domain contains a set of triangles. Each domain can have its own deflection value. More...

#include <StlMesh_Mesh.hxx>

Inheritance diagram for StlMesh_Mesh:
Inheritance graph
[legend]

Public Member Functions

 StlMesh_Mesh ()
 Creates an empty mesh. More...
 
virtual void AddDomain ()
 Adds a new mesh domain. The mesh deflection is defaulted to Confusion from package Precision. More...
 
virtual void AddDomain (const Standard_Real Deflection)
 Adds a new mesh domain. Raised if the deflection is lower than zero Raised if the deflection is lower than Confusion from package Precision. More...
 
virtual Standard_Integer AddTriangle (const Standard_Integer V1, const Standard_Integer V2, const Standard_Integer V3, const Standard_Real Xn, const Standard_Real Yn, const Standard_Real Zn)
 Build a triangle with the triplet of vertices (V1, V2, V3). This triplet defines the indexes of the vertex in the current domain The coordinates Xn, Yn, Zn defines the normal direction to the triangle. Returns the range of the triangle in the current domain. More...
 
virtual Standard_Integer AddVertex (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 Returns the range of the vertex in the current domain. More...
 
virtual Standard_Integer AddOnlyNewVertex (const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
 Returns the range of the vertex in the current domain. The current vertex is not inserted in the mesh if it already exist. More...
 
virtual void Bounds (gp_XYZ &XYZmax, gp_XYZ &XYZmin) const
 Each vertex of the mesh verifies the following relations : XYZMin.X() <= X <= XYZMax.X() XYZMin.Y() <= Y <= XYZMax.y() XYZMin.Z() <= Z <= XYZMax.Z() More...
 
virtual void Clear ()
 
virtual Standard_Real Deflection (const Standard_Integer DomainIndex) const
 Returns the deflection of the mesh of the domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains. More...
 
virtual Standard_Boolean IsEmpty () const
 
virtual Standard_Integer NbDomains () const
 Number of domains in the mesh. More...
 
Standard_Integer NbTriangles () const
 Cumulative Number of triangles in the mesh. More...
 
virtual Standard_Integer NbTriangles (const Standard_Integer DomainIndex) const
 Number of triangles in the domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains. More...
 
virtual Standard_Integer NbVertices () const
 Cumulative Number of vertices in the mesh. More...
 
virtual Standard_Integer NbVertices (const Standard_Integer DomainIndex) const
 Number of vertices in the domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains. More...
 
virtual const StlMesh_SequenceOfMeshTriangleTriangles (const Standard_Integer DomainIndex=1) const
 Returns the set of triangle of the mesh domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains. More...
 
virtual const TColgp_SequenceOfXYZVertices (const Standard_Integer DomainIndex=1) const
 Returns the coordinates of the vertices of the mesh domain of range <DomainIndex>. {XV1, YV1, ZV1, XV2, YV2, ZV2, XV3,.....} Raised if <DomainIndex> is lower than 1 or greater than the number of domains. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const override
 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 const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::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 opencascade::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...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Attributes

Standard_Integer nbTriangles
 
Standard_Integer nbVertices
 
StlMesh_SequenceOfMeshDomain domains
 
gp_XYZ xyzmax
 
gp_XYZ xyzmin
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

Mesh definition. The mesh contains one or several domains. Each mesh domain contains a set of triangles. Each domain can have its own deflection value.

Constructor & Destructor Documentation

StlMesh_Mesh::StlMesh_Mesh ( )

Creates an empty mesh.

Member Function Documentation

virtual void StlMesh_Mesh::AddDomain ( )
virtual

Adds a new mesh domain. The mesh deflection is defaulted to Confusion from package Precision.

virtual void StlMesh_Mesh::AddDomain ( const Standard_Real  Deflection)
virtual

Adds a new mesh domain. Raised if the deflection is lower than zero Raised if the deflection is lower than Confusion from package Precision.

virtual Standard_Integer StlMesh_Mesh::AddOnlyNewVertex ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z 
)
virtual

Returns the range of the vertex in the current domain. The current vertex is not inserted in the mesh if it already exist.

virtual Standard_Integer StlMesh_Mesh::AddTriangle ( const Standard_Integer  V1,
const Standard_Integer  V2,
const Standard_Integer  V3,
const Standard_Real  Xn,
const Standard_Real  Yn,
const Standard_Real  Zn 
)
virtual

Build a triangle with the triplet of vertices (V1, V2, V3). This triplet defines the indexes of the vertex in the current domain The coordinates Xn, Yn, Zn defines the normal direction to the triangle. Returns the range of the triangle in the current domain.

virtual Standard_Integer StlMesh_Mesh::AddVertex ( const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Z 
)
virtual

Returns the range of the vertex in the current domain.

virtual void StlMesh_Mesh::Bounds ( gp_XYZ XYZmax,
gp_XYZ XYZmin 
) const
virtual

Each vertex of the mesh verifies the following relations : XYZMin.X() <= X <= XYZMax.X() XYZMin.Y() <= Y <= XYZMax.y() XYZMin.Z() <= Z <= XYZMax.Z()

virtual void StlMesh_Mesh::Clear ( )
virtual
virtual Standard_Real StlMesh_Mesh::Deflection ( const Standard_Integer  DomainIndex) const
virtual

Returns the deflection of the mesh of the domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains.

virtual Standard_Boolean StlMesh_Mesh::IsEmpty ( ) const
virtual
virtual Standard_Integer StlMesh_Mesh::NbDomains ( ) const
virtual

Number of domains in the mesh.

Standard_Integer StlMesh_Mesh::NbTriangles ( ) const

Cumulative Number of triangles in the mesh.

virtual Standard_Integer StlMesh_Mesh::NbTriangles ( const Standard_Integer  DomainIndex) const
virtual

Number of triangles in the domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains.

virtual Standard_Integer StlMesh_Mesh::NbVertices ( ) const
virtual

Cumulative Number of vertices in the mesh.

virtual Standard_Integer StlMesh_Mesh::NbVertices ( const Standard_Integer  DomainIndex) const
virtual

Number of vertices in the domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains.

virtual const StlMesh_SequenceOfMeshTriangle& StlMesh_Mesh::Triangles ( const Standard_Integer  DomainIndex = 1) const
virtual

Returns the set of triangle of the mesh domain of range <DomainIndex>. Raised if <DomainIndex> is lower than 1 or greater than the number of domains.

virtual const TColgp_SequenceOfXYZ& StlMesh_Mesh::Vertices ( const Standard_Integer  DomainIndex = 1) const
virtual

Returns the coordinates of the vertices of the mesh domain of range <DomainIndex>. {XV1, YV1, ZV1, XV2, YV2, ZV2, XV3,.....} Raised if <DomainIndex> is lower than 1 or greater than the number of domains.

Field Documentation

StlMesh_SequenceOfMeshDomain StlMesh_Mesh::domains
protected
Standard_Integer StlMesh_Mesh::nbTriangles
protected
Standard_Integer StlMesh_Mesh::nbVertices
protected
gp_XYZ StlMesh_Mesh::xyzmax
protected
gp_XYZ StlMesh_Mesh::xyzmin
protected

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