2 // class : Gestion des aretes
4 // Copyright (C) 2009-2016 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
25 #include "HexVertex.hxx"
29 class HexaExport Edge : public EltBase
32 virtual Vertex* getVertex (int nro);
34 int addAssociation (NewShape* geom, int subid, double deb, double fin);
35 int setAssociation (NewShape* geom, int subid);
36 int findAssociation (NewShape* geom);
37 virtual void clearAssociation ();
38 void setColor (double valeur);
39 bool getWay () { return e_way ; }
42 Edge (Vertex* va, Vertex* vb);
46 virtual int countVertex () { return V_TWO; }
47 virtual void saveXml (XmlWriter* xml);
48 virtual void replaceVertex (Vertex* old, Vertex* nouveau);
51 int anaMerge (Vertex* orig, Vertex* couple[]);
52 bool definedBy (Vertex* v1, Vertex* v2);
54 void propager (Propagation* prop, int nro, int sens=1);
56 void setPropag (int nro, bool sens);
57 int getPropag () { return e_propag ; }
59 Quad* getParent (int nro);
64 virtual void majReferences();
66 int inter (Edge* other, int& nother);
67 int inter (Edge* other);
68 int index (Vertex* node);
69 Vertex* commonVertex (Edge* other);
70 Vertex* opposedVertex (Vertex* sommet);
71 double* commonPoint (Edge* other, double point[]);
73 Vertex* getAmont () { return e_vertex [NOT e_way] ; }
74 Vertex* getAval () { return e_vertex [e_way] ; }
76 Law* getLaw () { return e_law ; }
77 void setLaw (Law* law) { e_law = law ; }
79 void setScalar (double valeur) { setColor (valeur) ; }
81 virtual void duplicate ();
82 Edge* getClone () { return e_clone ; }
83 double* getVector (double vecteur[]);
84 string makeDefinition ();
86 int addAssociation (EdgeShape* gline, double deb, double fin);
87 int checkAssociation ();
88 int countAssociation () { return tab_assoc.size () ; }
89 AssoEdge* getAssociation (int nro);
94 Vertex* e_vertex [V_TWO];
97 bool e_way; // Sens de propagation
98 Law* e_law; // Le soleil brille, brille, brille