27 #ifndef SMESH_Pattern_HeaderFile
28 #define SMESH_Pattern_HeaderFile
38 #include <TopoDS_Vertex.hxx>
39 #include <TopTools_IndexedMapOfOrientedShape.hxx>
68 bool Load (
const char* theFileContents);
72 const TopoDS_Face& theFace,
73 bool theProject =
false,
74 TopoDS_Vertex the1stVertex=TopoDS_Vertex(),
75 bool theKeepNodes =
false );
81 const TopoDS_Shell& theBlock,
82 bool theKeepNodes =
false);
85 bool Save (std::ostream& theFile);
88 bool Apply (
const TopoDS_Face& theFace,
89 const TopoDS_Vertex& theVertexOnKeyPoint1,
90 const bool theReverse);
96 bool Apply (
const TopoDS_Shell& theBlock,
97 const TopoDS_Vertex& theVertex000,
98 const TopoDS_Vertex& theVertex001);
105 const int theNodeIndexOnKeyPoint1,
106 const bool theReverse);
113 const TopoDS_Shape& theSurface,
114 const int theNodeIndexOnKeyPoint1,
115 const bool theReverse);
121 std::set<const SMDS_MeshFace*>& theFaces,
122 const int theNodeIndexOnKeyPoint1,
123 const bool theReverse);
129 const int theNode000Index,
130 const int theNode001Index);
137 bool Apply (std::set<const SMDS_MeshVolume*>& theVolumes,
138 const int theNode000Index,
139 const int theNode001Index);
146 bool GetMappedPoints ( std::list<const gp_XYZ *> & thePoints )
const;
150 const bool toCreatePolygons =
false,
151 const bool toCreatePolyedrs =
false);
204 bool IsLoaded()
const {
return !myPoints.empty() && !myElemPointIDs.empty(); }
207 bool Is2D()
const {
return myIs2D; }
210 bool GetPoints ( std::list<const gp_XYZ *> & thePoints )
const;
217 const std::list< std::list< int > >& GetElementPointIDs (
bool applied)
const
218 {
return myElemXYZIDs.empty() || !applied ? myElemPointIDs : myElemXYZIDs; }
221 void GetInOutNodes( std::vector< const SMDS_MeshNode* > *& inNodes,
222 std::vector< const SMDS_MeshNode* > *& outNodes )
223 { inNodes = & myInNodes; outNodes = & myOutNodes; }
226 void DumpPoints()
const;
234 if ( i < 1 || i > myShapeIDMap.Extent() )
return TopoDS_Shape();
235 return myShapeIDMap( i );
254 bool setErrorCode(
const ErrorCode theErrorCode );
257 bool setShapeToMesh(
const TopoDS_Shape& theShape);
260 std::list< TPoint* > & getShapePoints(
const TopoDS_Shape& theShape);
266 std::list< TPoint* > & getShapePoints(
const int theShapeID);
269 bool findBoundaryPoints();
273 void arrangeBoundaries (std::list< std::list< TPoint* > >& boundaryPoints);
279 void computeUVOnEdge(
const TopoDS_Edge& theEdge,
const std::list< TPoint* > & ePoints );
282 bool compUVByIsoIntersection (
const std::list< std::list< TPoint* > >& boundaryPoints,
283 const gp_XY& theInitUV,
285 bool & theIsDeformed);
288 bool compUVByElasticIsolines(
const std::list< std::list< TPoint* > >& boundaryPoints,
289 const std::list< TPoint* >& pointsToCompute);
293 double setFirstEdge (std::list< TopoDS_Edge > & theWire,
int theFirstEdgeID);
301 const TListOfEdgesList::iterator& theFromWire,
302 const TListOfEdgesList::iterator& theToWire,
303 const int theFirstEdgeID,
304 std::list< std::list< TPoint* > >& theEdgesPointsList );
313 void mergePoints (
const bool uniteGroups);
316 void makePolyElements(
const std::vector< const SMDS_MeshNode* >& theNodes,
317 const bool toCreatePolygons,
318 const bool toCreatePolyedrs);
322 const std::vector<const SMDS_MeshNode* >& theNodesVector,
323 const std::list< std::list< int > > & theElemNodeIDs,
324 const std::vector<const SMDS_MeshElement*>& theElements);
328 const int theNbBndNodes,
329 const std::vector< const SMDS_MeshNode* >& theNodes,
330 std::list< int >& theFaceDefs,
331 std::vector<int>& theQuantity);
337 const std::list< int >& theIdsList)
const;
345 const TopoDS_Shape& S,
346 const std::list< TPoint* > & points,
347 std::vector< const SMDS_MeshNode* > & nodes);
351 const TopoDS_Shape& theShape);