+ class SMESH_EXPORT ExtrusParam
+ {
+ public:
+ //! Point on extrusion path
+ struct PathPoint
+ {
+ gp_Pnt myPnt;
+ gp_Dir myTgt;
+ double myAngle, myScale;
+ PathPoint(): myPnt(99., 99., 99.), myTgt(1.,0.,0.), myAngle(0), myScale(0) {}
+ };
+
+ ExtrusParam( const gp_Vec& theStep,
+ const int theNbSteps,
+ const std::list<double>& theScales,
+ const std::list<double>& theAngles,
+ const gp_XYZ* theBaseP,
+ const int theFlags = 0,
+ const double theTolerance = 1e-6);
+ ExtrusParam( const gp_Dir& theDir,
+ Handle(TColStd_HSequenceOfReal) theSteps,
+ const int theFlags = 0,
+ const double theTolerance = 1e-6);
+ ExtrusParam( const double theStep,
+ const int theNbSteps,
+ const int theFlags,
+ const int theDim); // for extrusion by normal
+ ExtrusParam( const std::vector< PathPoint >& thePoints,
+ const gp_Pnt* theBaseP,
+ const std::list<double>& theScales,
+ const bool theMakeGroups); // for extrusion along path
+
+ SMESH_SequenceOfNode& ChangeNodes() { return myNodes; }
+ int& Flags() { return myFlags; }
+ bool ToMakeBoundary() const { return myFlags & EXTRUSION_FLAG_BOUNDARY; }
+ bool ToMakeGroups() const { return myFlags & EXTRUSION_FLAG_GROUPS; }
+ bool ToUseInpElemsOnly() const { return myFlags & EXTRUSION_FLAG_USE_INPUT_ELEMS_ONLY; }
+ bool IsScaleVariation() const { return myFlags & EXTRUSION_FLAG_SCALE_LINEAR_VARIATION; }
+ bool IsAngleVariation() const { return myFlags & EXTRUSION_FLAG_ANGLE_LINEAR_VARIATION; }
+ int NbSteps() const {
+ return mySteps.IsNull() ? myPathPoints.size() - 1: mySteps->Length();
+ }
+ // stores elements to use for extrusion by normal, depending on
+ // state of EXTRUSION_FLAG_USE_INPUT_ELEMS_ONLY flag;
+ // define myBaseP for scaling
+ void SetElementsToUse( const TIDSortedElemSet& elems, const TIDSortedElemSet& nodes );
+
+ // creates nodes and returns number of nodes added in \a newNodes
+ int MakeNodes( SMESHDS_Mesh* mesh,
+ const SMDS_MeshNode* srcNode,
+ std::list<const SMDS_MeshNode*> & newNodes,
+ const bool makeMediumNodes)
+ {
+ return (this->*myMakeNodesFun)( mesh, srcNode, newNodes, makeMediumNodes );
+ }
+ private:
+
+ gp_Dir myDir; // direction of extrusion