26 #ifndef SMESH_Pattern_HeaderFile 27 #define SMESH_Pattern_HeaderFile 37 #include <TopoDS_Shape.hxx> 38 #include <TopTools_IndexedMapOfOrientedShape.hxx> 44 #include <TopoDS_Edge.hxx> 75 bool Load (
const char* theFileContents);
79 const TopoDS_Face& theFace,
80 bool theProject =
false);
86 const TopoDS_Shell& theBlock);
89 bool Save (std::ostream& theFile);
92 bool Apply (
const TopoDS_Face& theFace,
93 const TopoDS_Vertex& theVertexOnKeyPoint1,
94 const bool theReverse);
100 bool Apply (
const TopoDS_Shell& theBlock,
101 const TopoDS_Vertex& theVertex000,
102 const TopoDS_Vertex& theVertex001);
109 const int theNodeIndexOnKeyPoint1,
110 const bool theReverse);
117 const TopoDS_Shape& theSurface,
118 const int theNodeIndexOnKeyPoint1,
119 const bool theReverse);
125 std::set<const SMDS_MeshFace*>& theFaces,
126 const int theNodeIndexOnKeyPoint1,
127 const bool theReverse);
133 const int theNode000Index,
134 const int theNode001Index);
141 bool Apply (std::set<const SMDS_MeshVolume*>& theVolumes,
142 const int theNode000Index,
143 const int theNode001Index);
150 bool GetMappedPoints ( std::list<const gp_XYZ *> & thePoints )
const;
154 const bool toCreatePolygons =
false,
155 const bool toCreatePolyedrs =
false);
200 ERR_MAKEM_NOT_COMPUTED
206 bool IsLoaded()
const {
return !myPoints.empty() && !myElemPointIDs.empty(); }
209 bool Is2D()
const {
return myIs2D; }
212 bool GetPoints ( std::list<const gp_XYZ *> & thePoints )
const;
220 {
return myElemXYZIDs.empty() || !applied ? myElemPointIDs : myElemXYZIDs; }
223 void DumpPoints()
const;
231 if ( i < 1 || i > myShapeIDMap.Extent() )
return TopoDS_Shape();
232 return myShapeIDMap( i );
249 friend std::ostream & operator <<(std::ostream & OS,
const TPoint& p);
252 { myErrorCode = theErrorCode;
return myErrorCode == ERR_OK; }
255 bool setShapeToMesh(
const TopoDS_Shape& theShape);
258 std::list< TPoint* > & getShapePoints(
const TopoDS_Shape& theShape);
264 std::list< TPoint* > & getShapePoints(
const int theShapeID);
267 bool findBoundaryPoints();
271 void arrangeBoundaries (std::list< std::list< TPoint* > >& boundaryPoints);
277 void computeUVOnEdge(
const TopoDS_Edge& theEdge,
const std::list< TPoint* > & ePoints );
280 bool compUVByIsoIntersection (
const std::list< std::list< TPoint* > >& boundaryPoints,
281 const gp_XY& theInitUV,
283 bool & theIsDeformed);
286 bool compUVByElasticIsolines(
const std::list< std::list< TPoint* > >& boundaryPoints,
287 const std::list< TPoint* >& pointsToCompute);
291 double setFirstEdge (std::list< TopoDS_Edge > & theWire,
int theFirstEdgeID);
299 const TListOfEdgesList::iterator& theFromWire,
300 const TListOfEdgesList::iterator& theToWire,
301 const int theFirstEdgeID,
302 std::list< std::list< TPoint* > >& theEdgesPointsList );
311 void mergePoints (
const bool uniteGroups);
314 void makePolyElements(
const std::vector< const SMDS_MeshNode* >& theNodes,
315 const bool toCreatePolygons,
316 const bool toCreatePolyedrs);
320 const std::vector<const SMDS_MeshNode* >& theNodesVector,
321 const std::list< std::list< int > > & theElemNodeIDs,
322 const std::vector<const SMDS_MeshElement*>& theElements);
326 const int theNbBndNodes,
327 const std::vector< const SMDS_MeshNode* >& theNodes,
328 std::list< int >& theFaceDefs,
329 std::vector<int>& theQuantity);
335 const std::list< int >& theIdsList)
const;
343 const TopoDS_Shape& theShape);
std::list< std::list< TopoDS_Edge > > TListOfEdgesList
std::map< int, std::list< TElemDef *> > myReverseConnectivity
const std::list< int > & GetKeyPointIDs() const
bool setErrorCode(const ErrorCode theErrorCode)
std::map< int, std::list< TPoint *> > myShapeIDToPointsMap
const std::list< std::list< int > > & GetElementPointIDs(bool applied) const
std::vector< const SMDS_MeshElement * > myElements
TopTools_IndexedMapOfOrientedShape myShapeIDMap
std::map< int, const SMDS_MeshNode * > myXYZIdToNodeMap
std::list< TElemDef > myElemXYZIDs
std::vector< TPoint > myPoints
std::vector< const SMDS_MeshElement * > myPolyElems
std::set< const SMDS_MeshNode * > TNodeSet
std::list< int > TElemDef
std::list< TElemDef > myPolyElemXYZIDs
std::vector< const SMDS_MeshNode * > myOrderedNodes
std::vector< gp_XYZ > myXYZ
ErrorCode GetErrorCode() const
bool myIsBoundaryPointsFound
std::list< int > myNbKeyPntInBoundary
TopoDS_Shape GetSubShape(const int i) const
std::list< int > myKeyPointIDs
std::list< std::vector< int > > myPolyhedronQuantities
std::map< TNodeSet, std::list< std::list< int > > > myIdsOnBoundary
std::list< TElemDef > myElemPointIDs