+ // --------------------------------------------------------------------------------
+ struct ElemFeatures //!< Features of element to create
+ {
+ SMDSAbs_ElementType myType;
+ bool myIsPoly, myIsQuad;
+ int myID;
+ double myBallDiameter;
+ std::vector<int> myPolyhedQuantities;
+
+ SMESH_EXPORT ElemFeatures( SMDSAbs_ElementType type=SMDSAbs_All, bool isPoly=false, bool isQuad=false )
+ :myType( type ), myIsPoly(isPoly), myIsQuad(isQuad), myID(-1), myBallDiameter(0) {}
+
+ SMESH_EXPORT ElemFeatures& Init( SMDSAbs_ElementType type, bool isPoly=false, bool isQuad=false )
+ { myType = type; myIsPoly = isPoly; myIsQuad = isQuad; return *this; }
+
+ SMESH_EXPORT ElemFeatures& Init( const SMDS_MeshElement* elem, bool basicOnly=true );
+
+ SMESH_EXPORT ElemFeatures& Init( double diameter )
+ { myType = SMDSAbs_Ball; myBallDiameter = diameter; return *this; }
+
+ SMESH_EXPORT ElemFeatures& Init( std::vector<int>& quanities, bool isQuad=false )
+ { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad;
+ myPolyhedQuantities.swap( quanities ); return *this; }
+
+ SMESH_EXPORT ElemFeatures& Init( const std::vector<int>& quanities, bool isQuad=false )
+ { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad;
+ myPolyhedQuantities = quanities; return *this; }
+
+ SMESH_EXPORT ElemFeatures& SetPoly(bool isPoly) { myIsPoly = isPoly; return *this; }
+ SMESH_EXPORT ElemFeatures& SetQuad(bool isQuad) { myIsQuad = isQuad; return *this; }
+ SMESH_EXPORT ElemFeatures& SetID (int ID) { myID = ID; return *this; }
+ };
+