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;
85 virtual void FindElementsByPoint(
const gp_Pnt& point,
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,
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,
387 TListOfListOfNodes & theGroupsOfNodes);
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;
412 void MergeNodes (TListOfListOfNodes & theNodeGroups);
418 void FindEqualElements(std::set<const SMDS_MeshElement*> & theElements,
419 TListOfListOfElementsID & theGroupsOfElementsID);
423 void MergeElements(TListOfListOfElementsID & theGroupsOfElementsID);
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);
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);
680 void makeWalls (TNodeOfNodeListMap & mapNewNodes,
682 TElemOfVecOfNnlmiMap & elemNewNodesMap,
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 );
const SMDS_MeshNode * node1() const
class Handle(MeshVS_DataSource3D)
SMESH_MeshEditor_PathPoint()
const gp_Dir & Tangent() const
void SetTangent(const gp_Dir &aTgt)
const SMESH_SequenceOfElemPtr & GetLastCreatedElems() const
std::vector< TNodeOfNodeListMapItr > TVecOfNnlmiMap
Return elements of given type where the given point is IN or ON.
boost::shared_ptr< NumericalFunctor > NumericalFunctorPtr
SMESH_TLink(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2)
std::map< const SMDS_MeshNode *, std::list< const SMDS_MeshNode * > > TNodeOfNodeListMap
boost::shared_ptr< SMDS_Iterator< const SMDS_MeshElement * > > SMDS_ElemIteratorPtr
virtual const SMDS_MeshNode * FindClosestTo(const gp_Pnt &pnt)=0
SMESH_SequenceOfElemPtr myLastCreatedNodes
void SetParameter(const double &aPrm)
SMESH_SequenceOfElemPtr myLastCreatedElems
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
void SetAngle(const double &aBeta)
pair< const SMDS_MeshNode *, const SMDS_MeshNode * > NLink
std::auto_ptr< std::list< int > > PGroupIDs
void SetPnt(const gp_Pnt &aP3D)
std::set< const SMDS_MeshElement *, TIDCompare > TIDSortedElemSet
std::list< std::list< int > > TListOfListOfElementsID
const SMESH_SequenceOfElemPtr & GetLastCreatedNodes() const
std::map< const SMDS_MeshNode *, const SMDS_MeshNode * > TNodeNodeMap
Set of elements sorted by ID, to be used to assure predictability of edition.
Searcher for the node closest to point.
std::map< const SMDS_MeshElement *, TVecOfNnlmiMap > TElemOfVecOfNnlmiMap
const gp_Pnt & Pnt() const
virtual void MoveNode(const SMDS_MeshNode *node, const gp_Pnt &toPnt)=0
SMESH_TLink(const NLink &link)
std::list< std::list< const SMDS_MeshNode * > > TListOfListOfNodes
TNodeOfNodeListMap::iterator TNodeOfNodeListMapItr
std::map< const SMDS_MeshElement *, std::list< const SMDS_MeshElement * > > TElemOfElemListMap
const SMDS_MeshNode * node2() const
SMESHDS_Mesh * GetMeshDS()