From: ageay Date: Thu, 16 Feb 2012 13:45:19 +0000 (+0000) Subject: Addition of polyline type. X-Git-Tag: V6_main_FINAL~859 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0f1497f6fcabf4081f43a73de6c7c6d310bdf4a;p=tools%2Fmedcoupling.git Addition of polyline type. --- diff --git a/src/INTERP_KERNEL/Bases/NormalizedUnstructuredMesh.hxx b/src/INTERP_KERNEL/Bases/NormalizedUnstructuredMesh.hxx index a5520aeb3..4421cd65b 100644 --- a/src/INTERP_KERNEL/Bases/NormalizedUnstructuredMesh.hxx +++ b/src/INTERP_KERNEL/Bases/NormalizedUnstructuredMesh.hxx @@ -35,6 +35,7 @@ namespace INTERP_KERNEL NORM_SEG2 = 1, NORM_SEG3 = 2, NORM_TRI3 = 3, + NORM_POLYL = 33, NORM_QUAD4 = 4, NORM_POLYGON = 5, NORM_TRI6 = 6, @@ -52,7 +53,7 @@ namespace INTERP_KERNEL NORM_HEXA20 = 30, NORM_POLYHED = 31, NORM_ERROR = 40, - NORM_MAXTYPE = 32 + NORM_MAXTYPE = 33 } NormalizedCellType; class GenericMesh diff --git a/src/INTERP_KERNEL/CellModel.cxx b/src/INTERP_KERNEL/CellModel.cxx index da006cbb6..4c1ea74dd 100644 --- a/src/INTERP_KERNEL/CellModel.cxx +++ b/src/INTERP_KERNEL/CellModel.cxx @@ -34,7 +34,7 @@ namespace INTERP_KERNEL "NORM_PYRA5", "NORM_PENTA6", "", "NORM_HEXA8", "",//15->19 "NORM_TETRA10", "", "NORM_HEXGP12", "NORM_PYRA13", "",//20->24 "NORM_PENTA15", "", "", "", "",//25->29 - "NORM_HEXA20", "NORM_POLYHED", "NORM_QPOLYG", "", "",//30->34 + "NORM_HEXA20", "NORM_POLYHED", "NORM_QPOLYG", "NORM_POLYL", "",//30->34 "", "", "", "", "",//35->39 "NORM_ERROR"}; @@ -98,6 +98,7 @@ namespace INTERP_KERNEL _map_of_unique_instance.insert(std::make_pair(NORM_POLYGON,CellModel(NORM_POLYGON))); _map_of_unique_instance.insert(std::make_pair(NORM_POLYHED,CellModel(NORM_POLYHED))); _map_of_unique_instance.insert(std::make_pair(NORM_QPOLYG,CellModel(NORM_QPOLYG))); + _map_of_unique_instance.insert(std::make_pair(NORM_POLYL,CellModel(NORM_POLYL))); } CellModel::CellModel(NormalizedCellType type):_type(type) @@ -281,6 +282,10 @@ namespace INTERP_KERNEL _nb_of_pts=0; _nb_of_sons=0; _dim=2; _dyn=true; _is_simplex=false; _quadratic=true; } break; + case NORM_POLYL: + { + _nb_of_pts=0; _nb_of_sons=0; _dim=1; _dyn=true; _extruded_type=NORM_POLYGON; _is_simplex=false; + } case NORM_ERROR: { _nb_of_pts=std::numeric_limits::max(); _nb_of_sons=std::numeric_limits::max(); _dim=std::numeric_limits::max(); @@ -303,6 +308,8 @@ namespace INTERP_KERNEL else return lgth/2; } + else if(_dim==1) + return lgth;//NORM_POLYL else return std::count(conn,conn+lgth,-1)+1; } @@ -321,6 +328,8 @@ namespace INTERP_KERNEL else return NORM_SEG3; } + else if(_dim==1) + return NORM_ERROR;//NORM_POLYL //polyedron return NORM_POLYGON; } @@ -360,7 +369,7 @@ namespace INTERP_KERNEL return 3; } } - else + else if(_dim==3) {//polyedron const int *where=nodalConn; for(int i=0;i