Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCK / HexNewShape.hxx
index 935cc7a314384d15530503901acf79bea6f1a164..9507a65c49bf2bf7ea45c7d32730ccd05f1b1811 100644 (file)
@@ -1,12 +1,12 @@
 
 // class : Gestion des formes associees (Hexa 5)
 
-// Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,7 @@
 
 #include "HexEltBase.hxx"
 
-#ifndef NO_CASCADE
+#ifndef SWIG
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Compound.hxx>
@@ -34,7 +34,7 @@
 
 BEGIN_NAMESPACE_HEXA
 
-class NewShape : public EltBase
+class HexaExport NewShape : public EltBase
 {
 public :         // for TUI
    virtual int countVertex ()   { return tab_vertex.size ();  }
@@ -49,17 +49,19 @@ public :         // for TUI
    cpchar getNameEdge    (int nro);
    cpchar getNameFace    (int nro);
 
-   const string&       getBrep ();
-   const TopoDS_Shape& getShape ();
+   NewShape (Document* dad, EnumShape type=SH_NONE);
 
+#ifndef SWIG
 public :         // for GUI
+   cpchar              getBrep ();
+   const TopoDS_Shape& getShape ();
+
    EnumShape    getOrigin ()        { return sh_origin ; }
    VertexShape* getVertexShape (int nro);
    EdgeShape*   getEdgeShape (int nro);
    FaceShape*   getFaceShape (int nro);
 
 public :         // for Others
-   NewShape (Document* dad, EnumShape type=SH_NONE);
    void  setShape (const TopoDS_Shape& shape, EnumShape type=SH_IMPORT);
    void  setBrep  (rcstring brep);
    int   addPoint (double* coord);
@@ -68,11 +70,14 @@ public :         // for Others
    void  addAssociation (Quad*   elt, int subid);
 
    VertexShape* findVertex   (int subid);
+   VertexShape* findVertex   (double point[]);
    EdgeShape*   findEdge     (int subid);
+   EdgeShape*   findEdge     (double p1[], double p2[]);
    FaceShape*   findFace     (int subid);
 
    SubShape*    findSubShape (int subid);
 
+
    const TopoDS_Shape& getGeoShape (int subid);
 
    int   saveBrep ();
@@ -81,6 +86,8 @@ public :         // for Others
    void openShape ();
    int  addCircle (double* center, double rad, double* norm, double* base);
    int  addSphere (double* center, double radius);
+   int  transfoShape   (Matrix& matrix, SubShape* shape);
+   int  translateShape (double  dir[],  SubShape* shape);
    void closeShape();
 
 private :
@@ -96,7 +103,7 @@ private :     // ________________________________________________________
    TopoDS_Shape    geo_shape;
 
    EnumShape    sh_origin;
-   string       geo_brep;
+   std::string  geo_brep;
    bool         brep_defined, shape_defined;
 
    TopTools_IndexedMapOfShape map_shape;
@@ -120,6 +127,7 @@ private :     // ________________________________________________________
    int sh_face_max;
    int sh_edge_max;
    int sh_vertex_max;
+#endif
 };
 END_NAMESPACE_HEXA
 #endif