+ /*!
+ * \brief Convert elements contained in a submesh to quadratic
+ * \return int - nb of checked elements
+ */
+ int convertElemToQuadratic(SMESHDS_SubMesh * theSm,
+ SMESH_MesherHelper& theHelper,
+ const bool theForce3d);
+
+ /*!
+ * \brief Convert quadratic elements to linear ones and remove quadratic nodes
+ * \return nb of checked elements
+ */
+ int removeQuadElem( SMESHDS_SubMesh * theSm,
+ SMDS_ElemIteratorPtr theItr,
+ const int theShapeID);
+ /*!
+ * \brief Create groups of elements made during transformation
+ * \param nodeGens - nodes making corresponding myLastCreatedNodes
+ * \param elemGens - elements making corresponding myLastCreatedElems
+ * \param postfix - to append to names of new groups
+ */
+ PGroupIDs generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
+ const SMESH_SequenceOfElemPtr& elemGens,
+ const std::string& postfix,
+ SMESH_Mesh* targetMesh=0);
+ /*!
+ * \brief Create elements by sweeping an element
+ * \param elem - element to sweep
+ * \param newNodesItVec - nodes generated from each node of the element
+ * \param newElems - generated elements
+ * \param nbSteps - number of sweeping steps
+ * \param srcElements - to append elem for each generated element
+ */
+ void sweepElement(const SMDS_MeshElement* elem,
+ const std::vector<TNodeOfNodeListMapItr> & newNodesItVec,
+ std::list<const SMDS_MeshElement*>& newElems,
+ const int nbSteps,
+ SMESH_SequenceOfElemPtr& srcElements);
+
+ /*!
+ * \brief Create 1D and 2D elements around swept elements
+ * \param mapNewNodes - source nodes and ones generated from them
+ * \param newElemsMap - source elements and ones generated from them
+ * \param elemNewNodesMap - nodes generated from each node of each element
+ * \param elemSet - all swept elements
+ * \param nbSteps - number of sweeping steps
+ * \param srcElements - to append elem for each generated element
+ */
+ void makeWalls (TNodeOfNodeListMap & mapNewNodes,
+ TTElemOfElemListMap & newElemsMap,
+ TElemOfVecOfNnlmiMap & elemNewNodesMap,
+ TIDSortedElemSet& elemSet,
+ const int nbSteps,
+ SMESH_SequenceOfElemPtr& srcElements);
+
+ struct SMESH_MeshEditor_PathPoint
+ {
+ gp_Pnt myPnt;
+ gp_Dir myTgt;
+ double myAngle, myPrm;
+
+ SMESH_MeshEditor_PathPoint(): myPnt(99., 99., 99.), myTgt(1.,0.,0.), myAngle(0), myPrm(0) {}
+ void SetPnt (const gp_Pnt& aP3D) { myPnt =aP3D; }
+ void SetTangent (const gp_Dir& aTgt) { myTgt =aTgt; }
+ void SetAngle (const double& aBeta) { myAngle=aBeta; }
+ void SetParameter(const double& aPrm) { myPrm =aPrm; }
+ const gp_Pnt& Pnt ()const { return myPnt; }
+ const gp_Dir& Tangent ()const { return myTgt; }
+ double Angle ()const { return myAngle; }
+ double Parameter ()const { return myPrm; }
+ };
+ Extrusion_Error MakeEdgePathPoints(std::list<double>& aPrms,
+ const TopoDS_Edge& aTrackEdge,
+ bool aFirstIsStart,
+ std::list<SMESH_MeshEditor_PathPoint>& aLPP);
+ Extrusion_Error MakeExtrElements(TIDSortedElemSet& theElements,
+ std::list<SMESH_MeshEditor_PathPoint>& theFullList,
+ const bool theHasAngles,
+ std::list<double>& theAngles,
+ const bool theLinearVariation,
+ const bool theHasRefPoint,
+ const gp_Pnt& theRefPoint,
+ const bool theMakeGroups);
+ void LinearAngleVariation(const int NbSteps,
+ list<double>& theAngles);
+
+ bool doubleNodes( SMESHDS_Mesh* theMeshDS,
+ const TIDSortedElemSet& theElems,
+ const TIDSortedElemSet& theNodesNot,
+ std::map< const SMDS_MeshNode*, const SMDS_MeshNode* >& theNodeNodeMap,
+ const bool theIsDoubleElem );
+
+private:
+
+ SMESH_Mesh * myMesh;
+
+ // Nodes and elements created during last operation
+ SMESH_SequenceOfElemPtr myLastCreatedNodes, myLastCreatedElems;
+
+ // Description of error/warning occured during last operation
+ SMESH_ComputeErrorPtr myError;