]> SALOME platform Git repositories - modules/hexablock.git/blob - src/HEXABLOCK/HexKasLine.hxx
Salome HOME
Merge from V6_main 01/04/2013
[modules/hexablock.git] / src / HEXABLOCK / HexKasLine.hxx
1 //
2 // CC++ : Interface Cascade de la ligne
3 //
4 // Copyright (C) 2009-2013  CEA/DEN, EDF R&D
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef __KAS_LINE_HXX_
24 #define __KAS_LINE_HXX_
25
26 #include "HexGlobale.hxx"
27
28 #ifndef NO_CASCADE
29
30 #include <gp_Pnt.hxx>
31 #include <BRepAdaptor_Curve.hxx>
32
33 BEGIN_NAMESPACE_HEXA
34
35 class KasPoint;
36
37 class KasLine
38 {
39 public :
40    KasLine ();
41    KasLine (Shape* shape, double deb=-1.0, double fin=-1.0);
42   ~KasLine ();
43  
44    int  findBound (double* point);
45    // void setAbscissa (double total, double& abscisse);
46    void inverser ();
47    void setBounds (double deb, double fin);
48
49    double* getStart  ()       { return start_coord ; }
50    double* getEnd    ()       { return end_coord   ; }
51    double  getLength ()       { return geom_length ; }
52    double  getRank   ()       { return geom_rang ; }
53
54    void defineLine (Shape* asso, double deb=-1.0, double fin=-1.0);
55    void setRank    (int rang, int sens, double& abscisse);
56    void associate  (Edge* edge, double sm1, double sm2, int orig=V_AMONT);
57    void assoEdge   (Edge* edge, double pm1, double pm2, int vass=NOTHING);
58    void assoPoint  (double alpha, Vertex* node);
59
60    double findParam  (double* point);
61
62 private :
63    void majCoord ();
64
65 private :
66    string lig_brep,  lig_ident, lig_ior;
67    double lig_debut, lig_fin;
68    double par_mini,  par_maxi;
69
70    bool   geom_inverse; 
71    int    geom_rang;
72    Real3  start_coord,  end_coord;
73    double start_absc, end_absc;        // Abscisse globale
74    double geom_length;
75    double geom_total_length;
76
77    gp_Pnt             start_gpoint, end_gpoint;
78    TopoDS_Edge        geom_line;
79    BRepAdaptor_Curve* geom_curve;
80 };
81 END_NAMESPACE_HEXA
82 #endif
83 #endif