+ /*!
+ * \brief Computes new connectivity of an element after merging nodes
+ * \param [in] elems - the element
+ * \param [out] newElemDefs - definition(s) of result element(s)
+ * \param [inout] nodeNodeMap - nodes to merge
+ * \param [in] avoidMakingHoles - if true and and the element becomes invalid
+ * after merging (but not degenerated), removes nodes causing
+ * the invalidity from \a nodeNodeMap.
+ * \return bool - true if the element should be removed
+ */
+ bool applyMerge( const SMDS_MeshElement* elems,
+ std::vector< ElemFeatures >& newElemDefs,
+ TNodeNodeMap& nodeNodeMap,
+ const bool avoidMakingHoles );
+ /*!
+ * \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[2],
+ 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);
+ static void linearAngleVariation(const int NbSteps,
+ std::list<double>& theAngles);
+
+ bool doubleNodes( SMESHDS_Mesh* theMeshDS,
+ const TIDSortedElemSet& theElems,
+ const TIDSortedElemSet& theNodesNot,
+ TNodeNodeMap& theNodeNodeMap,
+ const bool theIsDoubleElem );
+
+ void copyPosition( const SMDS_MeshNode* from,
+ const SMDS_MeshNode* to );
+
+private:
+
+ SMESH_Mesh * myMesh;
+
+ // Nodes and elements created during last operation
+ SMESH_SequenceOfElemPtr myLastCreatedNodes, myLastCreatedElems;
+
+ // Description of error/warning occurred during last operation
+ SMESH_ComputeErrorPtr myError;