class SMDS_MeshNode;
class gp_Ax1;
class gp_Vec;
+class gp_Pnt;
class SMESH_MeshEditor {
public:
// with a quadrangle built on the same 4 nodes.
// Return false if proper faces not found
- bool Reorient (const SMDS_MeshElement * theFace);
- // Reverse the normal of theFace
- // Return false if theFace is null
+ bool Reorient (const SMDS_MeshElement * theElement);
+ // Reverse theElement orientation
bool TriToQuad (std::set<const SMDS_MeshElement*> & theElems,
// Generate new elements by extrusion of theElements
// by theStep by theNbSteps
+ enum Extrusion_Error {
+ EXTR_OK,
+ EXTR_NO_ELEMENTS,
+ EXTR_PATH_NOT_EDGE,
+ EXTR_BAD_PATH_SHAPE,
+ EXTR_BAD_STARTING_NODE,
+ EXTR_BAD_ANGLES_NUMBER,
+ EXTR_CANT_GET_TANGENT
+ };
+
+ Extrusion_Error ExtrusionAlongTrack (std::set<const SMDS_MeshElement*> & theElements,
+ SMESH_subMesh* theTrackPattern,
+ const SMDS_MeshNode* theNodeStart,
+ const bool theHasAngles,
+ std::list<double>& theAngles,
+ const bool theHasRefPoint,
+ const gp_Pnt& theRefPoint);
+ // Generate new elements by extrusion of theElements along path given by theTrackPattern,
+ // theHasAngles are the rotation angles, base point can be given by theRefPoint
void Transform (std::set<const SMDS_MeshElement*> & theElements,
const gp_Trsf& theTrsf,
const bool theCopy);
// Move or copy theElements applying theTrsf to their nodes
-
typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
- void FindCoincidentNodes (const double theTolerance,
- TListOfListOfNodes & theGroupsOfNodes);
- // Return list of group of nodes close to each other within theTolerance
+ void FindCoincidentNodes (std::set<const SMDS_MeshNode*> & theNodes,
+ const double theTolerance,
+ TListOfListOfNodes & theGroupsOfNodes);
+ // Return list of group of nodes close to each other within theTolerance.
+ // Search among theNodes or in the whole mesh if theNodes is empty.
void MergeNodes (TListOfListOfNodes & theNodeGroups);
// In each group, the cdr of nodes are substituted by the first one
int theNodeIds[] );
// Set 8 nodes of a hexahedron in a good order.
// Return success status
-
+
+ static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
+ const SMDS_MeshElement* elemInGroups,
+ SMESHDS_Mesh * aMesh);
+ // Add elemToAdd to the groups the elemInGroups belongs to
+
+ static const SMDS_MeshElement*
+ FindFaceInSet(const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ const std::set<const SMDS_MeshElement*>& elemSet,
+ const std::set<const SMDS_MeshElement*>& avoidSet);
+ // Return a face having linked nodes n1 and n2 and which is
+ // - not in avoidSet,
+ // - in elemSet provided that !elemSet.empty()
int FindShape (const SMDS_MeshElement * theElem);
// Return an index of the shape theElem is on