1 // Copyright (C) 2006-2020 EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "MeshCut_Carre.hxx"
24 using namespace MESHCUT;
27 Carre::Carre(float _x0, float _x1, float _y0, float _y1)
35 bool Carre::disjoint(Carre* c2)
37 return (x0 > c2->x1 || x1 < c2->x0 || y0 > c2->y1 || y1 < c2->y0);
40 bool Carre::contientNoeud(int ngnoeud, Maillage *MAILLAGE)
42 float x = *(MAILLAGE->XX + ngnoeud - 1);
43 float y = *(MAILLAGE->YY + ngnoeud - 1);
44 return (x >= x0 && x <= x1 && y >= y0 && y <= y1);
47 void Carre::affichage()
49 cout << "x0=" << x0 << " ";
50 cout << "x1=" << x1 << " ";
51 cout << "y0=" << y0 << " ";
52 cout << "y1=" << y1 << " ";