From: abuhsing Date: Wed, 6 Nov 2013 11:24:40 +0000 (+0000) Subject: Evol Hexa 7 X-Git-Tag: V7_3_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c4c0ac9f95ebcc5e6481a0ab6f844079ee0af6bc;p=modules%2Fhexablock.git Evol Hexa 7 --- diff --git a/src/HEXABLOCK/CMakeLists.txt b/src/HEXABLOCK/CMakeLists.txt index abeb1ee..602cd3d 100644 --- a/src/HEXABLOCK/CMakeLists.txt +++ b/src/HEXABLOCK/CMakeLists.txt @@ -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 diff --git a/src/HEXABLOCK/HexDummyCad.hxx b/src/HEXABLOCK/HexDummyCad.hxx index d60e129..db0a318 100644 --- a/src/HEXABLOCK/HexDummyCad.hxx +++ b/src/HEXABLOCK/HexDummyCad.hxx @@ -56,7 +56,13 @@ class gp_Ax2; // ----------------------------------------------------------- #define Standard_True true #define Handle(x) int -enum {TopAbs_VERTEX, TopAbs_EDGE, TopAbs_FACE }; + // Extrait de TopAbs_ShapeEnum.hxx +enum TopAbs_ShapeEnum { + TopAbs_COMPOUND, TopAbs_COMPSOLID, TopAbs_SOLID, TopAbs_SHELL, + TopAbs_FACE, TopAbs_WIRE, TopAbs_EDGE, TopAbs_VERTEX, + TopAbs_SHAPE +}; + // ----------------------------------------------------------- class gp_Pnt { diff --git a/src/HEXABLOCK/HexEdgeShape.cxx b/src/HEXABLOCK/HexEdgeShape.cxx index 356bec1..5aed434 100755 --- a/src/HEXABLOCK/HexEdgeShape.cxx +++ b/src/HEXABLOCK/HexEdgeShape.cxx @@ -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; diff --git a/src/HEXABLOCK/HexEdgeShape.hxx b/src/HEXABLOCK/HexEdgeShape.hxx index 673d544..12b33ee 100644 --- a/src/HEXABLOCK/HexEdgeShape.hxx +++ b/src/HEXABLOCK/HexEdgeShape.hxx @@ -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[]); diff --git a/src/HEXABLOCK/HexSubShape.cxx b/src/HEXABLOCK/HexSubShape.cxx index 5195eb9..b978fb1 100755 --- a/src/HEXABLOCK/HexSubShape.cxx +++ b/src/HEXABLOCK/HexSubShape.cxx @@ -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 () diff --git a/src/HEXABLOCK/HexSubShape.hxx b/src/HEXABLOCK/HexSubShape.hxx index 7d1bf39..a65fa83 100644 --- a/src/HEXABLOCK/HexSubShape.hxx +++ b/src/HEXABLOCK/HexSubShape.hxx @@ -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 diff --git a/src/HEXABLOCK/hexa_base.hxx b/src/HEXABLOCK/hexa_base.hxx index 62220aa..e79dd9e 100755 --- a/src/HEXABLOCK/hexa_base.hxx +++ b/src/HEXABLOCK/hexa_base.hxx @@ -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;