28 #ifndef SMESH_MeshEditor_HeaderFile
29 #define SMESH_MeshEditor_HeaderFile
39 #include <TColStd_HSequenceOfReal.hxx>
56 typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*>
TNodeNodeMap;
61 typedef pair< const SMDS_MeshNode*, const SMDS_MeshNode* >
NLink;
87 std::vector< const SMDS_MeshElement* >& foundElems)=0;
99 {
if ( n1->
GetID() < n2->
GetID() ) std::swap( first, second ); }
101 {
if ( first->GetID() < second->GetID() ) std::swap( first, second ); }
114 myPnt.SetCoord(99., 99., 99.);
115 myTgt.SetCoord(1.,0.,0.);
167 SMDS_MeshElement* AddElement(
const std::vector<const SMDS_MeshNode*> & nodes,
179 bool Remove (
const std::list< int >& theElemIDs,
const bool isNodes);
215 const double theMaxAngle);
233 const bool the13Diag);
248 std::set<const SMDS_MeshNode*> & theFixedNodes,
249 const SmoothMethod theSmoothMethod,
250 const int theNbIterations,
251 double theTgtAspectRatio = 1.0,
252 const bool the2D =
true);
265 const gp_Ax1& theAxis,
266 const double theAngle,
267 const int theNbSteps,
268 const double theToler,
269 const bool theMakeGroups,
270 const bool theMakeWalls=
true);
280 EXTRUSION_FLAG_BOUNDARY = 0x01,
281 EXTRUSION_FLAG_SEW = 0x02
289 Handle(TColStd_HSequenceOfReal) mySteps;
290 SMESH_SequenceOfNode myNodes;
300 const
double tolnode,
301 SMESH_SequenceOfNode& aNodes);
316 const gp_Vec& theStep,
317 const
int theNbSteps,
319 const
bool theMakeGroups,
320 const
int theFlags = EXTRUSION_FLAG_BOUNDARY,
321 const
double theTolerance = 1.e-6);
336 const
bool theMakeGroups,
338 const
double theTolerance);
351 EXTR_CANT_GET_TANGENT
357 const bool theHasAngles,
358 std::list<double>& theAngles,
359 const bool theLinearVariation,
360 const bool theHasRefPoint,
361 const gp_Pnt& theRefPoint,
362 const bool theMakeGroups);
366 const bool theHasAngles,
367 std::list<double>& theAngles,
368 const bool theLinearVariation,
369 const bool theHasRefPoint,
370 const gp_Pnt& theRefPoint,
371 const bool theMakeGroups);
376 const gp_Trsf& theTrsf,
378 const bool theMakeGroups,
385 void FindCoincidentNodes (std::set<const SMDS_MeshNode*> & theNodes,
386 const double theTolerance,
403 static bool isOut(
const SMDS_MeshElement* element,
const gp_Pnt& point,
double tol );
406 int SimplifyFace (
const std::vector<const SMDS_MeshNode *> faceNodes,
407 std::vector<const SMDS_MeshNode *>& poly_nodes,
408 std::vector<int>& quantities)
const;
418 void FindEqualElements(std::set<const SMDS_MeshElement*> & theElements,
426 void MergeEqualElements();
430 static bool CheckFreeBorderNodes(
const SMDS_MeshNode* theNode1,
435 static bool FindFreeBorder (
const SMDS_MeshNode* theFirstNode,
438 std::list< const SMDS_MeshNode* > & theNodes,
439 std::list< const SMDS_MeshElement* >& theFaces);
459 Sew_Error SewFreeBorder (
const SMDS_MeshNode* theBorderFirstNode,
465 const bool theSide2IsFreeBorder =
true,
466 const bool toCreatePolygons =
false,
467 const bool toCreatePolyedrs =
false);
504 std::list<const SMDS_MeshNode*>& theNodesToInsert,
505 const bool toCreatePoly =
false);
511 std::list<const SMDS_MeshNode*>& theNodesToInsert);
515 void ConvertToQuadratic(
const bool theForce3d);
519 bool ConvertFromQuadratic();
576 static Sew_Error FindMatchingNodes(std::set<const SMDS_MeshElement*>& theSide1,
577 std::set<const SMDS_MeshElement*>& theSide2,
605 bool DoubleNodes(
const std::list< int >& theListOfNodes,
606 const std::list< int >& theListOfModifiedElems );
621 bool Make2DMeshFrom3D();
631 const bool theForce3d);
639 const int theShapeID);
646 PGroupIDs generateGroups(
const SMESH_SequenceOfElemPtr& nodeGens,
647 const SMESH_SequenceOfElemPtr& elemGens,
648 const std::string& postfix,
666 const std::vector<TNodeOfNodeListMapItr> & newNodesItVec,
667 std::list<const SMDS_MeshElement*>& newElems,
669 SMESH_SequenceOfElemPtr& srcElements);
685 SMESH_SequenceOfElemPtr& srcElements);
691 const TopoDS_Edge& aTrackEdge,
693 list<SMESH_MeshEditor_PathPoint>& LPP);
695 list<SMESH_MeshEditor_PathPoint>& fullList,
696 const bool theHasAngles,
697 list<double>& theAngles,
698 const bool theLinearVariation,
699 const bool theHasRefPoint,
700 const gp_Pnt& theRefPoint,
701 const bool theMakeGroups);
702 void LinearAngleVariation(
const int NbSteps,
703 list<double>& theAngles);
710 const bool theIsDoubleElem );