]> SALOME platform Git repositories - modules/hexablock.git/commitdiff
Salome HOME
Evol Hexa 7
authorabuhsing <abuhsing>
Wed, 6 Nov 2013 11:24:40 +0000 (11:24 +0000)
committerabuhsing <abuhsing>
Wed, 6 Nov 2013 11:24:40 +0000 (11:24 +0000)
src/HEXABLOCK/CMakeLists.txt
src/HEXABLOCK/HexDummyCad.hxx
src/HEXABLOCK/HexEdgeShape.cxx
src/HEXABLOCK/HexEdgeShape.hxx
src/HEXABLOCK/HexSubShape.cxx
src/HEXABLOCK/HexSubShape.hxx
src/HEXABLOCK/hexa_base.hxx

index abeb1ee2a0703c864d8690358830442f1d00784f..602cd3d4642f75fae5f372bc838fb3d4d320c161 100644 (file)
@@ -58,7 +58,6 @@ SET(_link_LIBRARIES
 # header files
 SET(HEXABLOCKEngine_HEADERS
   HexGroup.hxx
-  HexCylinder.hxx
   HexEdge.hxx
   HexGlobale.hxx
   HexPropagation.hxx
@@ -76,7 +75,6 @@ SET(HEXABLOCKEngine_HEADERS
   HexDocument.hxx
   HexEltBase.hxx
   Hex.hxx
-  HexPipe.hxx
   HexShape.hxx
   HexOldShape.hxx
   HexNewShape.hxx
@@ -87,7 +85,6 @@ SET(HEXABLOCKEngine_HEADERS
   HexBiCylinderShape.hxx
   HexAssoEdge.hxx
   HexXmlTree.hxx
-  HexCrossElements.hxx
   HexBiCylinder.hxx
   HexDumpStudy.hxx
   HexAnaQuads.hxx
@@ -117,9 +114,7 @@ SET(HEXABLOCKEngine_SOURCES
   HexElements_piq.cxx
   HexElements_asso.cxx
   HexElements_grid.cxx
-  HexCylinder.cxx
   HexGroup.cxx
-  HexPipe.cxx
   HexLaw.cxx
   HexShape.cxx
   HexNewShape.cxx
@@ -136,18 +131,14 @@ SET(HEXABLOCKEngine_SOURCES
   HexXmlTree.cxx
   HexXmlWriter.cxx
   HexDumpStudy.cxx
-  HexCrossElements.cxx
-  HexCrossElements_build.cxx
   HexBiCylinder.cxx
   Hex.cxx
   HexDocument_asso.cxx
   HexDocument_quads.cxx
-  HexDocument_del.cxx
   HexDocument_skin.cxx
   HexDocument_v6.cxx
   HexElements_v6.cxx
   HexElements_check.cxx
-  HexElements_del.cxx
   HexWitness.cxx
   Hex_salome.cxx
   test_unit.hxx
index d60e129bbb4953176bd9c12166340e77794b4278..db0a3185e6d59a7d46a01c5ad311ec4a20a78a6d 100644 (file)
@@ -56,7 +56,13 @@ class gp_Ax2;
 // -----------------------------------------------------------\r
 #define Standard_True true\r
 #define Handle(x) int\r
-enum {TopAbs_VERTEX,  TopAbs_EDGE,  TopAbs_FACE };\r
+                        // Extrait de TopAbs_ShapeEnum.hxx \r
+enum TopAbs_ShapeEnum {\r
+  TopAbs_COMPOUND, TopAbs_COMPSOLID, TopAbs_SOLID, TopAbs_SHELL,\r
+  TopAbs_FACE, TopAbs_WIRE, TopAbs_EDGE, TopAbs_VERTEX,\r
+  TopAbs_SHAPE\r
+};\r
+\r
 // -----------------------------------------------------------\r
 class gp_Pnt\r
 {\r
index 356bec1a5b0bff30ff4784ede3200dc6586059ef..5aed434e720f561207534bf5b19d4ef571319e3e 100755 (executable)
@@ -168,6 +168,14 @@ double EdgeShape::getParam (double* coord)
       return -1.0;
 
    GeomAdaptor_Curve  adapt_curve (handle);
+   kind_of   = (EnumKindOfShape) (adapt_curve.GetType() + 1);
+
+/******************
+   enum GeomAbs_CurveType { GeomAbs_Line, GeomAbs_Circle, GeomAbs_Ellipse,
+                            GeomAbs_Hyperbola, GeomAbs_Parabola, GeomAbs_BezierCurve,
+                            GeomAbs_BSplineCurve, GeomAbs_OtherCurve };
+ **********************/
+
    double abscis = GCPnts_AbscissaPoint::Length (adapt_curve, umin, gparam);
    double hparam = abscis/lin_length;
 
index 673d5440aaa7a8c43020f3888d59d6588cfe0f67..12b33eef24920773898845363601f50dec344205 100644 (file)
@@ -26,6 +26,7 @@ public :
     double  getParam  (double point[]);
     double  getLength ();
     int     onExtremity (double point[]);
+    bool    isLinear    ()                   { return kind_of == KS_Line ; }
 
     static bool samePoints (double point1[], double point2[]);
 
index 5195eb9404b00d2f590642ef974789dd851189ca..b978fb10cff54269e68bf1e4997fff653fcf58b3 100755 (executable)
@@ -41,6 +41,7 @@ SubShape::SubShape (NewShape* dad, int id, int dim)
    sub_ident  = id;
    sub_dim    = dim;
    maj_brep   = maj_shape = true;
+   kind_of    = KS_None;
 }
 // ====================================================== getShape
 const TopoDS_Shape& SubShape::getShape ()
index 7d1bf39f84c5970ded71c8ea93338659e4a8b302..a65fa8343602e90bffa105ec889d3666dc38fd99 100644 (file)
@@ -15,10 +15,11 @@ class HEXABLOCKENGINE_EXPORT SubShape : public EltBase
 {
 public :
     SubShape (NewShape* dad, int id, int dim);
-    NewShape*   getParentShape() const  { return ss_parent; }
-    cpchar      getParentName () const;
-    int         getIdent ()             { return sub_ident ; }
-    int         getDim   ()             { return sub_dim ; }
+    NewShape*       getParentShape() const  { return ss_parent; }
+    cpchar          getParentName () const;
+    int             getIdent ()             { return sub_ident ; }
+    int             getDim   ()             { return sub_dim ; }
+    EnumKindOfShape kindOf   ()             { return kind_of ; }
 
     const string&       getBrep  ();
     virtual const TopoDS_Shape& getShape ();
@@ -35,9 +36,10 @@ protected :
     int       sub_ident;
     int       sub_dim;     // 0 = point, 1 = arete, 2 = face;
 
-    TopoDS_Shape geo_shape;
-    string       geo_brep;
-    bool         maj_brep, maj_shape;
+    TopoDS_Shape    geo_shape;
+    string          geo_brep;
+    bool            maj_brep, maj_shape;
+    EnumKindOfShape kind_of;
 };
 END_NAMESPACE_HEXA
 #endif
index 62220aaddc5d0a30609b21908f1097b5363f75ed..e79dd9ed6787dc5f7707b16a3e572fd7dcf23347 100755 (executable)
@@ -173,6 +173,10 @@ enum EnumHVertex {V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF,
 
 enum EnumQDirection {Q_INSIDE, Q_DIRECT, Q_INVERSE, Q_UNDEFINED, Q_WAITING };
 
+enum EnumKindOfShape {KS_None, KS_Line, KS_Circle, KS_Ellipse, KS_Hyperbola,
+                      KS_Parabola, KS_BezierCurve, KS_BSplineCurve,
+                      KS_OtherCurve };
+
 enum { CylSmall=0, CylBig=1, NxInt=1, NxExt=2 };
 
 class Hex;