28#ifndef StdMeshers_ProjectionUtils_HeaderFile
29#define StdMeshers_ProjectionUtils_HeaderFile
37#include <ShapeAnalysis_Surface.hxx>
38#include <TopTools_DataMapOfShapeShape.hxx>
39#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
40#include <TopTools_IndexedMapOfShape.hxx>
41#include <TopoDS_Edge.hxx>
42#include <TopoDS_Face.hxx>
43#include <TopoDS_Vertex.hxx>
44#include <gp_GTrsf.hxx>
45#include <gp_GTrsf2d.hxx>
71 bool Bind(
const TopoDS_Shape& s1,
const TopoDS_Shape& s2 )
73 bool IsBound(
const TopoDS_Shape& s,
const bool isShape2=
false )
const
78 const TopoDS_Shape&
operator()(
const TopoDS_Shape& s,
const bool isShape2=
false )
const
112 bool Solve(
const std::vector< gp_XY >& srcPnts,
113 const std::vector< gp_XY >& tgtPnts );
115 gp_XY
Transform(
const gp_Pnt2d& srcUV )
const;
133 bool Solve(
const std::vector< gp_XYZ > & srcPnts,
134 const std::vector< gp_XYZ > & tgtPnts );
136 gp_XYZ
Transform(
const gp_Pnt& srcP )
const;
161 Delaunay(
const std::vector< const UVPtStructVec* > & boundaryNodes,
163 bool checkUV =
false);
189 Handle(ShapeAnalysis_Surface) tgtSurface,
207 const TopoDS_Shape& theShape2,
223 TopoDS_Vertex VV1[2],
224 const TopoDS_Face& face2,
225 TopoDS_Vertex VV2[2],
226 std::list< TopoDS_Edge > & edges1,
227 std::list< TopoDS_Edge > & edges2,
228 const bool isClosenessAssoc=
false);
248 const TopoDS_Shape& theShape2,
255 const TopoDS_Vertex& V1,
256 const TopoDS_Vertex& V2);
263 const TopoDS_Edge& edge,
264 const TopoDS_Face& face);
269 const TopoDS_Vertex& vertex);
280 const TopoDS_Edge& anEdge,
281 const TopoDS_Edge& fromEdge,
282 TopTools_IndexedMapOfShape* chain=0);
296 const TopoDS_Face& face2,
306 TopoDS_Shape
OuterShape(
const TopoDS_Face& face,
307 TopAbs_ShapeEnum type);
330 TopoDS_Shape srcShape,
338 std::list< TopoDS_Edge >* allBndEdges = 0 );
#define STDMESHERS_EXPORT
Definition: SMESH_StdMeshers.hxx:38
std::vector< StdMeshers_FaceSidePtr > TSideVector
Definition: StdMeshers_FaceSide.hxx:57
boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr
Definition: StdMeshers_FaceSide.hxx:56
Definition: SMDS_MeshNode.hxx:36
Root of all algorithms.
Definition: SMESH_Algo.hxx:79
Create a Delaunay triangulation of nodes on a face boundary and provide exploration of nodes shared b...
Definition: SMESH_Delaunay.hxx:46
Definition: SMESH_Hypothesis.hxx:48
Definition: SMESH_Mesh.hxx:80
It helps meshers to add elements and provides other utilities.
Definition: SMESH_MesherHelper.hxx:84
Definition: SMESH_subMesh.hxx:61
Create a Delaunay triangulation of nodes on a face boundary and provide exploration of nodes shared b...
Definition: StdMeshers_ProjectionUtils.hxx:156
virtual gp_XY getNodeUV(const TopoDS_Face &face, const SMDS_MeshNode *node) const
Definition: StdMeshers_ProjectionUtils.cxx:2964
bool _checkUV
Definition: StdMeshers_ProjectionUtils.hxx:171
Delaunay(const TSideVector &wires, bool checkUV=false)
Definition: StdMeshers_ProjectionUtils.cxx:2933
SMESH_MesherHelper * _helper
Definition: StdMeshers_ProjectionUtils.hxx:169
bool * _checkUVPtr
Definition: StdMeshers_ProjectionUtils.hxx:171
StdMeshers_FaceSidePtr _wire
Definition: StdMeshers_ProjectionUtils.hxx:170
Morph mesh on the target FACE to lie within FACE boundary w/o distortion.
Definition: StdMeshers_ProjectionUtils.hxx:180
bool Perform(SMESH_MesherHelper &tgtHelper, const TSideVector &tgtWires, Handle(ShapeAnalysis_Surface) tgtSurface, const TNodeNodeMap &src2tgtNodes, const bool moveAll)
Move non-marked target nodes.
Definition: StdMeshers_ProjectionUtils.cxx:2855
Morph(const TSideVector &srcWires)
triangulate the srcFace in 2D
Definition: StdMeshers_ProjectionUtils.cxx:2837
Delaunay _delaunay
Definition: StdMeshers_ProjectionUtils.hxx:181
SMESH_subMesh * _srcSubMesh
Definition: StdMeshers_ProjectionUtils.hxx:182
Finds transformation between two sets of 2D points using a least square approximation.
Definition: StdMeshers_ProjectionUtils.hxx:104
bool Solve(const std::vector< gp_XY > &srcPnts, const std::vector< gp_XY > &tgtPnts)
Computes transformation between two sets of 2D points using a least square approximation.
Definition: StdMeshers_ProjectionUtils.cxx:2618
gp_XY Transform(const gp_Pnt2d &srcUV) const
Transforms a 2D points using a found transformation.
Definition: StdMeshers_ProjectionUtils.cxx:2684
gp_XY _srcOrig
Definition: StdMeshers_ProjectionUtils.hxx:106
TrsfFinder2D()
Definition: StdMeshers_ProjectionUtils.hxx:108
bool IsIdentity() const
Definition: StdMeshers_ProjectionUtils.hxx:117
gp_GTrsf2d _trsf
Definition: StdMeshers_ProjectionUtils.hxx:105
void Set(const gp_GTrsf2d &t)
Definition: StdMeshers_ProjectionUtils.hxx:110
Finds transformation between two sets of 3D points using a least square approximation.
Definition: StdMeshers_ProjectionUtils.hxx:125
bool Solve(const std::vector< gp_XYZ > &srcPnts, const std::vector< gp_XYZ > &tgtPnts)
Computes transformation between two sets of 3D points using a least square approximation.
Definition: StdMeshers_ProjectionUtils.cxx:2701
TrsfFinder3D()
Definition: StdMeshers_ProjectionUtils.hxx:129
bool Invert()
Inversion.
Definition: StdMeshers_ProjectionUtils.cxx:2801
void Set(const gp_GTrsf &t)
Definition: StdMeshers_ProjectionUtils.hxx:131
gp_XYZ Transform(const gp_Pnt &srcP) const
Transforms a 3D point using a found transformation.
Definition: StdMeshers_ProjectionUtils.cxx:2778
bool IsIdentity() const
Definition: StdMeshers_ProjectionUtils.hxx:140
gp_GTrsf _trsf
Definition: StdMeshers_ProjectionUtils.hxx:126
gp_XYZ _srcOrig
Definition: StdMeshers_ProjectionUtils.hxx:127
gp_XYZ TransformVec(const gp_Vec &v) const
Transforms a 3D vector using a found transformation.
Definition: StdMeshers_ProjectionUtils.cxx:2791
Methods common to Projection algorithms.
Definition: StdMeshers_ProjectionUtils.cxx:2606
bool MakeComputed(SMESH_subMesh *sm, const int iterationNb=0)
Check that submeshis is computed and try to compute it if is not.
Definition: StdMeshers_ProjectionUtils.cxx:2304
TopoDS_Vertex GetNextVertex(const TopoDS_Edge &edge, const TopoDS_Vertex &vertex)
Return other vertex of an edge.
Definition: StdMeshers_ProjectionUtils.cxx:1832
bool FindMatchingNodesOnFaces(const TopoDS_Face &face1, SMESH_Mesh *mesh1, const TopoDS_Face &face2, SMESH_Mesh *mesh2, const TShapeShapeMap &assocMap, TNodeNodeMap &nodeIn2OutMap)
Find corresponding nodes on two faces.
Definition: StdMeshers_ProjectionUtils.cxx:1948
std::map< const SMDS_MeshNode *, const SMDS_MeshNode *, TIDCompare > TNodeNodeMap
Definition: StdMeshers_ProjectionUtils.hxx:95
StdMeshers_ShapeShapeBiDirectionMap TShapeShapeMap
Definition: StdMeshers_ProjectionUtils.hxx:92
TopoDS_Shape OuterShape(const TopoDS_Face &face, TopAbs_ShapeEnum type)
Return any sub-shape of a face belonging to the outer wire.
Definition: StdMeshers_ProjectionUtils.cxx:2286
int FindFaceAssociation(const TopoDS_Face &face1, TopoDS_Vertex VV1[2], const TopoDS_Face &face2, TopoDS_Vertex VV2[2], std::list< TopoDS_Edge > &edges1, std::list< TopoDS_Edge > &edges2, const bool isClosenessAssoc=false)
Find association of edges of faces.
Definition: StdMeshers_ProjectionUtils.cxx:1411
std::pair< int, TopoDS_Edge > GetPropagationEdge(SMESH_Mesh *aMesh, const TopoDS_Edge &anEdge, const TopoDS_Edge &fromEdge, TopTools_IndexedMapOfShape *chain=0)
Return an oriented propagation edge.
Definition: StdMeshers_ProjectionUtils.cxx:1856
TopoDS_Face GetNextFace(const TAncestorMap &edgeToFaces, const TopoDS_Edge &edge, const TopoDS_Face &face)
Return another face sharing an edge.
Definition: StdMeshers_ProjectionUtils.cxx:1810
bool FindSubShapeAssociation(const TopoDS_Shape &theShape1, SMESH_Mesh *theMesh1, const TopoDS_Shape &theShape2, SMESH_Mesh *theMesh2, TShapeShapeMap &theAssociationMap)
Looks for association of all sub-shapes of two shapes.
Definition: StdMeshers_ProjectionUtils.cxx:526
void InitVertexAssociation(const SMESH_Hypothesis *theHyp, TShapeShapeMap &theAssociationMap)
Insert vertex association defined by a hypothesis into a map.
Definition: StdMeshers_ProjectionUtils.cxx:1718
std::string SourceNotComputedError(SMESH_subMesh *sm=0, SMESH_Algo *projAlgo=0)
Returns an error message to show in case if MakeComputed( sm ) fails.
Definition: StdMeshers_ProjectionUtils.cxx:2420
bool InsertAssociation(const TopoDS_Shape &theShape1, const TopoDS_Shape &theShape2, TShapeShapeMap &theAssociationMap)
Inserts association theShape1 <-> theShape2 to TShapeShapeMap.
Definition: StdMeshers_ProjectionUtils.cxx:1756
TopTools_IndexedDataMapOfShapeListOfShape TAncestorMap
Definition: StdMeshers_ProjectionUtils.hxx:93
boost::shared_ptr< Delaunay > DelaunayPtr
Definition: StdMeshers_ProjectionUtils.hxx:173
TopoDS_Edge GetBoundaryEdge(const TopoDS_Shape &edgeContainer, const SMESH_Mesh &mesh, std::list< TopoDS_Edge > *allBndEdges=0)
Return a boundary EDGE (or all boundary EDGEs) of edgeContainer.
Definition: StdMeshers_ProjectionUtils.cxx:2456
TopoDS_Edge GetEdgeByVertices(SMESH_Mesh *aMesh, const TopoDS_Vertex &V1, const TopoDS_Vertex &V2)
Finds an edge by its vertices in a main shape of the mesh.
Definition: StdMeshers_ProjectionUtils.cxx:1782
void SetEventListener(SMESH_subMesh *subMesh, TopoDS_Shape srcShape, SMESH_Mesh *srcMesh)
Set event listeners to submesh with projection algo.
Definition: StdMeshers_ProjectionUtils.cxx:2546
Struct used instead of a sole TopTools_DataMapOfShapeShape to avoid problems with bidirectional bindi...
Definition: StdMeshers_ProjectionUtils.hxx:63
EAssocType _assocType
Definition: StdMeshers_ProjectionUtils.hxx:68
bool IsBound(const TopoDS_Shape &s, const bool isShape2=false) const
Definition: StdMeshers_ProjectionUtils.hxx:73
TopTools_DataMapOfShapeShape _map1to2
Definition: StdMeshers_ProjectionUtils.hxx:64
void Clear()
Definition: StdMeshers_ProjectionUtils.hxx:77
int Extent() const
Definition: StdMeshers_ProjectionUtils.hxx:76
TopTools_DataMapOfShapeShape _map2to1
Definition: StdMeshers_ProjectionUtils.hxx:64
const TopoDS_Shape & operator()(const TopoDS_Shape &s, const bool isShape2=false) const
Definition: StdMeshers_ProjectionUtils.hxx:78
StdMeshers_ShapeShapeBiDirectionMap()
Definition: StdMeshers_ProjectionUtils.hxx:83
bool Bind(const TopoDS_Shape &s1, const TopoDS_Shape &s2)
Definition: StdMeshers_ProjectionUtils.hxx:71
void SetAssocType(EAssocType type)
Definition: StdMeshers_ProjectionUtils.hxx:84
bool IsEmpty() const
Definition: StdMeshers_ProjectionUtils.hxx:75
EAssocType
Definition: StdMeshers_ProjectionUtils.hxx:66
@ PARTNER
Definition: StdMeshers_ProjectionUtils.hxx:67
@ CLOSE_VERTEX
Definition: StdMeshers_ProjectionUtils.hxx:67
@ UNDEF
Definition: StdMeshers_ProjectionUtils.hxx:67
@ FEW_EF
Definition: StdMeshers_ProjectionUtils.hxx:67
@ COMMON_VERTEX
Definition: StdMeshers_ProjectionUtils.hxx:67
@ INIT_VERTEX
Definition: StdMeshers_ProjectionUtils.hxx:67
@ PROPAGATION
Definition: StdMeshers_ProjectionUtils.hxx:67
Definition: SMDS_MeshElement.hxx:209