// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// File : SMESH_Pattern.hxx
// Created : Mon Aug 2 10:30:00 2004
class SMDS_MeshVolume;
class SMDS_MeshNode;
class SMESH_Mesh;
+class SMESHDS_SubMesh;
class TopoDS_Shell;
class TopoDS_Vertex;
class TopoDS_Face;
bool Load (SMESH_Mesh* theMesh,
const TopoDS_Face& theFace,
- bool theProject);
+ bool theProject = false);
// Create a pattern from the mesh built on <theFace>.
// <theProject>==true makes override nodes positions
// on <theFace> computed by mesher
// the loaded pattern to <theFace>. The first key-point
// will be mapped into <theNodeIndexOnKeyPoint1>-th node
- bool Apply (std::set<const SMDS_MeshFace*>& theFaces,
+ bool Apply (SMESH_Mesh* theMesh,
+ const SMDS_MeshFace* theFace,
+ const TopoDS_Shape& theSurface,
+ const int theNodeIndexOnKeyPoint1,
+ const bool theReverse);
+ // Compute nodes coordinates applying
+ // the loaded pattern to <theFace>. The first key-point
+ // will be mapped into <theNodeIndexOnKeyPoint1>-th node
+
+ bool Apply (SMESH_Mesh* theMesh,
+ std::set<const SMDS_MeshFace*>& theFaces,
const int theNodeIndexOnKeyPoint1,
const bool theReverse);
// Compute nodes coordinates applying
// Create nodes and elements in <theMesh> using nodes
// coordinates computed by either of Apply...() methods
-
+ // ----------
// Inquiries
+ // ----------
enum ErrorCode {
ERR_OK,
// Load(face)
ERR_LOADF_NARROW_FACE, // too narrow face
ERR_LOADF_CLOSED_FACE, // closed face
+ ERR_LOADF_CANT_PROJECT, // impossible to project nodes
// Load(volume)
ERR_LOADV_BAD_SHAPE, // volume is not a brick of 6 faces
ERR_LOADV_COMPUTE_PARAMS, // cant compute point parameters
void DumpPoints() const;
// Debug
+ // -----------------------------
+ // Utilities for advanced usage
+ // -----------------------------
- private:
+ TopoDS_Shape GetSubShape( const int i ) const {
+ if ( i < 1 || i > myShapeIDMap.Extent() ) return TopoDS_Shape();
+ return myShapeIDMap( i );
+ }
+ // Return a shape from myShapeIDMap where shapes are indexed so that first go
+ // ordered vertices, then ordered edge, then faces and maybe a shell
+
+private:
// private methods
struct TPoint {
void clearMesh(SMESH_Mesh* theMesh) const;
// clear mesh elements existing on myShape in theMesh
+ static SMESHDS_SubMesh * getSubmeshWithElements(SMESH_Mesh* theMesh,
+ const TopoDS_Shape& theShape);
+ // return submesh containing elements bound to theShape in theMesh
+
private:
// fields