2 // C++ : Quads Pattern (for replaceHexas)
4 // Copyright (C) 2009-2019 CEA/DEN, EDF R&D
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef __HEX_QPATTERN_H_
25 #include "HexGlobale.hxx"
32 // --------------------------------------------------------
33 class HexaExport QpatQuad
36 QpatQuad (Quad* refer=NULL);
37 void operator= (const QpatQuad& other);
44 // --------------------------------------------------------
45 class HexaExport QpatEdge
48 QpatEdge (Edge* refer=NULL);
49 void operator= (const QpatEdge& other);
57 // --------------------------------------------------------
58 class HexaExport QpatVertex
61 QpatVertex (Vertex* refer=NULL);
62 void operator= (const QpatVertex& other);
73 // --------------------------------------------------------
74 class HexaExport Qpattern
76 friend class Elements;
79 void setPattern (Vertices& contour, Quads& pattern);
80 void setTarget (Vertices& contour, Quads& target);
83 void getSize (int& nbq, int& nbed, int& nbv, int& prof);
85 void anaTarget (double tmin[], double tmax[], double centre[]);
86 Vertex* getTargetVertex (int nro)
87 { return old_contour [nro] ; }
90 int setOrigin (double* v1, double* v2, double* v3);
91 int addQuad (Quad* quad);
92 int addEdge (Edge* edge);
93 int addVertex (Vertex* vertex, Vertex* ref=NULL);
94 void projeter (Vertex* vertex, double& ux, double& uy);
97 std::vector <QpatVertex> pat_vertex;
98 std::vector <QpatEdge > pat_edge;
99 std::vector <QpatQuad > pat_quad;
101 Quads old_top, old_bottom;
103 Vertices old_contour;
105 int nbr_vertex, nbr_edges, nbr_quads;
107 Real3 base_i, base_j, origine;
108 double ux_mini, uy_mini, ux_delta, uy_delta;
111 int pos_edge3, pos_edge4;