]> SALOME platform Git repositories - modules/hexablock.git/blob - src/HEXABLOCK/HexSubShape.hxx
Salome HOME
Evol Hexa 7
[modules/hexablock.git] / src / HEXABLOCK / HexSubShape.hxx
1
2 // class : Gestion des formes associees (Hexa 5)
3
4 #ifndef __SUB_SHAPE_H_
5 #define __SUB_SHAPE_H_
6
7 #include "Hex_defines.hxx"
8 #include "HexEltBase.hxx"
9
10 #include <TopoDS_Shape.hxx>
11
12 BEGIN_NAMESPACE_HEXA
13
14 class HEXABLOCKENGINE_EXPORT SubShape : public EltBase
15 {
16 public :
17     SubShape (NewShape* dad, int id, int dim);
18     NewShape*       getParentShape() const  { return ss_parent; }
19     cpchar          getParentName () const;
20     int             getIdent ()             { return sub_ident ; }
21     int             getDim   ()             { return sub_dim ; }
22     EnumKindOfShape kindOf   ()             { return kind_of ; }
23
24     const string&       getBrep  ();
25     virtual const TopoDS_Shape& getShape ();
26
27     void   saveXml (XmlWriter* xml);
28     void   callXml (XmlWriter* xml);
29
30 protected :
31     void updateShape  ();
32     void updateBrep   ();
33
34 protected :
35     NewShape* ss_parent;
36     int       sub_ident;
37     int       sub_dim;     // 0 = point, 1 = arete, 2 = face;
38
39     TopoDS_Shape    geo_shape;
40     string          geo_brep;
41     bool            maj_brep, maj_shape;
42     EnumKindOfShape kind_of;
43 };
44 END_NAMESPACE_HEXA
45 #endif