diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt index cd774b2..c9f7a89 100644 --- a/Docs/CMakeLists.txt +++ b/Docs/CMakeLists.txt @@ -47,12 +47,8 @@ set(DOXYGEN_DIRS ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyTransfinite.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyDelaunayGMSH.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyQuadPairing.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyDirectional.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyOrthogonal.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyRotational.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyTransfinite.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyDelaunayTetgen.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyInsertion.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Mesh/MeshManagerIfc.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Mesh/MeshModificationBySepa.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Smoothing/SurfacicSmoothing.h diff --git a/src/Core/Internal/ServiceGeomToTopo.cpp b/src/Core/Internal/ServiceGeomToTopo.cpp index 5ff6684..5295061 100644 --- a/src/Core/Internal/ServiceGeomToTopo.cpp +++ b/src/Core/Internal/ServiceGeomToTopo.cpp @@ -19,7 +19,6 @@ #include "Topo/Vertex.h" #include "Topo/EdgeMeshingPropertyUniform.h" #include "Topo/CoEdgeMeshingProperty.h" -#include "Topo/BlockMeshingPropertyInsertion.h" #include "Geom/Volume.h" #include "Geom/Surface.h" @@ -102,13 +101,6 @@ bool ServiceGeomToTopo::convertBlockStructured(const int ni, const int nj, const return true; } /*----------------------------------------------------------------------------*/ -void ServiceGeomToTopo::convertInsertionBlock() -{ - Topo::Block* bloc = getBlock(); - Topo::BlockMeshingPropertyInsertion mp; - bloc->switchBlockMeshingProperty(m_icmd, &mp); -} -/*----------------------------------------------------------------------------*/ Topo::Block* ServiceGeomToTopo::getBlock() { return getBlock(m_volume); diff --git a/src/Core/Mesh/MeshImplementation.cpp b/src/Core/Mesh/MeshImplementation.cpp index 163172c..3ffaedf 100644 --- a/src/Core/Mesh/MeshImplementation.cpp +++ b/src/Core/Mesh/MeshImplementation.cpp @@ -1082,14 +1082,11 @@ void MeshImplementation::mesh(Mesh::CommandCreateMesh* command, Topo::Block* bl) if (getContext().getMeshDim() == Internal::ContextIfc::MESH2D) throw TkUtil::Exception (TkUtil::UTF8String ("Il n'est pas possible de mailler des blocs alors que le maillage n'est pas 3D en sortie", TkUtil::Charset::UTF_8)); - if (Topo::BlockMeshingProperty::insertion != bl->getMeshLaw()){ - - std::vector faces; - bl->getFaces(faces); - for (uint i=0; i faces; + bl->getFaces(faces); + for (uint i=0; isaveBlockMeshingData(&command->getInfoCommand()); @@ -1099,20 +1096,11 @@ void MeshImplementation::mesh(Mesh::CommandCreateMesh* command, Topo::Block* bl) else if (bl->getMeshLaw() == Topo::BlockMeshingProperty::delaunayTetgen){ meshDelaunayTetgen(command,bl); } - else if (bl->getMeshLaw() == Topo::BlockMeshingProperty::insertion){ - meshInsertion(command,bl); - } else { throw TkUtil::Exception (TkUtil::UTF8String ("MeshImplementation::mesh(Topo::Block* bl) pour une méthode inconnue", TkUtil::Charset::UTF_8)); } bl->getMeshingData()->setMeshed(true); } // end if (!bl->isMeshed()) - else { - if (bl->getMeshLaw() == Topo::BlockMeshingProperty::insertion) { - throw TkUtil::Exception (TkUtil::UTF8String ("MeshImplementation::mesh(Topo::Block* bl) pour la méthode " - "insertion alors que le bloc est déjà maillé", TkUtil::Charset::UTF_8)); - } - } } /*----------------------------------------------------------------------------*/ diff --git a/src/Core/Mesh/MeshImplementationInsertion.cpp b/src/Core/Mesh/MeshImplementationInsertion.cpp index 83360b6..43f583c 100644 --- a/src/Core/Mesh/MeshImplementationInsertion.cpp +++ b/src/Core/Mesh/MeshImplementationInsertion.cpp @@ -14,7 +14,6 @@ #include "Topo/Block.h" #include "Topo/Face.h" #include "Topo/Edge.h" -#include "Topo/BlockMeshingPropertyInsertion.h" #include "Utils/Common.h" #include "Internal/Context.h" diff --git a/src/Core/Mesh/MeshImplementationStructured.cpp b/src/Core/Mesh/MeshImplementationStructured.cpp index 114f6af..4bf5c77 100644 --- a/src/Core/Mesh/MeshImplementationStructured.cpp +++ b/src/Core/Mesh/MeshImplementationStructured.cpp @@ -21,9 +21,6 @@ #include "Topo/FaceMeshingPropertyOrthogonal.h" #include "Topo/FaceMeshingPropertyRotational.h" #include "Topo/BlockMeshingData.h" -#include "Topo/BlockMeshingPropertyRotational.h" -#include "Topo/BlockMeshingPropertyDirectional.h" -#include "Topo/BlockMeshingPropertyOrthogonal.h" #include "Topo/TopoHelper.h" #include "Utils/Common.h" @@ -102,10 +99,6 @@ void MeshImplementation::preMeshStrutured(Topo::Block* bl) TkUtil::UTF8String message1 (TkUtil::Charset::UTF_8); message1 <<"Maillage du bloc structuré "<getName()<<" avec la méthode " << bl->getMeshLawName(); - if (bl->getMeshLaw() == Topo::BlockMeshingProperty::rotational - || bl->getMeshLaw() == Topo::BlockMeshingProperty::directional - || bl->getMeshLaw() == Topo::BlockMeshingProperty::orthogonal) - message1 << " et direction "<<(short)bl->getBlockMeshingProperty()->getDir(); std::vector groupsName; bl->getGroupsName(groupsName); message1 << "\n GroupsName :"; @@ -339,130 +332,6 @@ void MeshImplementation::preMeshStrutured(Topo::Block* bl) if (bl->getMeshLaw() == Topo::BlockMeshingProperty::transfinite){ discretiseTransfinie(nbBrasI, nbBrasJ, nbBrasK, l_points); - } - else if (bl->getMeshLaw() == Topo::BlockMeshingProperty::rotational){ - - Topo::BlockMeshingPropertyRotational* bmp = dynamic_cast(bl->getBlockMeshingProperty()); - CHECK_NULL_PTR_ERROR(bmp); - Utils::Math::Point axis1; - Utils::Math::Point axis2; - bmp->getAxis(axis1, axis2); - uint dir = bmp->getDir(); - - discretiseRotation(nbBrasI, nbBrasJ, nbBrasK, l_points, axis1, axis2, dir); - - } - else if (bl->getMeshLaw() == Topo::BlockMeshingProperty::directional - || bl->getMeshLaw() == Topo::BlockMeshingProperty::orthogonal){ - Topo::BlockMeshingPropertyDirectional* bmp = dynamic_cast(bl->getBlockMeshingProperty()); - CHECK_NULL_PTR_ERROR(bmp); - uint dir = bmp->getDir(); - Topo::CoEdgeMeshingProperty *empDir[3]; - uint nbBrasDir[3]; - nbBrasDir[0] = nbBrasI; - nbBrasDir[1] = nbBrasJ; - nbBrasDir[2] = nbBrasK; - - std::vector iCoedges[3]; - bl->getOrientedCoEdges(iCoedges[0], iCoedges[1], iCoedges[2]); - - // recherche des ratios par arête dans le bloc - std::map ratios; - bl->getRatios(ratios); - - // construction d'un tableau avec les 8 sommets en duplicant les sommets en cas de dégénérescence - std::vector sommets; - bl->getHexaVertices(sommets); - - uint dir_bl = bl->getBlockMeshingProperty()->getDir(); - for (uint i=0; i<3; i++) - if (dir_bl != i) - empDir[i] = new Topo::EdgeMeshingPropertyUniform(nbBrasDir[i]); - else - empDir[i] = 0; - - // recherche parmis les arêtes suivant la direction, si l'une d'elle ne serait composée que d'1 CoEdge - for (uint j=0; j<4; j++){ - Topo::Vertex* vtx1 = sommets[Topo::TopoHelper::tabIndVtxByEdgeAndDirOnBlock[bl->getBlockMeshingProperty()->getDir()][j][0]]; - Topo::Vertex* vtx2 = sommets[Topo::TopoHelper::tabIndVtxByEdgeAndDirOnBlock[bl->getBlockMeshingProperty()->getDir()][j][1]]; - - if (vtx1 != vtx2 && empDir[dir_bl] == 0){ - std::vector coedges_between; - Topo::TopoHelper::getCoEdgesBetweenVertices(vtx1, vtx2, iCoedges[dir_bl], coedges_between); - - if (coedges_between.size() == 1){ - - // recherche s'il n'y aurait pas un déraffinement de cette arête - // si c'est le cas, on ne réutilise pas MeshingProperty de cette arête. - Topo::CoEdge* coedge = coedges_between[0]; - - if (ratios[coedge] == 1){ - empDir[dir_bl] = coedge->getMeshingProperty()->clone(); - - if (coedge->getVertex(0) != vtx1) - empDir[dir_bl]->setDirect(!empDir[dir_bl]->getDirect()); -#ifdef _DEBUG_MESH - std::cout<<" réutilisation de la discrétisation de l'arête "<getName()< edge_points; - for (uint j=0; j<4; j++){ - Topo::Vertex* vtx1 = sommets[Topo::TopoHelper::tabIndVtxByEdgeAndDirOnBlock[bl->getBlockMeshingProperty()->getDir()][j][0]]; - Topo::Vertex* vtx2 = sommets[Topo::TopoHelper::tabIndVtxByEdgeAndDirOnBlock[bl->getBlockMeshingProperty()->getDir()][j][1]]; - - if (vtx1 != vtx2 && edge_points.empty()){ - std::vector coedges_between; - Topo::TopoHelper::getCoEdgesBetweenVertices(vtx1, vtx2, iCoedges[dir_bl], coedges_between); - Topo::TopoHelper::getPoints(vtx1, vtx2, coedges_between, ratios, edge_points); - } - } - - if (edge_points.empty()){ - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message << "Le bloc "<getName() <<" ne respecte certainement pas le type de discrétisation\n"; - message << "du fait d'un découpage de toutes ses arêtes communes ou d'un déraffinement"; - getContext().getLogStream()->log(TkUtil::TraceLog (message, TkUtil::Log::INFORMATION)); - - empDir[dir_bl] = new Topo::EdgeMeshingPropertyUniform(nbBrasDir[dir_bl]); - } - else { - // calcul des longueurs des bras - std::vector tabulation; - for (uint i=1; igetMeshLaw() == Topo::BlockMeshingProperty::orthogonal){ - Topo::BlockMeshingPropertyOrthogonal* bmp2 = dynamic_cast(bmp); - CHECK_NULL_PTR_ERROR(bmp2); - uint side = bmp2->getSide(); - uint nbLayers = bmp2->getNbLayers(); - // recherche de la surface / laquelle il faut être orthogonal - Geom::Surface* surface = 0; - Topo::Face* face = bl->getFace(dir*2+side); - std::vector cofaces; - face->getCoFaces(cofaces); - for (uint i=0; igetGeomAssociation() != 0) - surface = dynamic_cast(cofaces[i]->getGeomAssociation()); - discretiseOrthogonalPuisCourbe(empDir[0], empDir[1], empDir[2], l_points, dir, side, nbLayers, surface); - } - else - discretiseDirection(empDir[0], empDir[1], empDir[2], l_points, dir); - - for (uint i=0; i<3; i++) - delete empDir[i]; } else { throw TkUtil::Exception (TkUtil::UTF8String ("Erreur interne dans MeshImplementation::meshStrutured pour block, type de maillage invalide", TkUtil::Charset::UTF_8)); } diff --git a/src/Core/Topo/Block.cpp b/src/Core/Topo/Block.cpp index fb26761..a64e3ea 100644 --- a/src/Core/Topo/Block.cpp +++ b/src/Core/Topo/Block.cpp @@ -28,9 +28,6 @@ #include "Topo/FaceMeshingPropertyRotational.h" #include "Topo/FaceMeshingPropertyTransfinite.h" #include "Topo/FaceMeshingPropertyDelaunayGMSH.h" -#include "Topo/BlockMeshingPropertyDirectional.h" -#include "Topo/BlockMeshingPropertyOrthogonal.h" -#include "Topo/BlockMeshingPropertyRotational.h" #include "Topo/BlockMeshingPropertyTransfinite.h" #include "Topo/BlockMeshingPropertyDelaunayTetgen.h" @@ -158,9 +155,7 @@ Block(Internal::Context& ctx, } /*----------------------------------------------------------------------------*/ Block:: -Block(Internal::Context& ctx, int ni, int nj, int nk, - BlockMeshingProperty::meshLaw ml, - BlockMeshingProperty::meshDirLaw md) +Block(Internal::Context& ctx, int ni, int nj, int nk) : TopoEntity(ctx, ctx.newProperty(Utils::Entity::TopoBlock), ctx.newDisplayProperties(Utils::Entity::TopoBlock)) @@ -175,11 +170,7 @@ Block(Internal::Context& ctx, int ni, int nj, int nk, message1 << "Block::Block(), dans le cas structuré\n"; log (TkUtil::TraceLog (message1, TkUtil::Log::TRACE_4)); - // NB, il manque l'axe de rotation pour construire un BlockMeshingPropertyRotational - if (ml == BlockMeshingProperty::directional) - m_mesh_property =new BlockMeshingPropertyDirectional(md); - else - m_mesh_property =new BlockMeshingPropertyTransfinite(); + m_mesh_property = new BlockMeshingPropertyTransfinite(); // bloc avec les sommets équivalents à ceux d'une boite de taille 1 @@ -701,55 +692,9 @@ getRepresentation(Utils::DisplayRepresentation& dr, bool checkDestroyed) const TopoHelper::getCoEdgesBetweenVertices(getVertex(0), getVertex(4), kCoedges, coedges_dirK); // on va prendre la coedge1 et vect1 qui suivent le sens de la discrétisation (s'il y en a un) - CoEdge* coedge1=0; - CoEdge* coedge2=0; - CoEdge* coedge3=0; - - if (m_mesh_property->getMeshLaw() == BlockMeshingProperty::directional - || m_mesh_property->getMeshLaw() == BlockMeshingProperty::orthogonal){ - BlockMeshingPropertyDirectional* mp = dynamic_cast(m_mesh_property); - CHECK_NULL_PTR_ERROR(mp); - if (mp->getDir() == 1){ - coedge1 = coedges_dirJ[0]; - coedge2 = coedges_dirI[0]; - coedge3 = coedges_dirK[0]; - } - else if (mp->getDir() == 2){ - coedge1 = coedges_dirK[0]; - coedge2 = coedges_dirJ[0]; - coedge3 = coedges_dirI[0]; - } - else { - coedge1 = coedges_dirI[0]; - coedge2 = coedges_dirJ[0]; - coedge3 = coedges_dirK[0]; - } - } - else if (m_mesh_property->getMeshLaw() == BlockMeshingProperty::rotational){ - BlockMeshingPropertyRotational* mp = dynamic_cast(m_mesh_property); - CHECK_NULL_PTR_ERROR(mp); - if (mp->getDir() == 1){ - coedge1 = coedges_dirJ[0]; - coedge2 = coedges_dirI[0]; - coedge3 = coedges_dirK[0]; - } - else if (mp->getDir() == 2){ - coedge1 = coedges_dirK[0]; - coedge2 = coedges_dirJ[0]; - coedge3 = coedges_dirI[0]; - } - else { - coedge1 = coedges_dirI[0]; - coedge2 = coedges_dirJ[0]; - coedge3 = coedges_dirK[0]; - } - } - else { - coedge1 = coedges_dirI[0]; - coedge2 = coedges_dirJ[0]; - coedge3 = coedges_dirK[0]; - } - + CoEdge* coedge1 = coedges_dirI[0]; + CoEdge* coedge2 = coedges_dirJ[0]; + CoEdge* coedge3 = coedges_dirK[0]; std::vector points_coedge1; std::vector points_coedge2; @@ -840,48 +785,6 @@ getRepresentation(Utils::DisplayRepresentation& dr, bool checkDestroyed) const std::cout<<" vect2 : "<getMeshLaw() == BlockMeshingProperty::rotational){ - BlockMeshingPropertyRotational* mp = dynamic_cast(m_mesh_property); - CHECK_NULL_PTR_ERROR(mp); - Utils::Math::Point axis1, axis2; - mp->getAxis(axis1, axis2); - - // on cherche à minimiser la distance entre l'axe et l'un des points - // avec l'une des options pour la direction - Utils::Math::Point option1 = (vect1*0.5+vect2*(0.5+0.1)+vect3*(0.5))*ratio+orig; - Utils::Math::Point option2 = (vect1*0.5+vect2*(0.5-0.1)+vect3*(0.5))*ratio+orig; - Utils::Math::Point option3 = (vect1*0.5+vect2*(0.5)+vect3*(0.5+0.1))*ratio+orig; - Utils::Math::Point option4 = (vect1*0.5+vect2*(0.5)+vect3*(0.5-0.1))*ratio+orig; - - uint best_option = 1; - double dist = (axis1-option1).norme2(); - - if ((axis1-option2).norme2()getMeshLaw() == BlockMeshingProperty::directional - || m_mesh_property->getMeshLaw() == BlockMeshingProperty::orthogonal){ - points.push_back(vect1*1.1+vect2*0.2+vect3*0.4); - points.push_back(vect1*1.1+vect2*0.6+vect3*0.4); - points.push_back(vect1*1.1+vect2*0.4+vect3*0.2); - points.push_back(vect1*1.1+vect2*0.4+vect3*0.6); - points.push_back(vect1*1.3+vect2*0.4+vect3*0.4); - } - else if (m_mesh_property->getMeshLaw() == BlockMeshingProperty::rotational){ - if (dec2>0.0){ - points.push_back(vect1*1.2+vect2*0.5+vect3*0.4); - points.push_back(vect1*1.0+vect2*0.7+vect3*0.4); - points.push_back(vect1*1.1+vect2*0.6+vect3*0.2); - points.push_back(vect1*1.1+vect2*0.6+vect3*0.6); - points.push_back(vect1*1.2+vect2*0.7+vect3*0.4); - } else if (dec2<0.0){ - points.push_back(vect1*1.2+vect2*0.3+vect3*0.4); - points.push_back(vect1*1.0+vect2*0.1+vect3*0.4); - points.push_back(vect1*1.1+vect2*0.2+vect3*0.2); - points.push_back(vect1*1.1+vect2*0.2+vect3*0.6); - points.push_back(vect1*1.2+vect2*0.1+vect3*0.4); - } else if (dec3>0.0){ - points.push_back(vect1*1.2+vect3*0.5+vect2*0.4); - points.push_back(vect1*1.0+vect3*0.7+vect2*0.4); - points.push_back(vect1*1.1+vect3*0.6+vect2*0.2); - points.push_back(vect1*1.1+vect3*0.6+vect2*0.6); - points.push_back(vect1*1.2+vect3*0.7+vect2*0.4); - } else if (dec3<0.0){ - points.push_back(vect1*1.2+vect3*0.3+vect2*0.4); - points.push_back(vect1*1.0+vect3*0.1+vect2*0.4); - points.push_back(vect1*1.1+vect3*0.2+vect2*0.2); - points.push_back(vect1*1.1+vect3*0.2+vect2*0.6); - points.push_back(vect1*1.2+vect3*0.1+vect2*0.4); - } - } if (points.size() > 32){ indices.push_back(19); indices.push_back(36); indices.push_back(32); indices.push_back(36); @@ -1015,26 +883,6 @@ getRepresentation(Utils::DisplayRepresentation& dr, bool checkDestroyed) const indices.push_back(34); indices.push_back(36); indices.push_back(35); indices.push_back(36); } - if (m_mesh_property->getMeshLaw() == BlockMeshingProperty::orthogonal){ - uint id = points.size(); - points.push_back(vect1*0.5+vect2*0.4+vect3*0.4); - points.push_back(vect1*0.4+vect2*0.5+vect3*0.4); - points.push_back(vect1*0.4+vect2*0.4+vect3*0.5); - points.push_back(vect1*0.5+vect2*0.5+vect3*0.4); - points.push_back(vect1*0.4+vect2*0.5+vect3*0.5); - points.push_back(vect1*0.5+vect2*0.4+vect3*0.5); - //points.push_back(vect1*0.5+vect2*0.5+vect3*0.5); - indices.push_back(id+0); indices.push_back(id+3); - indices.push_back(id+1); indices.push_back(id+3); - indices.push_back(id+1); indices.push_back(id+4); - indices.push_back(id+2); indices.push_back(id+4); - indices.push_back(id+0); indices.push_back(id+5); - indices.push_back(id+2); indices.push_back(id+5); -// indices.push_back(id+3); indices.push_back(id+6); -// indices.push_back(id+4); indices.push_back(id+6); -// indices.push_back(id+5); indices.push_back(id+6); - } - } // end if (isStructured()) else { @@ -2759,20 +2607,9 @@ split(CoEdge* arete, double ratio, timer.reset(); timer.start(); #endif - if (getMeshLaw() == BlockMeshingProperty::directional){ - // pour le cas d'un découpage unidirectionnel, - // on recherche une direction acceptable dans les 2 blocs -#ifdef _DEBUG_SPLIT - std::cout<<" cas d'un bloc ("<selectBasicMeshLaw(icmd); - block_2->selectBasicMeshLaw(icmd); - } - else { - // on clone la méthode de discrétiasation - block_1->switchBlockMeshingProperty(icmd, getBlockMeshingProperty()); - block_2->switchBlockMeshingProperty(icmd, getBlockMeshingProperty()); - } + // on clone la méthode de discrétiasation + block_1->switchBlockMeshingProperty(icmd, getBlockMeshingProperty()); + block_2->switchBlockMeshingProperty(icmd, getBlockMeshingProperty()); #ifdef _DEBUG_TIMER timer.stop(); std::cout<<" sélection du type de maillage en "< filtre_sommets; - // mémorisation de la direction à l'aide d'un couple de sommets - Topo::Vertex* dirVertex1; - Topo::Vertex* dirVertex2; - if (getMeshLaw() == BlockMeshingProperty::directional - || getMeshLaw() == BlockMeshingProperty::orthogonal){ - BlockMeshingPropertyDirectional* prop = - dynamic_cast(getBlockMeshingProperty()); - CHECK_NULL_PTR_ERROR(prop); - dirVertex1 = getVertex(0); - uint dir = prop->getDir(); - if (dir == 0) - dirVertex2 = getVertex(1); - else if (dir == 1) - dirVertex2 = getVertex(2); - else if (dir == 2) - dirVertex2 = getVertex(4); - } - // les arêtes du bloc std::vector edges; getEdges(edges); @@ -3275,13 +3094,6 @@ permuteToKmaxFace(uint id, Internal::InfoCommand* icmd) m_topo_property->getFaceContainer().clear(); m_topo_property->getFaceContainer().add(sorted_faces); - // on recherche la direction initiale - if (getMeshLaw() == BlockMeshingProperty::directional){ - BlockMeshingPropertyDirectional* prop = new BlockMeshingPropertyDirectional(dirVertex1->getCoord(), dirVertex2->getCoord()); - prop->initDir(this); - switchBlockMeshingProperty(icmd, prop); - delete prop; - } #ifdef _DEBUG_PERM std::cout<<" ==> Block : "<<*this< iCoedges[3]; - eDirOnBlock dir = unknown; - if (new_ppty->getMeshLaw() == BlockMeshingProperty::directional - || new_ppty->getMeshLaw() == BlockMeshingProperty::rotational){ - getOrientedCoEdges(iCoedges[0], iCoedges[1], iCoedges[2]); - dir = (eDirOnBlock)new_ppty->getDir(); - } - std::vector faces; getFaces(faces); for (std::vector::iterator iter1 = faces.begin(); @@ -3504,21 +3306,12 @@ setMeshLaw(BlockMeshingProperty* new_ppty) Topo::CoFace* coface = face->getCoFace(j); // cas où on affecte une méthode structurée - if (new_ppty->isStructured()){ - - if (new_ppty->getMeshLaw() == BlockMeshingProperty::transfinite) { - FaceMeshingPropertyTransfinite* prop = new FaceMeshingPropertyTransfinite(); - CoFaceMeshingProperty* old_prop = coface->setProperty(prop); - delete old_prop; - } - else { - // il faut retrouver la direction par rapport à la face - // et l'affecter si possible - _setDirectionMeshLawToFace(new_ppty, iCoedges[dir], coface); - } - } - // si méthode non structuré, l'affecte à la face si le bloc voisin n'est pas structuré - else if (new_ppty->getMeshLaw() == BlockMeshingProperty::delaunayTetgen){ + if (new_ppty->getMeshLaw() == BlockMeshingProperty::transfinite) { + FaceMeshingPropertyTransfinite* prop = new FaceMeshingPropertyTransfinite(); + CoFaceMeshingProperty* old_prop = coface->setProperty(prop); + delete old_prop; + } else if (new_ppty->getMeshLaw() == BlockMeshingProperty::delaunayTetgen){ + // si méthode non structuré, l'affecte à la face si le bloc voisin n'est pas structuré // pas de bloc structuré comme voisin if (0 == bloc_opp || !bloc_opp->isStructured()) { FaceMeshingPropertyDelaunayGMSH* prop = new FaceMeshingPropertyDelaunayGMSH(); @@ -3534,69 +3327,6 @@ setMeshLaw(BlockMeshingProperty* new_ppty) } // end for iter1 = faces.begin(); } /*----------------------------------------------------------------------------*/ -//#define _DEBUG_MESH_LAW -void Block:: -_setDirectionMeshLawToFace(BlockMeshingProperty* new_ppty, - std::vector& dirCoedges, - Topo::CoFace* coface) -{ -#ifdef _DEBUG_MESH_LAW - std::cout<<"_setDirectionMeshLawToFace("<getMeshLawName()<<", "<getName()<<")"<getDir();; - - // on marque les arêtes communes du bloc qui suivent la direction - std::map filtre_aretes; -#ifdef _DEBUG_MESH_LAW - std::cout<<" suivant les arêtes : "; -#endif - for (std::vector::iterator iter = dirCoedges.begin(); - iter != dirCoedges.end(); ++iter){ - filtre_aretes[*iter] = 1; -#ifdef _DEBUG_MESH_LAW - std::cout<<" "<<(*iter)->getName(); -#endif - } -#ifdef _DEBUG_MESH_LAW - std::cout< iCoedges[2]; - coface->getOrientedCoEdges(iCoedges[0], iCoedges[1]); - - // on cherche les arêtes pour chacunes des directions - for (uint i=0; i<2; i++) - for (std::vector::iterator iter = iCoedges[i].begin(); - iter != iCoedges[i].end(); ++iter) - if (filtre_aretes[*iter] == 1){ - - if (new_ppty->getMeshLaw() == BlockMeshingProperty::directional){ - FaceMeshingPropertyDirectional* prop = - new FaceMeshingPropertyDirectional(i==0?CoFaceMeshingProperty::dir_i:CoFaceMeshingProperty::dir_j); - CoFaceMeshingProperty* old_prop = coface->setProperty(prop); - delete old_prop; - } - else if (new_ppty->getMeshLaw() == BlockMeshingProperty::rotational){ - BlockMeshingPropertyRotational* bmp = dynamic_cast(new_ppty); - CHECK_NULL_PTR_ERROR(bmp); - Utils::Math::Point axis1; - Utils::Math::Point axis2; - bmp->getAxis(axis1, axis2); - FaceMeshingPropertyRotational* prop = - new FaceMeshingPropertyRotational(i==0?CoFaceMeshingProperty::dir_i:CoFaceMeshingProperty::dir_j, - axis1, axis2); - CoFaceMeshingProperty* old_prop = coface->setProperty(prop); - delete old_prop; - } - } - - // il se peut que l'on ne trouve pas d'arête de marquée, - // c'est que l'on est orthogonal, on ne fait rien. -} -/*----------------------------------------------------------------------------*/ int Block:: getNbRegions() { @@ -3722,23 +3452,12 @@ selectBasicMeshLaw(Internal::InfoCommand* icmd, bool forceCompute) #ifdef _DEBUG2 std::cout<<"selectBasicMeshLaw pour "< iCoedges[3]; getOrientedCoEdges(iCoedges[0], iCoedges[1], iCoedges[2]); std::vector sommets; getHexaVertices(sommets); - // la direction sélectionnée, à définir - BlockMeshingProperty::meshDirLaw dirLaw = BlockMeshingProperty::dir_undef; - // une des 3 directions convient-elle ? for (uint j=0; j<3; j++){ std::vector > coedges_dirs; @@ -3752,20 +3471,7 @@ selectBasicMeshLaw(Internal::InfoCommand* icmd, bool forceCompute) coedges_dirs.push_back(coedges_dir1); } // end for k - if (TopoHelper::isUnidirectionalMeshable(coedges_dirs)) - dirLaw = (BlockMeshingProperty::meshDirLaw)(j+1); } // end for j - - if (dirLaw != BlockMeshingProperty::dir_undef){ - saveBlockMeshingProperty(icmd); - BlockMeshingPropertyDirectional* mp = new BlockMeshingPropertyDirectional(dirLaw); - switchBlockMeshingProperty(icmd, mp); - delete mp; - -#ifdef _DEBUG2 - std::cout<<" on attribue "< -#include "TkUtil/Exception.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -BlockMeshingProperty::meshDirLaw BlockMeshingProperty::_computeDir(Block* block, Utils::Math::Point & v1, Utils::Math::Point & v2) -{ - Utils::Math::Vector vect1 (v1, v2); - - std::vector iCoedges; - std::vector jCoedges; - std::vector kCoedges; - - block->getOrientedCoEdges(iCoedges, jCoedges, kCoedges); - - for (uint i=0; igetVertex(0)->getCoord(), coedge->getVertex(1)->getCoord()); - Utils::Math::Vector vect3 = vect1*vect2; - if (Utils::Math::MgxNumeric::isNearlyZero(vect3.abs2())) - return dir_i; - } - - for (uint i=0; igetVertex(0)->getCoord(), coedge->getVertex(1)->getCoord()); - Utils::Math::Vector vect3 = vect1*vect2; - if (Utils::Math::MgxNumeric::isNearlyZero(vect3.abs2())) - return dir_j; - } - - for (uint i=0; igetVertex(0)->getCoord(), coedge->getVertex(1)->getCoord()); - Utils::Math::Vector vect3 = vect1*vect2; - if (Utils::Math::MgxNumeric::isNearlyZero(vect3.abs2())) - return dir_k; - } - - TkUtil::UTF8String messErr (TkUtil::Charset::UTF_8); - messErr << "Il n'est pas possible d'orienter le bloc "<getName() - << " avec les 2 points "<< v1 << " et "<< v2; - throw TkUtil::Exception(messErr); - -} -/*----------------------------------------------------------------------------*/ -BlockMeshingProperty::meshDirLaw BlockMeshingProperty::_computeDir(Block* block, std::string& coedge_name) -{ - std::vector iCoedges; - std::vector jCoedges; - std::vector kCoedges; - - block->getOrientedCoEdges(iCoedges, jCoedges, kCoedges); - - for (uint i=0; igetName() == coedge_name) - return dir_i; - } - - for (uint i=0; igetName() == coedge_name) - return dir_j; - } - - for (uint i=0; igetName() == coedge_name) - return dir_k; - } - - TkUtil::UTF8String messErr (TkUtil::Charset::UTF_8); - messErr << "Il n'est pas possible d'orienter le bloc "<getName() - << " avec l'arête "<< coedge_name<<", elle n'a pas été trouvée"; - throw TkUtil::Exception(messErr); - -} -/*----------------------------------------------------------------------------*/ -BlockMeshingProperty::meshSideLaw BlockMeshingProperty::_computeSide(Block* block, - Utils::Math::Point & v1, Utils::Math::Point & v2, uint dir_bl) -{ - std::vector sommets; - block->getHexaVertices(sommets); - - for (uint j=0; j<4; j++){ - Topo::Vertex* vtx1 = sommets[Topo::TopoHelper::tabIndVtxByEdgeAndDirOnBlock[dir_bl][j][0]]; - Topo::Vertex* vtx2 = sommets[Topo::TopoHelper::tabIndVtxByEdgeAndDirOnBlock[dir_bl][j][1]]; - if (vtx1->getCoord() == v1 || vtx2->getCoord() == v2) - return BlockMeshingProperty::side_min; - else if (vtx1->getCoord() == v2 || vtx2->getCoord() == v1) - return BlockMeshingProperty::side_max; - } - - TkUtil::UTF8String messErr (TkUtil::Charset::UTF_8); - messErr << "Il n'est pas possible de sélectionner un côté du bloc "<getName() - << " avec les 2 points "<< v1 << " et "<< v2; - throw TkUtil::Exception(messErr); -} -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ diff --git a/src/Core/Topo/CommandExtrudeFace.cpp b/src/Core/Topo/CommandExtrudeFace.cpp index 165dc80..c8a5af2 100644 --- a/src/Core/Topo/CommandExtrudeFace.cpp +++ b/src/Core/Topo/CommandExtrudeFace.cpp @@ -10,7 +10,6 @@ #include "Topo/TopoHelper.h" #include "Topo/CoFace.h" #include "Topo/Edge.h" -#include "Topo/BlockMeshingPropertyDirectional.h" #include "Topo/EdgeMeshingPropertyUniform.h" #include "Topo/FaceMeshingPropertyDirectional.h" @@ -522,8 +521,6 @@ namespace Mgx3D { //newBlock->check(); #endif - BlockMeshingProperty* new_ppty = new BlockMeshingPropertyDirectional(BlockMeshingProperty::dir_i); - newBlock->setMeshLaw(new_ppty); } // for (; iter1_0 != cofaces_0.end(); ++iter1_0, ++iter1_1) diff --git a/src/Core/Topo/CommandExtrudeTopo.cpp b/src/Core/Topo/CommandExtrudeTopo.cpp index 1dfafe6..71ed972 100644 --- a/src/Core/Topo/CommandExtrudeTopo.cpp +++ b/src/Core/Topo/CommandExtrudeTopo.cpp @@ -14,7 +14,6 @@ #include "Topo/TopoHelper.h" #include "Topo/CoFace.h" #include "Topo/Edge.h" -#include "Topo/BlockMeshingPropertyDirectional.h" #include "Topo/EdgeMeshingPropertyUniform.h" #include "Topo/FaceMeshingPropertyDirectional.h" @@ -489,9 +488,6 @@ void CommandExtrudeTopo::constructExtrudeBlocks(std::vector& cofaces_0, //newBlock->check(); #endif - BlockMeshingProperty* new_ppty = new BlockMeshingPropertyDirectional(BlockMeshingProperty::dir_i); - newBlock->setMeshLaw(new_ppty); - } // for (; iter1_0 != cofaces_0.end(); ++iter1_0, ++iter1_1) diff --git a/src/Core/Topo/CommandMakeBlocksByRevol.cpp b/src/Core/Topo/CommandMakeBlocksByRevol.cpp index 38b8339..75d997f 100644 --- a/src/Core/Topo/CommandMakeBlocksByRevol.cpp +++ b/src/Core/Topo/CommandMakeBlocksByRevol.cpp @@ -18,8 +18,6 @@ #include "Topo/EdgeMeshingPropertyUniform.h" #include "Topo/FaceMeshingPropertyDirectional.h" #include "Topo/FaceMeshingPropertyRotational.h" -#include "Topo/BlockMeshingPropertyDirectional.h" -#include "Topo/BlockMeshingPropertyRotational.h" #include "Topo/EdgeMeshingPropertyInterpolate.h" #include "Geom/CommandExtrudeRevolution.h" @@ -2862,93 +2860,7 @@ constructRevolBlocks(std::vector& cofaces_0, Face* face = newBlock->getFace(0); face->getOrientedCoEdges(iCoedges, jCoedges); - - // les 2 groupes d'arêtes pour une même direction - { - std::vector > coedges_dirs; - - std::vector coedges_dir1; - TopoHelper::getCoEdgesBetweenVertices(face->getVertex(1), - face->getVertex(2), - iCoedges, - coedges_dir1); - coedges_dirs.push_back(coedges_dir1); - - if (face->getNbVertices() == 4){ - std::vector coedges_dir2; - TopoHelper::getCoEdgesBetweenVertices(face->getVertex(0), - face->getVertex(3), - iCoedges, - coedges_dir2); - coedges_dirs.push_back(coedges_dir2); - } - - if (TopoHelper::isUnidirectionalMeshable(coedges_dirs)){ -#ifdef _DEBUG_MESH_LAW - std::cout<<"On utilise la méthode dirJ pour mailler "<getName()<<" ainsi que les faces ..."<< std::endl; -#endif - BlockMeshingProperty* new_ppty = new BlockMeshingPropertyDirectional(BlockMeshingProperty::dir_j); - newBlock->setMeshLaw(new_ppty); - } - } - - if (newBlock->getMeshLaw() == BlockMeshingProperty::transfinite){ - - std::vector > coedges_dirs; - - std::vector coedges_dir1; - TopoHelper::getCoEdgesBetweenVertices(face->getVertex(1), - face->getVertex(0), - jCoedges, - coedges_dir1); - coedges_dirs.push_back(coedges_dir1); - - std::vector coedges_dir2; - TopoHelper::getCoEdgesBetweenVertices(face->getVertex(2), - face->getVertex(face->getNbVertices()==4?3:0), - jCoedges, - coedges_dir2); - coedges_dirs.push_back(coedges_dir2); - - if (TopoHelper::isUnidirectionalMeshable(coedges_dirs)){ -#ifdef _DEBUG_MESH_LAW - std::cout<<"On utilise la méthode dirK pour mailler "<getName()<<" ainsi que les faces ..."<< std::endl; -#endif - BlockMeshingProperty* new_ppty = new BlockMeshingPropertyDirectional(BlockMeshingProperty::dir_k); - newBlock->setMeshLaw(new_ppty); - } - } - - // cas des blocs au dessus de l'ogrid et qui ne le touche pas - if (newBlock->getMeshLaw() == BlockMeshingProperty::transfinite){ - - // recherche si la coface a un sommet qui touche l'ogrid - bool touche = false; - for (uint i=0; igetNbVertices(); i++) - if (filtre_vertex[coface_0->getVertex(i)]%5 == 1) - touche = true; - if (!touche){ -#ifdef _DEBUG_MESH_LAW - std::cout<<"On utilise la méthode rotation (rotI) pour mailler "<getName()<setMeshLaw(new_ppty); - } - } } // end if (vertices.size() == 8 && findDir) - // on reste sur la méthode transfinie (car directionnelle pas compatible avec contours courbes dans le 2D) -// else if (vertices.size() != 8){ -// // On évite la méthode rotationnelle pour les blocs dégénérés -// // car elle n'est pas adaptée aux cas avec un sommet point triple de l'ogrid sur une surface -// // on utilise donc la direction vers la dégénérescence -//#ifdef _DEBUG_MESH_LAW -// std::cout<<"On utilise la méthode direction (dirK) pour mailler "<getName()<setMeshLaw(new_ppty); -// } - } // end for cofaces } /*----------------------------------------------------------------------------*/ diff --git a/src/Core/Topo/CommandNewTopoOGridOnGeometry.cpp b/src/Core/Topo/CommandNewTopoOGridOnGeometry.cpp index db14b27..3a1e1e1 100644 --- a/src/Core/Topo/CommandNewTopoOGridOnGeometry.cpp +++ b/src/Core/Topo/CommandNewTopoOGridOnGeometry.cpp @@ -193,8 +193,7 @@ createCylinderTopo1BlockPlein(Geom::PropertyCylinder* propertyCyl) double d2 = std::sqrt(2.0)/2.0; Utils::Math::Point p1, p2, p3, p4; - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -302,8 +301,7 @@ createCylinderTopo1BlockPlein(Geom::PropertyCylinder* propertyCyl) void CommandNewTopoOGridOnGeometry:: createCylinderTopo1BlockDemi(Geom::PropertyCylinder* propertyCyl) { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); b1->setGeomAssociation(getGeomEntity()); @@ -442,8 +440,7 @@ createCylinderTopo1BlockDemi(Geom::PropertyCylinder* propertyCyl) void CommandNewTopoOGridOnGeometry:: createCylinderTopo1BlockQuart(Geom::PropertyCylinder* propertyCyl) { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); b1->setGeomAssociation(getGeomEntity()); @@ -605,16 +602,11 @@ void CommandNewTopoOGridOnGeometry::createCylinderTopoOGridPleinNonDeg(Geom::Pro double d2 = std::sqrt(2.0)/2.0; Utils::Math::Point p1, p2, p3, p4; - Topo::Block* b1 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_i); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_j); - Topo::Block* b3 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_i); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_j); - Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_i); + Topo::Block* b1 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); + Topo::Block* b3 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -821,14 +813,10 @@ void CommandNewTopoOGridOnGeometry::createCylinderTopoOGridPleinDeg(Geom::Proper // mais ce dernier ne pouvait s'adapter au cas dégénéré, // en effet, la dégénérescence se place obligatoirement en z_max - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -1005,8 +993,7 @@ void CommandNewTopoOGridOnGeometry::createCylinderTopoOGridQuartDeg(Geom::Proper #endif // cas m_ratio == 0 - Topo::Block* b1 = new Topo::Block(getContext(), 4*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 4*m_ni, m_naxe, m_nr); // stockage dans le manager topologiques du bloc addCreatedBlock(b1); @@ -1107,12 +1094,9 @@ void CommandNewTopoOGridOnGeometry::createCylinderTopoOGridQuartNonDeg(Geom::Pro std::cout<<"createCylinderTopoOGridQuartNonDeg(...)"< blocs; @@ -2114,20 +2084,13 @@ createSphereTopoOGridPleinNonDeg(Geom::PropertySphere* propertySph) pts_int.push_back(centre+Utils::Math::Point( r2, r2, r2)); - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, 2*m_ni, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b7 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, 2*m_ni); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b7 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -2230,16 +2193,11 @@ createSphereTopoOGridDemiDeg(Geom::PropertySphere* propertySph) pts_ext.push_back(centre+Utils::Math::Point(-r2, 0, r2)); pts_ext.push_back(centre+Utils::Math::Point( r2, 0, r2)); - Topo::Block* b2 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b2 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -2453,18 +2411,12 @@ createSphereTopoOGridDemiNonDeg(Geom::PropertySphere* propertySph) pts_int.push_back(centre+Utils::Math::Point(-r2, 0, r2)); pts_int.push_back(centre+Utils::Math::Point( r2, 0, r2)); - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_ni, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_ni); + Topo::Block* b2 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -2686,14 +2638,10 @@ createSphereTopoOGridQuartDeg(Geom::PropertySphere* propertySph) pts_ext.push_back(centre+Utils::Math::Point( 0, 0, r2)); pts_ext.push_back(centre+Utils::Math::Point( r2, 0, r2)); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -2850,16 +2798,11 @@ createSphereTopoOGridQuartNonDeg(Geom::PropertySphere* propertySph) pts_int.push_back(centre+Utils::Math::Point( r2, 0, r2)); - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_ni, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_ni); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -3025,12 +2968,9 @@ createSphereTopoOGridHuitiemeDeg(Geom::PropertySphere* propertySph) pts_ext.push_back(centre+Utils::Math::Point( 0, 0, r2)); pts_ext.push_back(centre+Utils::Math::Point( r2, 0, r2)); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -3193,14 +3133,10 @@ createSphereTopoOGridHuitiemeNonDeg(Geom::PropertySphere* propertySph) pts_int.push_back(centre+Utils::Math::Point( 0, 0, r2)); pts_int.push_back(centre+Utils::Math::Point( r2, 0, r2)); - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_ni, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_ni); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); // les blocs externes pour utiliser des boucles @@ -3418,8 +3354,7 @@ createHollowCylinderTopoQuart(Geom::PropertyHollowCylinder* propertyCyl) #endif // création de 1 bloc - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); // stockage dans le manager topologiques du bloc addCreatedBlock(b1); @@ -3463,8 +3398,7 @@ createHollowCylinderTopoDemi(Geom::PropertyHollowCylinder* propertyCyl) #endif // création de 1 bloc - Topo::Block* b1 = new Topo::Block(getContext(), 4*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 4*m_ni, m_naxe, m_nr); // stockage dans le manager topologiques du bloc addCreatedBlock(b1); @@ -3509,22 +3443,10 @@ createHollowCylinderTopoEntier(Geom::PropertyHollowCylinder* propertyCyl) Utils::Math::Point centre = propertyCyl->getCenter(); double d2 = std::sqrt(2.0)/2.0; - // CP NEW CODE v 2.2.2 - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - // !CP NEW CODE -/* CP OLD CODE - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); -*/ + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -3681,12 +3603,9 @@ createHollowSphereTopo() void CommandNewTopoOGridOnGeometry:: createHollowSphereTopoHuitieme(Geom::PropertyHollowSphere* propertySph) { - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -3829,14 +3748,10 @@ createHollowSphereTopoHuitieme(Geom::PropertyHollowSphere* propertySph) void CommandNewTopoOGridOnGeometry:: createHollowSphereTopoQuart(Geom::PropertyHollowSphere* propertySph) { - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_nr); std::vector blocs; blocs.push_back(b3); @@ -3968,16 +3883,11 @@ createHollowSphereTopoQuart(Geom::PropertyHollowSphere* propertySph) void CommandNewTopoOGridOnGeometry:: createHollowSphereTopoDemi(Geom::PropertyHollowSphere* propertySph) { - Topo::Block* b2 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b2 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -4146,18 +4056,12 @@ createHollowSphereTopoDemi(Geom::PropertyHollowSphere* propertySph) void CommandNewTopoOGridOnGeometry:: createHollowSphereTopoEntier(Geom::PropertyHollowSphere* propertySph) { - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b7 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b6 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); + Topo::Block* b7 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_nr); // les blocs externes pour utiliser des boucles std::vector blocs; @@ -4481,8 +4385,7 @@ createConeTopoOGrid() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockQuartR0() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -4544,8 +4447,7 @@ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockQuartR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockQuart() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -4618,8 +4520,7 @@ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockQuart() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockDemiR0() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -4695,8 +4596,7 @@ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockDemiR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockDemi() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -4787,8 +4687,7 @@ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockDemi() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockPleinR0() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -4850,8 +4749,7 @@ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockPleinR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopo1BlockPlein() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités addCreatedBlock(b1); @@ -4923,12 +4821,9 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridQuartDegR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridQuartNonDegR0() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_nr, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), m_nr, m_ni, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5044,10 +4939,8 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridQuartNonDegR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridQuartDeg() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr); + Topo::Block* b2 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5140,12 +5033,9 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridQuartDeg() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridQuartNonDeg() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_nr, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), m_nr, m_ni, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5297,14 +5187,10 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridDemiDegR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridDemiNonDegR0() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5451,12 +5337,9 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridDemiNonDegR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridDemiDeg() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_naxe, m_nr); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5565,14 +5448,10 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridDemiDeg() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridDemiNonDeg() { - Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b3 = new Topo::Block(getContext(), m_ni, m_nr, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5759,16 +5638,11 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridPleinDegR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridPleinNonDegR0() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); + Topo::Block* b4 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -5907,14 +5781,10 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridPleinNonDegR0() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridPleinDeg() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b2 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); + Topo::Block* b4 = new Topo::Block(getContext(), 2*m_ni, m_naxe, m_nr); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); @@ -6036,16 +5906,11 @@ void CommandNewTopoOGridOnGeometry::createConeTopoOGridPleinDeg() /*----------------------------------------------------------------------------*/ void CommandNewTopoOGridOnGeometry::createConeTopoOGridPleinNonDeg() { - Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b4 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); - Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* b1 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); + Topo::Block* b2 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b3 = new Topo::Block(getContext(), 2*m_ni, m_nr, m_naxe); + Topo::Block* b4 = new Topo::Block(getContext(), m_nr, 2*m_ni, m_naxe); + Topo::Block* b5 = new Topo::Block(getContext(), 2*m_ni, 2*m_ni, m_naxe); // stockage dans le manager topologiques des différentes entités (bloc et niveau inférieur) addCreatedBlock(b1); diff --git a/src/Core/Topo/CommandNewTopoOnGeometry.cpp b/src/Core/Topo/CommandNewTopoOnGeometry.cpp index c848650..0f52d32 100644 --- a/src/Core/Topo/CommandNewTopoOnGeometry.cpp +++ b/src/Core/Topo/CommandNewTopoOnGeometry.cpp @@ -32,7 +32,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, Geom::GeomEntity* entity, eTopoTy :CommandCreateTopo(c, "Nom de commande à définir") , m_freeTopo(false) , m_dim(0) -, m_insertionBlock(false) , m_ni(0) , m_nj(0) , m_nk(0) @@ -79,16 +78,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, Geom::GeomEntity* entity, eTopoTy } m_freeTopo = true; break; - case INSERTION_BLOCK: - setStructured(false); - if (entity==0 || entity->getDim() == 3) - comments << "Création d'un bloc topologique pour l'insertion"; - else if (entity->getDim() == 2) - comments << "Création d'une face topologique pour l'insertion"; - else - comments << "Création d'une topologie pour l'insertion"; - m_insertionBlock = true; - break; case ASSOCIATED_TOPO: setStructured(false); if (entity!=0 && entity->getDim() == 0){ @@ -119,7 +108,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, Geom::CommandCreateGeom* command_ :CommandCreateTopo(c, "Création d'une topologique sur une géométrie depuis une commande") , m_freeTopo(false) , m_dim(0) -, m_insertionBlock(false) , m_ni(0) , m_nj(0) , m_nk(0) @@ -137,10 +125,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, Geom::CommandCreateGeom* command_ setStructured(true); m_freeTopo = true; break; - case INSERTION_BLOCK: - setStructured(false); - m_insertionBlock = true; - break; default: throw TkUtil::Exception (TkUtil::UTF8String ("CommandNewTopoOnGeometry pour un type de topologie non prévu", TkUtil::Charset::UTF_8)); } @@ -152,7 +136,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, const std::string& ng, const shor :CommandCreateTopo(c, "") , m_freeTopo(true) , m_dim(dim) -, m_insertionBlock(false) , m_groupName(ng) , m_ni(0) , m_nj(0) @@ -169,7 +152,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, Geom::CommandCreateGeom* command_ :CommandCreateTopo(c, "Création d'une topologique (ni nj nk) sur une géométrie depuis une commande") , m_freeTopo(false) , m_dim(0) -, m_insertionBlock(false) , m_ni(ni) , m_nj(nj) , m_nk(nk) @@ -184,7 +166,6 @@ CommandNewTopoOnGeometry(Internal::Context& c, Geom::Surface* entity, std::vecto :CommandCreateTopo(c, "Création d'une face topologique structurée sur une géométrie") , m_freeTopo(false) , m_dim(0) -, m_insertionBlock(false) , m_ni(0) , m_nj(0) , m_nk(0) @@ -262,7 +243,7 @@ internalExecute() } else { // création d'un simple bloc - Block* bl = new Block(getContext(), 0,0,0,BlockMeshingProperty::transfinite); + Block* bl = new Block(getContext(), 0,0,0); addCreatedBlock(bl); if (!m_groupName.empty()){ Group::Group3D* grp = getContext().getLocalGroupManager().getNewGroup3D(m_groupName, &getInfoCommand()); @@ -322,9 +303,6 @@ internalExecute() throw TkUtil::Exception(message); } - if (m_insertionBlock) - g2t.convertInsertionBlock(); - addCreatedBlock(g2t.getBlock()); } else if (getGeomEntity()->getDim() == 2){ @@ -435,8 +413,7 @@ void CommandNewTopoOnGeometry::getPreviewRepresentation(Utils::DisplayRepresenta void CommandNewTopoOnGeometry::createSpherePartBlock() { // cas avec dégénérescence à l'origine - Topo::Block* bloc = new Topo::Block(getContext(), m_nj, m_nk, m_ni, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* bloc = new Topo::Block(getContext(), m_nj, m_nk, m_ni); addCreatedBlock(bloc); split(); @@ -480,8 +457,7 @@ void CommandNewTopoOnGeometry::createSpherePartBlock() void CommandNewTopoOnGeometry::createHollowSpherePartBlock() { // cas d'un bloc régulier - Topo::Block* bloc = new Topo::Block(getContext(), m_nj, m_nk, m_ni, - BlockMeshingProperty::directional, BlockMeshingProperty::dir_k); + Topo::Block* bloc = new Topo::Block(getContext(), m_nj, m_nk, m_ni); addCreatedBlock(bloc); split(); diff --git a/src/Core/Topo/CommandReplaceTransfiniteMethod.cpp b/src/Core/Topo/CommandReplaceTransfiniteMethod.cpp deleted file mode 100644 index 80a2883..0000000 --- a/src/Core/Topo/CommandReplaceTransfiniteMethod.cpp +++ /dev/null @@ -1,419 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file CommandReplaceTransfiniteMethod.cpp - * - * \author Eric Brière de l'Isle - * - * \date 15/10/13 - */ -/*----------------------------------------------------------------------------*/ -#include "Topo/CommandReplaceTransfiniteMethod.h" -#include "Topo/Block.h" -#include "Topo/CoFace.h" -#include "Topo/Edge.h" -#include "Topo/CoEdge.h" -#include "Topo/TopoHelper.h" -#include "Topo/FaceMeshingPropertyDirectional.h" -#include "Topo/BlockMeshingPropertyDirectional.h" - -#include "Utils/Common.h" -#include "Utils/Point.h" - -#include "Mesh/MeshImplementation.h" -/*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -//#define _DEBUG_TIMER -#ifdef _DEBUG_TIMER -#include -#endif -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -CommandReplaceTransfiniteMethod:: -CommandReplaceTransfiniteMethod(Internal::Context& c) -:Mesh::CommandCreateMesh(c, std::string("Changement de discrétisation pour les blocs et faces avec méthode transfinie"), 0) -{ -} -/*----------------------------------------------------------------------------*/ -CommandReplaceTransfiniteMethod:: -~CommandReplaceTransfiniteMethod() -{ -} -/*----------------------------------------------------------------------------*/ -//#define _DEBUG_REPLACE -void CommandReplaceTransfiniteMethod:: -internalExecute() -{ -#ifdef _DEBUG_REPLACE - std::cout<<"CommandReplaceTransfiniteMethod en cours ..."< coedges; - getContext().getLocalTopoManager().getCoEdges(coedges); -#ifdef _DEBUG_TIMER - timer.reset(); - timer.start(); -#endif - if (coedges.size()){ - preMesh(coedges); - } // end if (coedges.size()) - - - -#ifdef _DEBUG_TIMER - timer.stop(); - std::cout<<"calcul du preMesh "<::iterator iter = coedges.begin(); - iter != coedges.end(); ++iter){ - if (isRectiligne(*iter)) - nb_rectilignes += 1; - nb_vus += 1.0; - setStepProgression(nb_vus/nb_tot); - notifyObserversForModifications(); - } - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message << "Nb d'arêtes total: "<<(short)coedges.size()<<"\n"; - message << "Nb d'arêtes rectilignes: "<<(short)nb_rectilignes<<"\n"; - getContext().getLogStream()->log(TkUtil::TraceLog (message, TkUtil::Log::INFORMATION)); - - } // end if (coedges.size()) -#ifdef _DEBUG_TIMER - timer.stop(); - std::cout<<"recherche des arêtes rectilignes ou non en "< cofaces; - getContext().getLocalTopoManager().getCoFaces(cofaces); -#ifdef _DEBUG_TIMER - timer.reset(); - timer.start(); -#endif - setStepProgression (1.); - setStep (++step, "Recherche de la possibilité de mailler avec méthode rectiligne pour les cofaces", 0.); - if (cofaces.size()){ - uint nb_vus = 0; - uint nb_tot = cofaces.size(); - // faces concernée par le changement - uint nb_transfinites = 0; - // faces dont on change la discrétisation - uint nb_changed = 0; - for (std::vector::iterator iter = cofaces.begin(); - iter != cofaces.end(); ++iter){ - if ((*iter)->getMeshLaw() == CoFaceMeshingProperty::transfinite){ - CoFace* coface = *iter; - nb_transfinites += 1; -#ifdef _DEBUG_REPLACE - std::cout<<" pour "<getName()<<" en cours ..."< rectiligne; - for (uint i=0; igetNbEdges(); i++){ - rectiligne.push_back(isRectiligne(coface->getEdge(i))); -#ifdef _DEBUG_REPLACE - std::cout<<"isRectiligne pour "<getEdge(i)->getName() - <<" => "<<(rectiligne[i]?"vrai":"faux")<getNbEdges() - - FaceMeshingPropertyDirectional::meshDirLaw dirLaw = FaceMeshingPropertyDirectional::dir_undef; - if (rectiligne.size()>2 && rectiligne[0] && rectiligne[2] - && (coface->getEdge(0)->getNbCoEdges()==1 || coface->getEdge(2)->getNbCoEdges()==1)) - dirLaw = FaceMeshingPropertyDirectional::dir_j; - else if (rectiligne.size()>3 && rectiligne[1] && rectiligne[3] - && (coface->getEdge(1)->getNbCoEdges()==1 || coface->getEdge(3)->getNbCoEdges()==1)) - dirLaw = FaceMeshingPropertyDirectional::dir_i; - - if (dirLaw != FaceMeshingPropertyDirectional::dir_undef){ - nb_changed+=1; - coface->saveCoFaceMeshingProperty(&getInfoCommand()); - FaceMeshingPropertyDirectional* mp = new FaceMeshingPropertyDirectional(dirLaw); - coface->switchCoFaceMeshingProperty(&getInfoCommand(), mp); - delete mp; - } - - } // end if getMeshLaw() == transfinite - nb_vus += 1.0; - setStepProgression(nb_vus/nb_tot); - notifyObserversForModifications(); - } // end for iter - - // affichage des infos sur faces concernées - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message << "Nb de faces total: "<<(short)cofaces.size()<<"\n"; - message << "Nb de faces avec transfinie: "<<(short)nb_transfinites<<"\n"; - message << "Nb de faces changées avec méthode directionnelle: "<<(short)nb_changed<<"\n"; - message << "Nb de faces qui restent avec méthode transfinie: "<<(short)(nb_transfinites-nb_changed); - getContext().getLogStream()->log(TkUtil::TraceLog (message, TkUtil::Log::INFORMATION)); - - }// end if (cofaces.size()) -#ifdef _DEBUG_TIMER - timer.stop(); - std::cout<<"recherche les cofaces avec méthode de maillage transfinie en "< blocs; - getContext().getLocalTopoManager().getBlocks(blocs); -#ifdef _DEBUG_TIMER - timer.reset(); - timer.start(); -#endif - setStepProgression (1.); - setStep (++step, "Recherche de la possibilité de mailler avec méthode rectiligne pour les blocs", 0.); - if (blocs.size()){ - uint nb_vus = 0; - uint nb_tot = blocs.size(); - // blocs concernée par le changement - uint nb_transfinites = 0; - // blocs dont on change la discrétisation - uint nb_changed = 0; - for (std::vector::iterator iter = blocs.begin(); - iter != blocs.end(); ++iter){ - if ((*iter)->getMeshLaw() == BlockMeshingProperty::transfinite){ - Block* bloc = *iter; - nb_transfinites += 1; -#ifdef _DEBUG_REPLACE - std::cout<<" pour "<getName()<<" en cours ..."< iCoedges[3]; - bloc->getOrientedCoEdges(iCoedges[0], iCoedges[1], iCoedges[2]); - - std::vector sommets; - bloc->getHexaVertices(sommets); - - // la direction sélectionnée, à définir - BlockMeshingProperty::meshDirLaw dirLaw = BlockMeshingProperty::dir_undef; - - // une des 3 directions convient-elle ? - for (uint j=0; j<3 && (dirLaw == BlockMeshingProperty::dir_undef); j++){ - bool all_rectiligne = true; - for (uint k=0; k<4 && all_rectiligne; k++){ - std::vector coedges_dir1; - - TopoHelper::getCoEdgesBetweenVertices(sommets[TopoHelper::tabIndVtxByEdgeAndDirOnBlock[j][k][0]], - sommets[TopoHelper::tabIndVtxByEdgeAndDirOnBlock[j][k][1]], - iCoedges[j], - coedges_dir1); - if (!isRectiligne(coedges_dir1)) - all_rectiligne = false; - - } // end for k - if (all_rectiligne) - dirLaw = (BlockMeshingProperty::meshDirLaw)(j+1); - } // end for j - - if (dirLaw != BlockMeshingProperty::dir_undef){ - nb_changed+=1; - bloc->saveBlockMeshingProperty(&getInfoCommand()); - BlockMeshingPropertyDirectional* mp = new BlockMeshingPropertyDirectional(dirLaw); - bloc->switchBlockMeshingProperty(&getInfoCommand(), mp); - delete mp; - } - - } // end if getMeshLaw() == transfinite - nb_vus += 1.0; - setStepProgression(nb_vus/nb_tot); - notifyObserversForModifications(); - } // end for iter - - // affichage des infos sur faces concernées - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message << "Nb de blocs total: "<<(short)blocs.size()<<"\n"; - message << "Nb de blocs avec transfinie: "<<(short)nb_transfinites<<"\n"; - message << "Nb de blocs changés avec méthode directionnelle: "<<(short)nb_changed<<"\n"; - message << "Nb de blocs qui restent avec méthode transfinie: "<<(short)(nb_transfinites-nb_changed); - getContext().getLogStream()->log(TkUtil::TraceLog (message, TkUtil::Log::INFORMATION)); - } // end if (blocs.size()) -#ifdef _DEBUG_TIMER - timer.stop(); - std::cout<<"recherche les blocs avec méthode de maillage transfinie en "<getNbCoEdges() == 0) - return false; - std::vector coedges; - edge->getCoEdges(coedges); - - return isRectiligne(coedges); -} -/*----------------------------------------------------------------------------*/ -bool CommandReplaceTransfiniteMethod::isRectiligne(std::vector& coedges) -{ - // vérification pour chacune des coedges si elle est rectiligne - CoEdge* coedge_prec = 0; - for (uint i=0; igetVertex(0)->getCoord(), coedge_prec->getVertex(1)->getCoord()); - Utils::Math::Vector v2(coedge->getVertex(0)->getCoord(), coedge->getVertex(1)->getCoord()); - v1/=v1.norme(); - v2/=v2.norme(); - Utils::Math::Vector v3 = v1*v2; - if (v3.abs()>Mgx3D::Utils::Math::MgxNumeric::mgxTopoDoubleEpsilon){ - return false; - } - } // end if (i) - - coedge_prec = coedge; - - } // end for i points; - coedge->getPoints(points); -#ifdef _DEBUG_REPLACE - std::cout<<"calcul delta pour "<getName()<<" avec "<getName() - << " on tombe sur 3 sommets confondus"; - throw TkUtil::Exception(messErr); - } - } - - Utils::Math::Vector v1(pt_dep, pt_fin); - v1/=v1.norme(); -#ifdef _DEBUG_REPLACE2 - std::cout<<"v1: "<Mgx3D::Utils::Math::MgxNumeric::mgxTopoDoubleEpsilon){ -#ifdef _DEBUG_REPLACE2 - std::cout<getName()<<", delta : "<getName(); - if (m_coedge_isRectiligne[coedge] == 1) - std::cout<<" est rectiligne"< "<getBlockMeshingProperty()->initDir((*iter)); - - // transmission de la demande d'orthogonalité aux faces - if (m_prop->getMeshLaw() == BlockMeshingProperty::orthogonal){ - BlockMeshingPropertyOrthogonal* mp = dynamic_cast((*iter)->getBlockMeshingProperty()); - CHECK_NULL_PTR_ERROR(mp); - - // les 8 sommets, quitte à en répéter certains en cas de dégénérecence - std::vector vertices; - (*iter)->getHexaVertices(vertices); - - if (mp->getDir() == 0){ - // cas orthogonalité suivant I - setOrthogonalCoFaces((*iter)->getFace(2), vertices[0], vertices[1], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(3), vertices[2], vertices[3], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(4), vertices[0], vertices[1], mp->getNbLayers(), mp->getSide()); - if ((*iter)->getNbFaces() == 6) - setOrthogonalCoFaces((*iter)->getFace(5), vertices[4], vertices[5], mp->getNbLayers(), mp->getSide()); - } - else if (mp->getDir() == 1){ - // cas orthogonalité suivant J - setOrthogonalCoFaces((*iter)->getFace(0), vertices[0], vertices[2], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(1), vertices[1], vertices[3], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(4), vertices[0], vertices[2], mp->getNbLayers(), mp->getSide()); - if ((*iter)->getNbFaces() == 6) - setOrthogonalCoFaces((*iter)->getFace(5), vertices[5], vertices[7], mp->getNbLayers(), mp->getSide()); - } - else if (mp->getDir() == 2){ - // cas orthogonalité suivant K - setOrthogonalCoFaces((*iter)->getFace(0), vertices[0], vertices[4], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(1), vertices[3], vertices[7], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(2), vertices[0], vertices[4], mp->getNbLayers(), mp->getSide()); - setOrthogonalCoFaces((*iter)->getFace(3), vertices[3], vertices[7], mp->getNbLayers(), mp->getSide()); - } - - } // end if (m_prop->getMeshLaw() == BlockMeshingProperty::orthogonal) - } // end for (std::vector::iterator iter = m_blocks.begin() ... // on parcours les entités modifiées pour sauvegarder leur état d'avant la commande diff --git a/src/Core/Topo/CommandSnapVertices.cpp b/src/Core/Topo/CommandSnapVertices.cpp index 588bb01..5938181 100644 --- a/src/Core/Topo/CommandSnapVertices.cpp +++ b/src/Core/Topo/CommandSnapVertices.cpp @@ -16,7 +16,6 @@ #include "Topo/BlockTopoProperty.h" #include "Topo/BlockMeshingProperty.h" #include "Topo/BlockMeshingPropertyDelaunayTetgen.h" -#include "Topo/BlockMeshingPropertyDirectional.h" #include "Geom/Vertex.h" #include "Geom/Curve.h" /*----------------------------------------------------------------------------*/ @@ -611,21 +610,6 @@ internalExecute() bloc->getBlockTopoProperty()->getVertexContainer().set(5, bloc->getVertex(6)); bloc->getBlockTopoProperty()->getVertexContainer().resize(6); } - else if (!bloc->isStructured() && bloc->getNbVertices() == 7 && filtre_block[bloc] == 1){ -#ifdef _DEBUG_SNAP - std::cout<<" bloc "<getName() - <<" avec dégénérescence en prisme [cas non structuré]"<getVertex(4) == bloc->getVertex(5)) - bloc->getBlockTopoProperty()->getVertexContainer().set(5, bloc->getVertex(6)); - bloc->getBlockTopoProperty()->getVertexContainer().resize(6); - - // on le déclare structuré - BlockMeshingProperty* prop = new BlockMeshingPropertyDirectional(BlockMeshingProperty::dir_k); - bloc->switchBlockMeshingProperty(&getInfoCommand(), prop); - delete prop; - } else { #ifdef _DEBUG_SNAP std::cout<<" bloc "<getName() diff --git a/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp b/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp index 787ae5e..95834d4 100644 --- a/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp +++ b/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp @@ -1619,9 +1619,6 @@ createBlock(std::map & filtre_vertex, // copie le lien sur la géométrie newBlock->setGeomAssociation(bloc->getGeomAssociation()); - if (bloc->getMeshLaw() == BlockMeshingProperty::directional) - newBlock->selectBasicMeshLaw(&getInfoCommand()); - } // end if filtre_coface[...] == 1 } // end iter3 } // end if (filtre_face[face] == 2 || face->getNbCoFaces() == 1) @@ -1689,9 +1686,6 @@ createBlock(std::map & filtre_vertex, // copie le lien sur la géométrie newBlock->setGeomAssociation(bloc->getGeomAssociation()); - if (bloc->getMeshLaw() == BlockMeshingProperty::directional) - newBlock->selectBasicMeshLaw(&getInfoCommand()); - } // end else if (filtre_face[face] == 1) else { #ifdef _DEBUG_SPLIT_OGRID @@ -1729,9 +1723,6 @@ createBlock(std::map & filtre_vertex, // copie le lien sur la géométrie newBlock->setGeomAssociation(bloc->getGeomAssociation()); - if (bloc->getMeshLaw() == BlockMeshingProperty::directional) - newBlock->selectBasicMeshLaw(&getInfoCommand()); - } // end iter1 } /*----------------------------------------------------------------------------*/ diff --git a/src/Core/Topo/CommandTransformTopo.cpp b/src/Core/Topo/CommandTransformTopo.cpp index 02f8d4e..3546978 100644 --- a/src/Core/Topo/CommandTransformTopo.cpp +++ b/src/Core/Topo/CommandTransformTopo.cpp @@ -13,7 +13,6 @@ #include "Topo/Block.h" #include "Topo/TopoHelper.h" #include "Topo/FaceMeshingPropertyRotational.h" -#include "Topo/BlockMeshingPropertyRotational.h" #include "Topo/CommandDuplicateTopo.h" /*----------------------------------------------------------------------------*/ #include @@ -152,28 +151,6 @@ transform(Block* bl, gp_Trsf* transf, std::map& filtre) } } - // cas d'une rotation ou d'une translation, il peut être nécessaire de modifier l'axe - if (bl->getMeshLaw() == Topo::BlockMeshingProperty::rotational){ - BlockMeshingPropertyRotational* bmp = dynamic_cast(bl->getBlockMeshingProperty()); - CHECK_NULL_PTR_ERROR(bmp); - Utils::Math::Point axis[2]; - bmp->getAxis(axis[0], axis[1]); - - for (uint i=0; i<2; i++){ - double x = axis[i].getX(); - double y = axis[i].getY(); - double z = axis[i].getZ(); - - transf->Transforms(x, y, z); - - axis[i].setX(x); - axis[i].setY(y); - axis[i].setZ(z); - } - bl->saveBlockMeshingProperty(&getInfoCommand()); - bmp->setAxis(axis[0], axis[1]); - } - filtre[bl] = 1; } /*----------------------------------------------------------------------------*/ @@ -195,28 +172,6 @@ transform(Block* bl, gp_GTrsf* transf, std::map& filtre) } } - // cas d'une rotation ou d'une translation, il peut être nécessaire de modifier l'axe - if (bl->getMeshLaw() == Topo::BlockMeshingProperty::rotational){ - BlockMeshingPropertyRotational* bmp = dynamic_cast(bl->getBlockMeshingProperty()); - CHECK_NULL_PTR_ERROR(bmp); - Utils::Math::Point axis[2]; - bmp->getAxis(axis[0], axis[1]); - - for (uint i=0; i<2; i++){ - double x = axis[i].getX(); - double y = axis[i].getY(); - double z = axis[i].getZ(); - - transf->Transforms(x, y, z); - - axis[i].setX(x); - axis[i].setY(y); - axis[i].setZ(z); - } - bl->saveBlockMeshingProperty(&getInfoCommand()); - bmp->setAxis(axis[0], axis[1]); - } - filtre[bl] = 1; } /*----------------------------------------------------------------------------*/ diff --git a/src/Core/Topo/TopoManager.cpp b/src/Core/Topo/TopoManager.cpp index 7079234..175cef7 100644 --- a/src/Core/Topo/TopoManager.cpp +++ b/src/Core/Topo/TopoManager.cpp @@ -65,7 +65,6 @@ #include "Topo/CommandDestroyTopo.h" #include "Topo/CommandReverseDirection.h" #include "Topo/CommandDuplicateTopo.h" -#include "Topo/CommandReplaceTransfiniteMethod.h" #include "Topo/CommandInsertHole.h" #include #include @@ -1064,34 +1063,6 @@ TopoManager::newFreeTopoInGroup(std::string ng, int dim) return cmdResult; } /*----------------------------------------------------------------------------*/ -Mgx3D::Internal::M3DCommandResultIfc* -TopoManager::newInsertionTopoOnGeometry(std::string ne) -{ - return newInsertionTopoOnGeometry(getLocalContext().getGeomManager().getEntity(ne)); -} -/*----------------------------------------------------------------------------*/ -Mgx3D::Internal::M3DCommandResultIfc* -TopoManager::newInsertionTopoOnGeometry(Geom::GeomEntity* ge) -{ - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message <<"TopoManager::newInsertionTopoOnGeometry("<getName()<<")"; - log (TkUtil::TraceLog (message, TkUtil::Log::TRACE_4)); - - Topo::CommandNewTopoOnGeometry* command = new Topo::CommandNewTopoOnGeometry(getLocalContext(), ge, - CommandNewTopoOnGeometry::INSERTION_BLOCK); - - TkUtil::UTF8String cmd (TkUtil::Charset::UTF_8); - cmd << getContextAlias() << "." << "getTopoManager().newInsertionTopoOnGeometry (\"" - <getName()<<"\")"; - command->setScriptCommand(cmd); - - getCommandManager().addCommand(command, Utils::Command::DO); - - Internal::M3DCommandResultIfc* cmdResult = - new Internal::M3DCommandResult (*command); - return cmdResult; -} -/*----------------------------------------------------------------------------*/ Mgx3D::Internal::M3DCommandResultIfc* TopoManager:: newBoxWithTopo(const Utils::Math::Point& pmin, const Utils::Math::Point& pmax, bool meshStructured, std::string groupName) @@ -3431,22 +3402,6 @@ Mgx3D::Internal::M3DCommandResultIfc* TopoManager::setBlockMeshingProperty(Block return cmdResult; } /*----------------------------------------------------------------------------*/ -Mgx3D::Internal::M3DCommandResultIfc* -TopoManager::replaceTransfiniteByDirectionalMeshMethodAsPossible() -{ - Topo::CommandReplaceTransfiniteMethod* command = new Topo::CommandReplaceTransfiniteMethod(getLocalContext()); - - TkUtil::UTF8String cmd (TkUtil::Charset::UTF_8); - cmd << getContextAlias() << "." << "getTopoManager().replaceTransfiniteByDirectionalMeshMethodAsPossible()"; - command->setScriptCommand(cmd); - - getCommandManager().addCommand(command, Utils::Command::DO); - - Internal::M3DCommandResultIfc* cmdResult = - new Internal::M3DCommandResult (*command); - return cmdResult; -} -/*----------------------------------------------------------------------------*/ Mgx3D::Internal::M3DCommandResultIfc* TopoManager::unrefine(std::string nbloc, std::string narete, int ratio) { return unrefine(getBlock(nbloc), getCoEdge(narete), ratio); diff --git a/src/Core/Topo/TopoManagerIfc.cpp b/src/Core/Topo/TopoManagerIfc.cpp index 4675531..8196976 100644 --- a/src/Core/Topo/TopoManagerIfc.cpp +++ b/src/Core/Topo/TopoManagerIfc.cpp @@ -85,12 +85,6 @@ TopoManagerIfc::newFreeTopoInGroup(std::string ne, int dim) } /*----------------------------------------------------------------------------*/ Mgx3D::Internal::M3DCommandResultIfc* -TopoManagerIfc::newInsertionTopoOnGeometry(std::string ne) -{ - throw TkUtil::Exception ("TopoManagerIfc::newInsertionTopoOnGeometry should be overloaded."); -} -/*----------------------------------------------------------------------------*/ -Mgx3D::Internal::M3DCommandResultIfc* TopoManagerIfc::newBoxWithTopo( const Utils::Math::Point& pmin, const Utils::Math::Point& pmax, bool meshStructured, std::string groupName) { @@ -482,12 +476,6 @@ TopoManagerIfc::setBlockMeshingProperty(BlockMeshingProperty& emp, std::string b } /*----------------------------------------------------------------------------*/ Mgx3D::Internal::M3DCommandResultIfc* -TopoManagerIfc::replaceTransfiniteByDirectionalMeshMethodAsPossible() -{ - throw TkUtil::Exception ("TopoManagerIfc::replaceTransfiniteByDirectionalMeshMethodAsPossible should be overloaded."); -} -/*----------------------------------------------------------------------------*/ -Mgx3D::Internal::M3DCommandResultIfc* TopoManagerIfc::setNbMeshingEdges(std::string edge, int nb, std::vector& frozed_edges_names) { throw TkUtil::Exception ("TopoManagerIfc::setNbMeshingEdges should be overloaded."); diff --git a/src/Core/protected/Internal/ServiceGeomToTopo.h b/src/Core/protected/Internal/ServiceGeomToTopo.h index 34f313d..1a67f60 100644 --- a/src/Core/protected/Internal/ServiceGeomToTopo.h +++ b/src/Core/protected/Internal/ServiceGeomToTopo.h @@ -59,11 +59,6 @@ class ServiceGeomToTopo { */ bool convertBlockStructured(const int ni, const int nj, const int nk); - /*------------------------------------------------------------------------*/ - /** Convertion du bloc issue de la géométrie en un bloc pour l'insertion - * */ - void convertInsertionBlock(); - /*------------------------------------------------------------------------*/ /** Retourne le bloc construit */ Topo::Block* getBlock(); diff --git a/src/Core/protected/Topo/Block.h b/src/Core/protected/Topo/Block.h index cfd1f03..2f1b919 100644 --- a/src/Core/protected/Topo/Block.h +++ b/src/Core/protected/Topo/Block.h @@ -70,9 +70,7 @@ class Block : public TopoEntity { /*------------------------------------------------------------------------*/ /// Constructeur par défaut, maillage structuré - Block(Internal::Context& c, int ni=0, int nj=0, int nk=0, - BlockMeshingProperty::meshLaw ml = BlockMeshingProperty::directional, - BlockMeshingProperty::meshDirLaw md = BlockMeshingProperty::dir_i); + Block(Internal::Context& c, int ni=0, int nj=0, int nk=0); /*------------------------------------------------------------------------*/ /// Constructeur par copie @@ -544,20 +542,6 @@ class Block : public TopoEntity { /// met à jour les associations void _init(); - /*------------------------------------------------------------------------*/ - /** Affecte à une face une méthode de maillage suivant une direction (ou rotation) - * si cela est possible - * c'est à dire, si cela suit une des arêtes de la face - * Ne fait rien si c'est orthogonal à la face - * - * \param new_ppty une méthode de maillage suivant une direction ou une rotation - * \param dirCoedges les arêtes qui suivent la direction de la méthode de maillage - * \param coface la face pour laquelle on cherche à mettre la même direction de maillage - */ - void _setDirectionMeshLawToFace(BlockMeshingProperty* new_ppty, - std::vector& dirCoedges, - Topo::CoFace* coface); - /*------------------------------------------------------------------------*/ /// propriétés topologiques de l'arête (liens sur les faces et les sommets) BlockTopoProperty* m_topo_property; diff --git a/src/Core/protected/Topo/BlockMeshingProperty.h b/src/Core/protected/Topo/BlockMeshingProperty.h index 3a8892d..0d352c3 100644 --- a/src/Core/protected/Topo/BlockMeshingProperty.h +++ b/src/Core/protected/Topo/BlockMeshingProperty.h @@ -33,32 +33,10 @@ class BlockMeshingProperty { /** Les méthodes de maillage pour un bloc */ typedef enum{ - directional, - orthogonal, - rotational, transfinite, - delaunayTetgen, // recommandé / delaunayTetgen - insertion + delaunayTetgen } meshLaw; - /** Direction suivant laquelle est effectuée la discrétisation (relative au bloc) - * pour les méthodes avec une direction - */ - typedef enum{ - dir_undef, - dir_i, - dir_j, - dir_k - } meshDirLaw; - - /** Côté de départ pour les discrétisations orientés (tel que BlockMeshingPropertyOrthogonal) - */ - typedef enum{ - side_undef, - side_min, - side_max - } meshSideLaw; - /*------------------------------------------------------------------------*/ #ifndef SWIG /** Création d'un clone, on copie toutes les informations */ @@ -116,18 +94,6 @@ class BlockMeshingProperty { /// Constructeur par copie BlockMeshingProperty(const BlockMeshingProperty& pm) {} - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// Cherche la direction dans le bloc à partir de deux points - static meshDirLaw _computeDir(Block* block, Utils::Math::Point & v1, Utils::Math::Point & v2); - /*------------------------------------------------------------------------*/ - /// Cherche la direction dans le bloc à partir d'une arête - static meshDirLaw _computeDir(Block* block, std::string& coedge_name); - /*------------------------------------------------------------------------*/ - /// Cherche le côté dans le bloc à partir de deux points - static meshSideLaw _computeSide(Block* block, Utils::Math::Point & v1, Utils::Math::Point & v2, uint dir); -#endif - }; /*----------------------------------------------------------------------------*/ } // end namespace Topo diff --git a/src/Core/protected/Topo/BlockMeshingPropertyDirectional.h b/src/Core/protected/Topo/BlockMeshingPropertyDirectional.h deleted file mode 100644 index f8e8e6c..0000000 --- a/src/Core/protected/Topo/BlockMeshingPropertyDirectional.h +++ /dev/null @@ -1,146 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file BlockMeshingPropertyDirectional.h - * - * \author Eric Brière de l'Isle - * - * \date 17/10/13 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef MGX3D_TOPO_BLOCKMESHINGPROPERTYDIRECTIONAL_H_ -#define MGX3D_TOPO_BLOCKMESHINGPROPERTYDIRECTIONAL_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/BlockMeshingProperty.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété de la discrétisation d'un bloc suivant une direction - */ -class BlockMeshingPropertyDirectional : public BlockMeshingProperty { - -protected: - typedef enum{ - points, - coedge, - dir - } initMethod; - -public: - - /*------------------------------------------------------------------------*/ - /// Constructeur avec direction définie par 2 points - BlockMeshingPropertyDirectional(Utils::Math::Point v1, Utils::Math::Point v2) - : m_method(points), m_dir(dir_undef), m_v1(v1), m_v2(v2), m_coedge_name() - {} - - /// Constructeur dont on connait la direction - BlockMeshingPropertyDirectional(meshDirLaw md) - : m_method(dir), m_dir(md), m_v1(), m_v2(), m_coedge_name() - {} - - /// Constructeur avec direction définie par une arête - BlockMeshingPropertyDirectional(std::string coedgeName) - : m_method(coedge), m_dir(dir_undef), m_v1(), m_v2(), m_coedge_name(coedgeName) - {} - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /** Création d'un clone, on copie toutes les informations */ - virtual BlockMeshingPropertyDirectional* clone() {return new BlockMeshingPropertyDirectional(*this);} -#endif - /*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - virtual BlockMeshingProperty::meshLaw getMeshLaw() const {return BlockMeshingProperty::directional;} - - /*------------------------------------------------------------------------*/ - /// Accesseur sur le nom de la méthode de maillage - virtual std::string getMeshLawName() const - { - if (m_dir == dir_i) - return "DirectionI"; - else if (m_dir == dir_j) - return "DirectionJ"; - else if (m_dir == dir_k) - return "DirectionK"; - else - return "Direction à préciser"; - } - - /*------------------------------------------------------------------------*/ - /// Accesseur sur la direction associée à la CoFace - virtual uint getDir() const - { - if (m_dir == dir_i) - return 0; - else if (m_dir == dir_j) - return 1; - else if (m_dir == dir_k) - return 2; - else - throw TkUtil::Exception(TkUtil::UTF8String ("BlockMeshingPropertyDirectional::getDir() ne peut se faire sans initialiser la direction", TkUtil::Charset::UTF_8)); - } - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// initialisation de la direction en fonction de ce qui a été donné à la construction - virtual void initDir(Block* bloc) - { - if (m_method == points) - m_dir = _computeDir(bloc, m_v1, m_v2); - else if (m_method == coedge) - m_dir = _computeDir(bloc, m_coedge_name); - } -#endif - - /*------------------------------------------------------------------------*/ - /** \brief Indique si la face est structurée - */ - virtual bool isStructured() const {return true;} - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// Script pour la commande de création Python - virtual TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - if (m_method == points) - o << getMgx3DAlias() << ".BlockMeshingPropertyDirectional(" - << m_v1.getScriptCommand() << ", " - << m_v2.getScriptCommand() << ")"; - else if (m_method == coedge) - o << getMgx3DAlias() << ".BlockMeshingPropertyDirectional(\"" - << m_coedge_name << "\")"; - return o; - } -#endif - -protected: - /*------------------------------------------------------------------------*/ - /// méthode suivant laquelle est initialisée la direction - initMethod m_method; - - /// Direction suivant laquelle est effectuée la discrétisation (relative au bloc) - meshDirLaw m_dir; - - /// premier point pour déterminer la direction - Utils::Math::Point m_v1; - - /// deuxième point pour déterminer la direction - Utils::Math::Point m_v2; - - /// nom d'une arête du bloc pour déterminer la direction - std::string m_coedge_name; -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ - -#endif /* MGX3D_TOPO_BLOCKMESHINGPROPERTYDIRECTIONAL_H_ */ diff --git a/src/Core/protected/Topo/BlockMeshingPropertyInsertion.h b/src/Core/protected/Topo/BlockMeshingPropertyInsertion.h deleted file mode 100644 index 87127d0..0000000 --- a/src/Core/protected/Topo/BlockMeshingPropertyInsertion.h +++ /dev/null @@ -1,84 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file BlockMeshingPropertyInsertion.h - * - * \author Eric Brière de l'Isle - * - * \date 17/10/13 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef MGX3D_TOPO_BLOCKMESHINGPROPERTYINSERTION_H_ -#define MGX3D_TOPO_BLOCKMESHINGPROPERTYINSERTION_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/BlockMeshingProperty.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété pour un bloc associé à la méthode insertion - */ -class BlockMeshingPropertyInsertion : public BlockMeshingProperty { -public: - - /*------------------------------------------------------------------------*/ - BlockMeshingPropertyInsertion() - : m_withRefinement(false) - {} - - /*------------------------------------------------------------------------*/ - BlockMeshingPropertyInsertion(const bool AWithRefinement) - : m_withRefinement(AWithRefinement) - {} - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /** Création d'un clone, on copie toutes les informations */ - BlockMeshingPropertyInsertion* clone() {return new BlockMeshingPropertyInsertion(*this);} -#endif - /*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - BlockMeshingProperty::meshLaw getMeshLaw() const {return BlockMeshingProperty::insertion;} - - /*------------------------------------------------------------------------*/ - /// Accesseur sur le nom de la méthode de maillage - std::string getMeshLawName() const { return "Insertion"; } - - /*------------------------------------------------------------------------*/ - /** \brief Indique si la méthode est structurée - */ - bool isStructured() const {return false;} - - /*------------------------------------------------------------------------*/ - /** \brief Indique si le maillage doit être rafiné - */ - bool withRefinement() const { return m_withRefinement; } - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// Script pour la commande de création Python - TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - o << getMgx3DAlias() << ".BlockMeshingPropertyInsertion()"; - return o; - } -#endif - -private: - - // Indique s'il y aura rafinement du maillage pour aider l'insertion - bool m_withRefinement; - -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ - -#endif /* MGX3D_TOPO_BLOCKMESHINGPROPERTYINSERTION_H_ */ diff --git a/src/Core/protected/Topo/BlockMeshingPropertyOrthogonal.h b/src/Core/protected/Topo/BlockMeshingPropertyOrthogonal.h deleted file mode 100644 index 15c2011..0000000 --- a/src/Core/protected/Topo/BlockMeshingPropertyOrthogonal.h +++ /dev/null @@ -1,137 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file BlockMeshingPropertyOrthogonal.h - * - * \author Eric Brière de l'Isle - * - * \date 6/7/15 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef MGX3D_TOPO_BLOCKMESHINGPROPERTYORTHOGONAL_H_ -#define MGX3D_TOPO_BLOCKMESHINGPROPERTYORTHOGONAL_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/BlockMeshingPropertyDirectional.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété de la discrétisation d'un bloc suivant une direction - */ -class BlockMeshingPropertyOrthogonal : public BlockMeshingPropertyDirectional { - -public: - - /*------------------------------------------------------------------------*/ - /// Constructeur avec direction définie par 2 points, orthogonalité du côté du départ - BlockMeshingPropertyOrthogonal(Utils::Math::Point v1, Utils::Math::Point v2, - int nbLayers) -: BlockMeshingPropertyDirectional(v1,v2) -, m_side(side_undef) -, m_nbLayers(nbLayers) -{} - - /// Constructeur avec direction définie par une arête - BlockMeshingPropertyOrthogonal(std::string coedgeName, int nbLayers) -: BlockMeshingPropertyDirectional(coedgeName) -, m_side(side_undef) -, m_nbLayers(nbLayers) -{} - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /** Création d'un clone, on copie toutes les informations */ - virtual BlockMeshingPropertyOrthogonal* clone() - {return new BlockMeshingPropertyOrthogonal(*this);} -#endif - /*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - virtual BlockMeshingProperty::meshLaw getMeshLaw() const - {return BlockMeshingProperty::orthogonal;} - - /*------------------------------------------------------------------------*/ - /// Accesseur sur le nom de la méthode de maillage - virtual std::string getMeshLawName() const - { - if (m_dir == dir_i) - return "OrthogonalI"; - else if (m_dir == dir_j) - return "OrthogonalJ"; - else if (m_dir == dir_k) - return "OrthogonalK"; - else - return "Direction à préciser"; - } - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// Script pour la commande de création Python - virtual TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - if (m_method == points) - o << getMgx3DAlias() << ".BlockMeshingPropertyOrthogonal(" - << m_v1.getScriptCommand() << ", " - << m_v2.getScriptCommand() << ", " - << (long)m_nbLayers << ")"; - else - throw TkUtil::Exception(TkUtil::UTF8String ("Erreur interne avec getScriptCommand", TkUtil::Charset::UTF_8)); - return o; - } - /*------------------------------------------------------------------------*/ - /// initialisation du côté en plus - virtual void initDir(Block* bloc) - { - BlockMeshingPropertyDirectional::initDir(bloc); - - if (m_method == points) - m_side = _computeSide(bloc, m_v1, m_v2, getDir()); - else - throw TkUtil::Exception("Erreur interne avec initDir"); - } - - /*------------------------------------------------------------------------*/ - virtual uint getSide() const - { - if (m_side == side_min) - return 0; - else if (m_side == side_max) - return 1; - else - throw TkUtil::Exception(TkUtil::UTF8String ("BlockMeshingPropertyOrthogonal::getSide() ne peut se faire sans initialiser le côté", TkUtil::Charset::UTF_8)); - } - /*------------------------------------------------------------------------*/ - /// ajoute la description des propriétés spécifiques - virtual void addProperties(Utils::SerializedRepresentation& ppt) const - { - ppt.addProperty ( - Utils::SerializedRepresentation::Property ("Nombre de couches orthogonales", (long)m_nbLayers)); - ppt.addProperty ( - Utils::SerializedRepresentation::Property ("Discrétisation orthogonale coté", - m_side == side_min?std::string("départ"):std::string("arrivée"))); - } - -#endif - /*------------------------------------------------------------------------*/ - virtual int getNbLayers() const - { return m_nbLayers; } - /*------------------------------------------------------------------------*/ - -private: - /// coté où on se contraint à être orthogonal - meshSideLaw m_side; - - /// nombre de couches pour orthogonalité - int m_nbLayers; -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ - -#endif /* MGX3D_TOPO_BLOCKMESHINGPROPERTYORTHOGONAL_H_ */ diff --git a/src/Core/protected/Topo/BlockMeshingPropertyRotational.h b/src/Core/protected/Topo/BlockMeshingPropertyRotational.h deleted file mode 100644 index 8ece499..0000000 --- a/src/Core/protected/Topo/BlockMeshingPropertyRotational.h +++ /dev/null @@ -1,173 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file BlockMeshingPropertyRotational.h - * - * \author Eric Brière de l'Isle - * - * \date 17/10/13 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef MGX3D_TOPO_BLOCKMESHINGPROPERTYROTATIONAL_H_ -#define MGX3D_TOPO_BLOCKMESHINGPROPERTYROTATIONAL_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/BlockMeshingProperty.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété de la discrétisation d'un bloc suivant une direction par rotation - */ -class BlockMeshingPropertyRotational : public BlockMeshingProperty { - - typedef enum{ - points, - coedge, - dir - } initMethod; - -public: - - /*------------------------------------------------------------------------*/ - /// Constructeur avec 2 points qui définissent la direction et 2 autres points pour l'axe de rotation - BlockMeshingPropertyRotational(Utils::Math::Point v1, Utils::Math::Point v2, - Utils::Math::Point axis1, Utils::Math::Point axis2) - : m_method(points), m_dir(dir_undef), m_v1(v1), m_v2(v2), m_axis1(axis1), m_axis2(axis2), m_coedge_name() - {} - - /// Constructeur une direction définie et 2 points pour l'axe de rotation - BlockMeshingPropertyRotational(meshDirLaw md, - Utils::Math::Point axis1, Utils::Math::Point axis2) - : m_method(dir), m_dir(md), m_v1(), m_v2(), m_axis1(axis1), m_axis2(axis2), m_coedge_name() - {} - - /// Constructeur une arête et 2 points pour l'axe de rotation - BlockMeshingPropertyRotational(std::string coedgeName, - Utils::Math::Point axis1, Utils::Math::Point axis2) - : m_method(coedge), m_dir(dir_undef), m_v1(), m_v2(), m_axis1(axis1), m_axis2(axis2), m_coedge_name(coedgeName) - {} - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /** Création d'un clone, on copie toutes les informations */ - BlockMeshingPropertyRotational* clone() {return new BlockMeshingPropertyRotational(*this);} -#endif - /*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - BlockMeshingProperty::meshLaw getMeshLaw() const {return BlockMeshingProperty::rotational;} - - /*------------------------------------------------------------------------*/ - /// Accesseur sur le nom de la méthode de maillage - std::string getMeshLawName() const - { - if (m_dir == dir_i) - return "RotationI"; - else if (m_dir == dir_j) - return "RotationJ"; - else if (m_dir == dir_k) - return "RotationK"; - else - return "Rotation à préciser"; - } - - /*------------------------------------------------------------------------*/ - /// Accesseur sur la direction associée à la CoFace - uint getDir() const - { - if (m_dir == dir_i) - return 0; - else if (m_dir == dir_j) - return 1; - else if (m_dir == dir_k) - return 2; - else - throw TkUtil::Exception(TkUtil::UTF8String ("BlockMeshingPropertyRotational::getDir() ne peut se faire sans initialiser la direction", TkUtil::Charset::UTF_8)); - } - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// initialisation de la direction en fonction de ce qui a été donné à la construction - void initDir(Block* bloc) - { - if (m_method == points) - m_dir = _computeDir(bloc, m_v1, m_v2); - else if (m_method == coedge) - m_dir = _computeDir(bloc, m_coedge_name); - } -#endif - - /*------------------------------------------------------------------------*/ - /** \brief Indique si la face est structurée - */ - bool isStructured() const {return true;} - - /*------------------------------------------------------------------------*/ - /** Retourne l'axe de rotation */ - void getAxis(Utils::Math::Point & axis1, Utils::Math::Point & axis2) - { - axis1 = m_axis1; - axis2 = m_axis2; - } - /*------------------------------------------------------------------------*/ - /** Change l'axe de rotation */ - void setAxis(Utils::Math::Point & axis1, Utils::Math::Point & axis2) - { - m_axis1 = axis1; - m_axis2 = axis2; - } - - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// Script pour la commande de création Python - TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - if (m_method == points) - o << getMgx3DAlias() << ".BlockMeshingPropertyRotational(" - << m_v1.getScriptCommand() << ", " - << m_v2.getScriptCommand() << ", " - << m_axis1.getScriptCommand() << ", " - << m_axis2.getScriptCommand() << ")"; - else if (m_method == coedge) - o << getMgx3DAlias() << ".BlockMeshingPropertyRotational(\"" - << m_coedge_name <<"\", " - << m_axis1.getScriptCommand() << ", " - << m_axis2.getScriptCommand() << ")"; - return o; - } -#endif - -private: - /*------------------------------------------------------------------------*/ - /// méthode suivant laquelle est initialisée la direction - initMethod m_method; - - /// Direction suivant laquelle est effectuée la discrétisation (relative au bloc) - meshDirLaw m_dir; - - /// premier point pour déterminer la direction de la rotation - Utils::Math::Point m_v1; - - /// deuxième point pour déterminer la direction de la rotation - Utils::Math::Point m_v2; - - /// premier point pour l'axe de rotation de la méthode "rotation" - Utils::Math::Point m_axis1; - - /// deuxième point pour l'axe de rotation de la méthode "rotation" - Utils::Math::Point m_axis2; - - /// nom d'une arête du bloc pour déterminer la direction - std::string m_coedge_name; -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ - -#endif /* MGX3D_TOPO_BLOCKMESHINGPROPERTYROTATIONAL_H_ */ diff --git a/src/Core/protected/Topo/CommandNewTopoOnGeometry.h b/src/Core/protected/Topo/CommandNewTopoOnGeometry.h index a448cd8..0c494c3 100644 --- a/src/Core/protected/Topo/CommandNewTopoOnGeometry.h +++ b/src/Core/protected/Topo/CommandNewTopoOnGeometry.h @@ -31,9 +31,9 @@ class CommandNewTopoOnGeometry: public Topo::CommandCreateTopo{ public: /** type de topologie demandée, non structuré, structuré avec projection, - * un bloc sans projection, ou un bloc pour l'insertion + * un bloc sans projection */ - enum eTopoType { UNSTRUCTURED_BLOCK, STRUCTURED_BLOCK, FREE_BLOCK, INSERTION_BLOCK, ASSOCIATED_TOPO }; + enum eTopoType { UNSTRUCTURED_BLOCK, STRUCTURED_BLOCK, FREE_BLOCK, ASSOCIATED_TOPO }; /*------------------------------------------------------------------------*/ /** \brief Constructeur @@ -123,9 +123,6 @@ class CommandNewTopoOnGeometry: public Topo::CommandCreateTopo{ /// dimension de l'entité topo libre short m_dim; - /// cas d'un bloc pour l'insertion - bool m_insertionBlock; - /// nom du groupe pour cas d'un bloc seul (sans projection) std::string m_groupName; diff --git a/src/Core/protected/Topo/CommandReplaceTransfiniteMethod.h b/src/Core/protected/Topo/CommandReplaceTransfiniteMethod.h deleted file mode 100644 index 674363a..0000000 --- a/src/Core/protected/Topo/CommandReplaceTransfiniteMethod.h +++ /dev/null @@ -1,81 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file CommandReplaceTransfiniteMethod.h - * - * \author Eric Brière de l'Isle - * - * \date 8/1/15 - */ -/*----------------------------------------------------------------------------*/ -#ifndef COMMANDREPLACETRANSFINITEMETHOD_H_ -#define COMMANDREPLACETRANSFINITEMETHOD_H_ -/*----------------------------------------------------------------------------*/ -#include "Mesh/CommandCreateMesh.h" -//#include "Topo/CommandEditTopo.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -class CoEdge; -/*----------------------------------------------------------------------------*/ -/** \class CommandReplaceTransfiniteMethod - * \brief Commande qui change la discrétisation pour les cofaces et blocks - * dans le cas transfinie pour mettre autant que possible une méthode directionnelle - * car celles-ci sont plus rapides pour la création d'un maillage - */ -/*----------------------------------------------------------------------------*/ -class CommandReplaceTransfiniteMethod: public Mesh::CommandCreateMesh { - -public: - - /*------------------------------------------------------------------------*/ - /** \brief Constructeur - * - * \param c le contexte - */ - CommandReplaceTransfiniteMethod(Internal::Context& c); - - /*------------------------------------------------------------------------*/ - /** \brief Destructeur - */ - virtual ~CommandReplaceTransfiniteMethod(); - - /*------------------------------------------------------------------------*/ - /** \brief exécute la commande - */ - virtual void internalExecute(); - - /*------------------------------------------------------------------------*/ - /** - * la commande a vocation à être lancée dans un autre thread. - */ - virtual bool threadable ( ) const - { return true; } - - /*------------------------------------------------------------------------*/ - /** \brief appel non prévu - */ - virtual void getPreviewRepresentation(Utils::DisplayRepresentation& dr); - - /*------------------------------------------------------------------------*/ - /// estimation du temps prévu pour mailler les blocs - virtual unsigned long getEstimatedDuration (PLAY_TYPE playType = DO); - -private: - /// retourne vrai si tous les points des discrétisations sont alignés - virtual bool isRectiligne(Edge* edge); - /// retourne vrai si tous les points des discrétisations sont alignés - virtual bool isRectiligne(std::vector& coedges); - /// retourne vrai si tous les points de la discrétisations sont alignés - virtual bool isRectiligne(CoEdge* coedge); - - /// stockage temporaire à 1 si une discrétisation d'une arête est jugée rectiligne, 2 sinon, 0 quand on ne sait pas encore - std::map m_coedge_isRectiligne; -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ -#endif /* COMMANDREPLACETRANSFINITEMETHOD_H_ */ -/*----------------------------------------------------------------------------*/ diff --git a/src/Core/protected/Topo/TopoManager.h b/src/Core/protected/Topo/TopoManager.h index eb3d3a5..fd283c8 100644 --- a/src/Core/protected/Topo/TopoManager.h +++ b/src/Core/protected/Topo/TopoManager.h @@ -196,17 +196,6 @@ class TopoManager: public Topo::TopoManagerIfc { virtual Mgx3D::Internal::M3DCommandResultIfc* newUnstructuredTopoOnGeometry(Geom::GeomEntity* ge); - /*------------------------------------------------------------------------*/ - /** \brief Création d'une topologie pour l'insertion s'appuyant sur une géométrie - * - * \param ne le nom de l'entité géométrique sur laquelle s'appuiera la topologie - */ - virtual Mgx3D::Internal::M3DCommandResultIfc* - newInsertionTopoOnGeometry(std::string ne); - - virtual Mgx3D::Internal::M3DCommandResultIfc* - newInsertionTopoOnGeometry(Geom::GeomEntity* ge); - /*------------------------------------------------------------------------*/ /** \brief création d'une boite parallèle aux axes Ox,Oy et Oz à partir des * points pmin et pmax où pmin est le point de plus petites @@ -1360,14 +1349,6 @@ class TopoManager: public Topo::TopoManagerIfc { virtual Mgx3D::Internal::M3DCommandResultIfc* setBlockMeshingProperty(Topo::BlockMeshingProperty& emp, Topo::Block* bl); - /*------------------------------------------------------------------------*/ - /** \brief Change la propriété de discrétisation pour les faces et les blocs. - * Sélectionne la méthode directionnelle si possible à la place de la méthode - * transfinie (car plus longue pour mailler) - */ - virtual Mgx3D::Internal::M3DCommandResultIfc* - replaceTransfiniteByDirectionalMeshMethodAsPossible(); - /*------------------------------------------------------------------------*/ /** \brief Déraffine un bloc structuré suivant une direction * diff --git a/src/Core/protected/Topo/TopoManagerIfc.h b/src/Core/protected/Topo/TopoManagerIfc.h index ad7a13b..1f7184d 100644 --- a/src/Core/protected/Topo/TopoManagerIfc.h +++ b/src/Core/protected/Topo/TopoManagerIfc.h @@ -160,15 +160,6 @@ class TopoManagerIfc: public Internal::CommandCreator newFreeTopoInGroup(std::string ng, int dim); SET_SWIG_COMPLETABLE_METHOD(newFreeTopoInGroup) - /*------------------------------------------------------------------------*/ - /** \brief Création d'une topologie pour l'insertion s'appuyant sur une géométrie - * - * \param ne le nom de l'entité géométrique sur laquelle s'appuiera la topologie - */ - virtual Mgx3D::Internal::M3DCommandResultIfc* - newInsertionTopoOnGeometry(std::string ne); - SET_SWIG_COMPLETABLE_METHOD(newInsertionTopoOnGeometry) - /*------------------------------------------------------------------------*/ /** \brief Création d'une boite parallèle aux axes Ox,Oy et Oz à partir des * points pmin et pmax où pmin est le point de plus petites @@ -835,15 +826,6 @@ class TopoManagerIfc: public Internal::CommandCreator setBlockMeshingProperty(Topo::BlockMeshingProperty& emp, std::string bl); SET_SWIG_COMPLETABLE_METHOD(setBlockMeshingProperty) - /*------------------------------------------------------------------------*/ - /** \brief Change la propriété de discrétisation pour les faces et les blocs. - * Sélectionne la méthode directionnelle si possible à la place de la méthode - * transfinie (car plus longue pour mailler) - */ - virtual Mgx3D::Internal::M3DCommandResultIfc* - replaceTransfiniteByDirectionalMeshMethodAsPossible(); - SET_SWIG_COMPLETABLE_METHOD(replaceTransfiniteByDirectionalMeshMethodAsPossible) - /*------------------------------------------------------------------------*/ /** \brief Change la discrétisation pour une arête commune (en nombre de bras seulement) * et propage le changement aux arêtes parallèles pour maintenir la structuration diff --git a/src/QtComponents/QtBlockMeshingPropertyAction.cpp b/src/QtComponents/QtBlockMeshingPropertyAction.cpp index 105ef75..5173658 100644 --- a/src/QtComponents/QtBlockMeshingPropertyAction.cpp +++ b/src/QtComponents/QtBlockMeshingPropertyAction.cpp @@ -87,713 +87,6 @@ BlockMeshingPropertyTransfinite* QtBlockTransfinitePanel::getMeshingProperty ( ) } // QtBlockTransfinitePanel::getMeshingProperty -// =========================================================================== -// LA CLASSE QtBlockDirectionalPanel -// =========================================================================== - - -QtBlockDirectionalPanel::QtBlockDirectionalPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtMgx3DOperationsSubPanel (parent, window, mainPanel), - _edgeTextField (0), _invertCheckBox (0), _directionLabel (0), - _useEdgeNameCheckBox (0) -{ - QVBoxLayout* layout = new QVBoxLayout (this); - setLayout (layout); - layout->setContentsMargins (0, 0, 0, 0); - layout->setSpacing (5); - - // La direction du maillage : - _edgeTextField = new QtMgx3DEdgePanel ( - this, "", true, "", &window, FilterEntity::TopoCoEdge); - _edgeTextField->getEntityPanel ( ).setLabel ("Arête directionnelle :"); - layout->addWidget (_edgeTextField); - connect (&_edgeTextField->getEntityTextField ( ), - SIGNAL (selectionModified (QString)), this, - SLOT (directionModifiedCallback ( ))); - - // Faut il inverser le vecteur ? - _invertCheckBox = new QCheckBox ("Inverser le vecteur", this); - layout->addWidget (_invertCheckBox); - connect (_invertCheckBox, SIGNAL (stateChanged (int)), this, - SLOT (directionModifiedCallback ( ))); - - // Le vecteur : ??? - QHBoxLayout* hlayout = new QHBoxLayout ( ); - layout->addLayout (hlayout); - QLabel* label = new QLabel ("Direction :", this); - hlayout->addWidget (label); - _directionLabel = new QLabel ("", this); - hlayout->addWidget (_directionLabel); - - // Faut-il utiliser le nom de l'arête ou le vecteur ? - _useEdgeNameCheckBox = new QCheckBox(QString::fromUtf8("Utiliser le nom de l'arête"), this); - layout->addWidget (_useEdgeNameCheckBox); - _useEdgeNameCheckBox->setCheckState (Qt::Checked); - _useEdgeNameCheckBox->setToolTip (QString::fromUtf8("L'utilisation du nom de l'arête permet de suivre les évolution de celle-ci. L'utilisation du vecteur est définitive.")); - - hlayout->addStretch (2.); -} // QtBlockDirectionalPanel::QtBlockDirectionalPanel - - -QtBlockDirectionalPanel::QtBlockDirectionalPanel ( - const QtBlockDirectionalPanel& p) - : QtMgx3DOperationsSubPanel (p), - _edgeTextField (0), _invertCheckBox (0), _directionLabel (0), - _useEdgeNameCheckBox (0) -{ - MGX_FORBIDDEN ("QtBlockDirectionalPanel copy constructor is not allowed."); -} // QtBlockDirectionalPanel::QtBlockDirectionalPanel - - -QtBlockDirectionalPanel& QtBlockDirectionalPanel::operator = ( - const QtBlockDirectionalPanel&) -{ - MGX_FORBIDDEN ("QtBlockDirectionalPanel assignment operator is not allowed."); - return *this; -} // QtBlockDirectionalPanel::operator = - - -QtBlockDirectionalPanel::~QtBlockDirectionalPanel ( ) -{ -} // QtBlockDirectionalPanel::~QtBlockDirectionalPanel - - -void QtBlockDirectionalPanel::reset ( ) -{ - BEGIN_QT_TRY_CATCH_BLOCK - - CHECK_NULL_PTR_ERROR (_edgeTextField) - _edgeTextField->reset ( ); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - QtMgx3DOperationPanel::reset ( ); -} // QtBlockDirectionalPanel::reset - - -void QtBlockDirectionalPanel::cancel ( ) -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) - _edgeTextField->stopSelection ( ); - - if (true == cancelClearEntities ( )) - { - BEGIN_QT_TRY_CATCH_BLOCK - - _edgeTextField->setUniqueName (""); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - } // if (true == cancelClearEntities ( )) - - QtMgx3DOperationsSubPanel::cancel ( ); -} // QtBlockDirectionalPanel::cancel - - -void QtBlockDirectionalPanel::autoUpdate ( ) -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) -#ifdef AUTO_UPDATE_OLD_SCHEME - if (true == autoUpdateUsesSelection ( )) - { - BEGIN_QT_TRY_CATCH_BLOCK - - vector selectedEdges = - getSelectionManager ( ).getEntitiesNames (FilterEntity::TopoCoEdge); - if (1 == selectedEdges.size ( )) - { - CHECK_NULL_PTR_ERROR (_edgeTextField) - _edgeTextField->setUniqueName (selectedEdges [0]); - } - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - } // if (true == autoUpdateUsesSelection ( )) -#else // AUTO_UPDATE_OLD_SCHEME - _edgeTextField->getEntityPanel ( ).clearSelection ( ); -#endif // AUTO_UPDATE_OLD_SCHEME - - QtMgx3DOperationsSubPanel::autoUpdate ( ); - - _edgeTextField->actualizeGui (true); -} // QtBlockDirectionalPanel::autoUpdate - - -void QtBlockDirectionalPanel::setVisible (bool visible) -{ - preview (visible, true); - QtMgx3DOperationsSubPanel::setVisible (visible); -} // QtBlockDirectionalPanel::setVisible - - -Math::Point QtBlockDirectionalPanel::getPoint1 ( ) const -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) - const CoEdge* edge = getContext ( ).getTopoManager ( ).getCoEdge ( - _edgeTextField->getUniqueName( )); - CHECK_NULL_PTR_ERROR (edge) - size_t index = false == isEdgeInverted ( ) ? - 0 : edge->getNbVertices ( ) - 1; - const Vertex* v1 = edge->getVertex (index); - CHECK_NULL_PTR_ERROR (v1) - - return v1->getCoord ( ); -} // QtBlockDirectionalPanel::getPoint1 - - -Math::Point QtBlockDirectionalPanel::getPoint2 ( ) const -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) - const CoEdge* edge = getContext ( ).getTopoManager ( ).getCoEdge ( - _edgeTextField->getUniqueName( )); - CHECK_NULL_PTR_ERROR (edge) - size_t index = true == isEdgeInverted ( ) ? - 0 : edge->getNbVertices ( ) - 1; - const Vertex* v2 = edge->getVertex (index); - CHECK_NULL_PTR_ERROR (v2) - - return v2->getCoord ( ); -} // QtBlockDirectionalPanel::getPoint2 - - -BlockMeshingPropertyDirectional* QtBlockDirectionalPanel::getMeshingProperty ( ) const -{ - BlockMeshingPropertyDirectional* bmpd = true == useEdgeName ( ) ? - new BlockMeshingPropertyDirectional (getEdgeName ( )) : - new BlockMeshingPropertyDirectional (getPoint1 ( ), getPoint2 ( )); - - return bmpd; -} // QtBlockDirectionalPanel::getMeshingProperty - - -bool QtBlockDirectionalPanel::isEdgeInverted ( ) const -{ - CHECK_NULL_PTR_ERROR (_invertCheckBox) - return Qt::Checked == _invertCheckBox->checkState ( ) ? true : false; -} // QtBlockDirectionalPanel::isEdgeInverted - - -bool QtBlockDirectionalPanel::useEdgeName ( ) const -{ - CHECK_NULL_PTR_ERROR (_useEdgeNameCheckBox) - return Qt::Checked == _useEdgeNameCheckBox->checkState ( ) ? true : false; -} // QtBlockDirectionalPanel::useEdgeName - - -string QtBlockDirectionalPanel::getEdgeName ( ) const -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) - return _edgeTextField->getUniqueName ( ); -} // QtBlockDirectionalPanel::getEdgeName - - -void QtBlockDirectionalPanel::stopSelection ( ) -{ - if (0 != _edgeTextField) - _edgeTextField->stopSelection ( ); -} // QtBlockDirectionalPanel::stopSelection - - -QtEntityIDTextField* QtBlockDirectionalPanel::getEdgeTextField ( ) -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) - return &_edgeTextField->getEntityTextField ( ); -} // QtBlockDirectionalPanel::getEdgeTextField - - -void QtBlockDirectionalPanel::preview (bool on, bool destroyInteractor) -{ - Math::Point p1, p2; - try - { - CHECK_NULL_PTR_ERROR (_directionLabel) - p1 = getPoint1 ( ); - p2 = getPoint2 ( ); - UTF8String label (Charset::UTF_8); - label << "(" << MgxNumeric::userRepresentation (p1.getX ( )) - << ", " << MgxNumeric::userRepresentation (p1.getY ( )) << ",\n" - << MgxNumeric::userRepresentation (p1.getZ ( )) << ") -> (" - << MgxNumeric::userRepresentation (p2.getX ( )) - << ",\n" << MgxNumeric::userRepresentation (p2.getY ( )) << ", " - << MgxNumeric::userRepresentation (p2.getZ ( )) - << ")"; - _directionLabel->setText (label.ascii ( ).c_str ( )); - } - catch (...) - { - } - - try - { - // Quoi qu'il arrive on détruit l'éventuel aperçu existant : - removePreviewedObjects ( ); - } - catch (...) - { - } - - try - { - if (true == previewResult ( )) - { - if (true == on) - { - DisplayProperties properties; - properties.setWireColor (Color ( - 255 * Resources::instance ( )._previewColor.getRed ( ), - 255 * Resources::instance ( )._previewColor.getGreen ( ), - 255 * Resources::instance ( )._previewColor.getBlue ( ))); - properties.setLineWidth ( - Resources::instance ( )._previewWidth.getValue( )); - RenderingManager::RepresentationID arrowID = - getRenderingManager ( ).createVector (p1, p2, properties, true); - registerPreviewedObject (arrowID); - } // if (true == on) - } // if (true == previewResult ( )) - } - catch (...) - { - } - - try - { - getRenderingManager ( ).forceRender ( ); - } - catch (...) - { - } -} // QtBlockDirectionalPanel::preview - - -void QtBlockDirectionalPanel::directionModifiedCallback ( ) -{ - preview (true, true); -} // QtBlockDirectionalPanel::directionModifiedCallback - - -// =========================================================================== -// LA CLASSE QtBlockOrthogonalPanel -// =========================================================================== - - -QtBlockOrthogonalPanel::QtBlockOrthogonalPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtBlockDirectionalPanel (parent, window, mainPanel), - _layersNumTextField (0) -{ - QBoxLayout* mainLayout = dynamic_cast(layout ( )); - if (0 == mainLayout) - { - INTERNAL_ERROR (exc, "Mauvais type de layout.", "QtBlockOrthogonalPanel::QtBlockOrthogonalPanel") - throw exc; - } // if (0 == mainLayout) - QHBoxLayout* hlayout = new QHBoxLayout ( ); - mainLayout->addLayout (hlayout); - QLabel* label = new QLabel ("Nombre de couches :", this); - hlayout->addWidget (label); - _layersNumTextField = new QtIntTextField (this); - _layersNumTextField->setValue (5); - hlayout->addWidget (_layersNumTextField); - _layersNumTextField->setRange (0, NumericServices::intMachMax ( )); -} // QtBlockOrthogonalPanel::QtBlockOrthogonalPanel - - -QtBlockOrthogonalPanel::QtBlockOrthogonalPanel (const QtBlockOrthogonalPanel&) - : QtBlockDirectionalPanel (0,*new QtMgx3DMainWindow(0)), - _layersNumTextField (0) -{ - MGX_FORBIDDEN ("QtBlockDelaunayGMSHPanel copy constructor is not allowed."); -} // QtBlockOrthogonalPanel::QtBlockOrthogonalPanel - - -QtBlockOrthogonalPanel& QtBlockOrthogonalPanel::operator = ( - const QtBlockOrthogonalPanel&) -{ - MGX_FORBIDDEN ("QtBlockDelaunayGMSHPanel assignment operator is not allowed."); - return *this; -} // QtBlockOrthogonalPanel::operator = - - -QtBlockOrthogonalPanel::~QtBlockOrthogonalPanel ( ) -{ -} // QtBlockOrthogonalPanel::~QtBlockOrthogonalPanel - - -void QtBlockOrthogonalPanel::reset ( ) -{ - BEGIN_QT_TRY_CATCH_BLOCK - - BlockMeshingPropertyDelaunayTetgen props; // Pour récupérer les valeurs par défaut - CHECK_NULL_PTR_ERROR (_layersNumTextField) - _layersNumTextField->setValue (5); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - QtMgx3DOperationPanel::reset ( ); -} // QtBlockOrthogonalPanel::reset - - -BlockMeshingPropertyOrthogonal* - QtBlockOrthogonalPanel::getMeshingProperty ( ) const -{ - return new BlockMeshingPropertyOrthogonal ( - getPoint1 ( ), getPoint2 ( ), getLayersNum ( )); -} // QtBlockOrthogonalPanel::getMeshingProperty - - -size_t QtBlockOrthogonalPanel::getLayersNum( ) const -{ - CHECK_NULL_PTR_ERROR (_layersNumTextField) - return _layersNumTextField->getValue ( ); -} // QtFaceOrthogonalPanel::getLayersNum - - -// =========================================================================== -// LA CLASSE QtBlockRotationalPanel -// =========================================================================== - - -QtBlockRotationalPanel::QtBlockRotationalPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtMgx3DOperationsSubPanel (parent, window, mainPanel), - _directionTextField (0), _axePoint1Panel (0), _axePoint2Panel (0), - _directionLabel (0), _axeLabel (0) -{ - QVBoxLayout* layout = new QVBoxLayout (this); - setLayout (layout); - layout->setContentsMargins (0, 0, 0, 0); - layout->setSpacing (5); - - // La direction du maillage : - QLabel* label = new QLabel ("Direction", this); - QFont font (label->font ( )); - font.setBold (true); - label->setFont (font); - layout->addWidget (label); - _directionTextField = new QtMgx3DEdgePanel ( - this, "", true, "", &window, FilterEntity::TopoCoEdge); - _directionTextField->getEntityPanel ( ).setLabel ("Arête directionnelle :"); - _directionTextField->layout ( )->setContentsMargins (0, 0, 0, 0); - _directionTextField->layout ( )->setSpacing (0); - _directionTextField->setFixedSize (_directionTextField->sizeHint ( )); - layout->addWidget (_directionTextField); - connect (&_directionTextField->getEntityTextField ( ), - SIGNAL (selectionModified (QString)), this, - SLOT (parametersModifiedCallback ( ))); - QHBoxLayout* hlayout = new QHBoxLayout ( ); - layout->addLayout (hlayout); - label = new QLabel ("Direction :", this); - hlayout->addWidget (label); - _directionLabel = new QLabel ("", this); - hlayout->addWidget (_directionLabel); - hlayout->addStretch (2.); - - // L'axe de rotation : - label = new QLabel ("Axe de rotation", this); - label->setFont (font); - layout->addWidget (label); - _axePoint1Panel = new QtMgx3DPointPanel ( - this, "", true, "x :", "y :", "z :", - 0., -DBL_MAX, DBL_MAX, 0., -DBL_MAX, DBL_MAX, 0., -DBL_MAX, DBL_MAX, - &window, FilterEntity::AllPoints, true); - layout->addWidget (_axePoint1Panel); - connect (_axePoint1Panel, SIGNAL (pointModified ( )), this, - SLOT (parametersModifiedCallback ( ))); - _axePoint2Panel = new QtMgx3DPointPanel ( - this, "", true, "x :", "y :", "z :", - 1., -DBL_MAX, DBL_MAX, 0., -DBL_MAX, DBL_MAX, 0., -DBL_MAX, DBL_MAX, - &window, FilterEntity::AllPoints, true); - layout->addWidget (_axePoint2Panel); - connect (_axePoint2Panel, SIGNAL (pointModified ( )), - this, SLOT (parametersModifiedCallback ( ))); - _axeLabel = new QLabel ("", this); - layout->addWidget (_axeLabel); - - parametersModifiedCallback ( ); -} // QtBlockRotationalPanel::QtBlockRotationalPanel - - -QtBlockRotationalPanel::QtBlockRotationalPanel ( - const QtBlockRotationalPanel& p) - : QtMgx3DOperationsSubPanel (p), _directionTextField (0), - _axePoint1Panel (0), _axePoint2Panel (0), - _directionLabel (0), _axeLabel (0) -{ - MGX_FORBIDDEN ("QtBlockRotationalPanel copy constructor is not allowed."); -} // QtBlockRotationalPanel::QtBlockRotationalPanel - - -QtBlockRotationalPanel& QtBlockRotationalPanel::operator = ( - const QtBlockRotationalPanel&) -{ - MGX_FORBIDDEN ("QtBlockRotationalPanel assignment operator is not allowed."); - return *this; -} // QtBlockRotationalPanel::operator = - - -QtBlockRotationalPanel::~QtBlockRotationalPanel ( ) -{ -} // QtBlockRotationalPanel::~QtBlockRotationalPanel - - -void QtBlockRotationalPanel::reset ( ) -{ - BEGIN_QT_TRY_CATCH_BLOCK - - CHECK_NULL_PTR_ERROR (_directionTextField) - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - _directionTextField->reset ( ); - _axePoint1Panel->reset ( ); - _axePoint2Panel->reset ( ); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - QtMgx3DOperationPanel::reset ( ); -} // QtBlockRotationalPanel::reset - - -void QtBlockRotationalPanel::cancel ( ) -{ - CHECK_NULL_PTR_ERROR (_directionTextField) - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - _directionTextField->stopSelection ( ); - _axePoint1Panel->stopSelection ( ); - _axePoint2Panel->stopSelection ( ); - - if (true == cancelClearEntities ( )) - { - - BEGIN_QT_TRY_CATCH_BLOCK - - _directionTextField->setUniqueName (""); - _axePoint1Panel->setUniqueName (""); - _axePoint2Panel->setUniqueName (""); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - } // if (true == cancelClearEntities ( )) - - QtMgx3DOperationsSubPanel::cancel ( ); -} // QtBlockRotationalPanel::cancel - - -void QtBlockRotationalPanel::autoUpdate ( ) -{ - CHECK_NULL_PTR_ERROR (_directionTextField) - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - -#ifdef AUTO_UPDATE_OLD_SCHEME - if (true == autoUpdateUsesSelection ( )) - { - - BEGIN_QT_TRY_CATCH_BLOCK - - vector names = - getSelectionManager ( ).getEntitiesNames (FilterEntity::TopoCoEdge); - if (1 == names.size ( )) - _directionTextField->setUniqueName (names [0]); - names = getSelectionManager ( ).getEntitiesNames(FilterEntity::AllPoints); - if (2 <= names.size ( )) - { - if (1 <= names.size ( )) - _axePoint1Panel->setUniqueName (names [0]); - if (2 == names.size ( )) - _axePoint2Panel->setUniqueName (names [1]); - } // if (2 <= names.size ( )) - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - } // if (true == autoUpdateUsesSelection ( )) -#else // AUTO_UPDATE_OLD_SCHEME - _directionTextField->setUniqueName (""); - _axePoint1Panel->setUniqueName (""); - _axePoint2Panel->setUniqueName (""); -#endif // AUTO_UPDATE_OLD_SCHEME - - QtMgx3DOperationsSubPanel::autoUpdate ( ); - - _directionTextField->actualizeGui (true); - _axePoint1Panel->actualizeGui (true); - _axePoint2Panel->actualizeGui (true); -} // QtBlockRotationalPanel::autoUpdate - - -void QtBlockRotationalPanel::setVisible (bool visible) -{ - preview (visible, true); - QtMgx3DOperationsSubPanel::setVisible (visible); -} // QtBlockRotationalPanel::setVisible - - -Math::Point QtBlockRotationalPanel::getDirPoint1 ( ) const -{ - CHECK_NULL_PTR_ERROR (_directionTextField) - const CoEdge* edge = getContext ( ).getTopoManager ( ).getCoEdge ( - _directionTextField->getUniqueName( )); - CHECK_NULL_PTR_ERROR (edge) - const Vertex* v1 = edge->getVertex (0); - CHECK_NULL_PTR_ERROR (v1) - - return v1->getCoord ( ); -} // QtBlockRotationalPanel::getDirPoint1 - - -Math::Point QtBlockRotationalPanel::getDirPoint2 ( ) const -{ - CHECK_NULL_PTR_ERROR (_directionTextField) - const CoEdge* edge = getContext ( ).getTopoManager ( ).getCoEdge ( - _directionTextField->getUniqueName( )); - CHECK_NULL_PTR_ERROR (edge) - const Vertex* v2 = edge->getVertex (edge->getNbVertices ( ) - 1); - CHECK_NULL_PTR_ERROR (v2) - - return v2->getCoord ( ); -} // QtBlockRotationalPanel::getDirPoint2 - - -Math::Point QtBlockRotationalPanel::getAxePoint1 ( ) const -{ - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - return Math::Point (_axePoint1Panel->getPoint ( )); -} // QtBlockRotationalPanel::getAxePoint1 - - -Math::Point QtBlockRotationalPanel::getAxePoint2 ( ) const -{ - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - return Math::Point (_axePoint2Panel->getPoint ( )); -} // QtBlockRotationalPanel::getAxePoint2 - - -BlockMeshingPropertyRotational* QtBlockRotationalPanel::getMeshingProperty ( ) const -{ - return new BlockMeshingPropertyRotational ( - getDirPoint1 ( ), getDirPoint2 ( ), getAxePoint1 ( ), getAxePoint2 ( )); -} // QtBlockRotationalPanel::getMeshingProperty - - -void QtBlockRotationalPanel::stopSelection ( ) -{ - if (0 != _directionTextField) - _directionTextField->stopSelection ( ); - if (0 != _axePoint1Panel) - _axePoint1Panel->stopSelection ( ); - if (0 != _axePoint2Panel) - _axePoint2Panel->stopSelection ( ); -} // QtBlockRotationalPanel::stopSelection - - -QtEntityIDTextField* QtBlockRotationalPanel::getEdgeTextField ( ) -{ - CHECK_NULL_PTR_ERROR (_directionTextField) - return &_directionTextField->getEntityTextField ( ); -} // QtBlockRotationalPanel::getEdgeTextField - - -QtEntityIDTextField* QtBlockRotationalPanel::getAxePoint1TextField ( ) -{ - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - return _axePoint1Panel->getVertexTextField ( ); -} // QtBlockRotationalPanel::getAxePoint1TextField - - -QtEntityIDTextField* QtBlockRotationalPanel::getAxePoint2TextField ( ) -{ - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - return _axePoint2Panel->getVertexTextField ( ); -} // QtBlockRotationalPanel::getAxePoint2TextField - - -void QtBlockRotationalPanel::preview (bool on, bool destroyInteractor) -{ - try - { - CHECK_NULL_PTR_ERROR (_directionLabel) - Math::Point p1 = getDirPoint1 ( ), p2 = getDirPoint2 ( ); - UTF8String label (Charset::UTF_8); - label << "(" << MgxNumeric::userRepresentation (p1.getX ( )) - << ", " << MgxNumeric::userRepresentation (p1.getY ( )) << ",\n" - << MgxNumeric::userRepresentation (p1.getZ ( )) << ") -> (" - << MgxNumeric::userRepresentation (p2.getX ( )) - << ",\n" << MgxNumeric::userRepresentation (p2.getY ( )) << ", " - << MgxNumeric::userRepresentation (p2.getZ ( )) - << ")"; - _directionLabel->setText (label.ascii ( ).c_str ( )); - } - catch (...) - { - } - try - { - CHECK_NULL_PTR_ERROR (_axeLabel) - Math::Point p1 = getAxePoint1 ( ), p2 = getAxePoint2 ( ); - UTF8String label (Charset::UTF_8); - label << "(" << MgxNumeric::userRepresentation (p1.getX ( )) - << ", " << MgxNumeric::userRepresentation (p1.getY ( )) << ", " - << MgxNumeric::userRepresentation (p1.getZ ( )) << ") -> (" - << MgxNumeric::userRepresentation (p2.getX ( )) - << ", " << MgxNumeric::userRepresentation (p2.getY ( )) << ", " - << MgxNumeric::userRepresentation (p2.getZ ( )) - << ")"; - _axeLabel->setText (label.ascii ( ).c_str ( )); - } - catch (...) - { - } - - try - { // // Quoi qu'il arrive on détruit l'éventuel aperçu existant : - removePreviewedObjects ( ); - } - catch (...) - { - } - - DisplayProperties properties; - properties.setWireColor (Color ( - 255 * Resources::instance ( )._previewColor.getRed ( ), - 255 * Resources::instance ( )._previewColor.getGreen ( ), - 255 * Resources::instance ( )._previewColor.getBlue ( ))); - properties.setLineWidth (Resources::instance ( )._previewWidth.getValue ( )); - try - { - if (true == on) - { - Math::Point p1 = getAxePoint1 ( ), p2 = getAxePoint2 ( ); - RenderingManager::RepresentationID axeID = - getRenderingManager ( ).createRotationAxe ( - p1, p2, properties, true); - registerPreviewedObject (axeID); - } // if (true == on) - } - catch (...) - { - } - try - { - if (true == on) - { - Math::Point p1 = getDirPoint1 ( ), p2 = getDirPoint2 ( ); - RenderingManager::RepresentationID directionID = - getRenderingManager ( ).createSegment(p1, p2, properties, true); - registerPreviewedObject (directionID); - } // if (true == on) - } - catch (...) - { - } - - try - { - getRenderingManager ( ).forceRender ( ); - } - catch (...) - { - } -} // QtBlockRotationalPanel::preview - - // =========================================================================== // LA CLASSE QtBlockDelaunayTetgenPanel // =========================================================================== @@ -906,51 +199,6 @@ void QtBlockDelaunayTetgenPanel::reset ( ) } // QtBlockDelaunayTetgenPanel::reset -// =========================================================================== -// LA CLASSE QtBlockMeshInsertionPanel -// =========================================================================== - - -QtBlockMeshInsertionPanel::QtBlockMeshInsertionPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtMgx3DOperationsSubPanel (parent, window, mainPanel) -{ - QVBoxLayout* layout = new QVBoxLayout (this); - setLayout (layout); - layout->setContentsMargins (0, 0, 0, 0); - layout->setSpacing (5); -} // QtBlockMeshInsertionPanel::QtBlockMeshInsertionPanel - - -QtBlockMeshInsertionPanel::QtBlockMeshInsertionPanel ( - const QtBlockMeshInsertionPanel& p) - : QtMgx3DOperationsSubPanel (p) -{ - MGX_FORBIDDEN ("QtBlockMeshInsertionPanel copy constructor is not allowed."); -} // QtBlockMeshInsertionPanel::QtBlockMeshInsertionPanel - - -QtBlockMeshInsertionPanel& QtBlockMeshInsertionPanel::operator = ( - const QtBlockMeshInsertionPanel&) -{ - MGX_FORBIDDEN ("QtBlockMeshInsertionPanel assignment operator is not allowed."); - return *this; -} // QtBlockMeshInsertionPanel::operator = - - -QtBlockMeshInsertionPanel::~QtBlockMeshInsertionPanel ( ) -{ -} // QtBlockMeshInsertionPanel::~QtBlockMeshInsertionPanel - - -BlockMeshingPropertyInsertion* - QtBlockMeshInsertionPanel::getMeshingProperty ( ) const -{ - return new BlockMeshingPropertyInsertion ( ); -} // QtBlockMeshInsertionPanel::getMeshingProperty - - - // =========================================================================== // LA CLASSE QtBlockMeshingPropertyPanel // =========================================================================== @@ -963,10 +211,9 @@ QtBlockMeshingPropertyPanel::QtBlockMeshingPropertyPanel ( QtMgx3DApplication::HelpSystem::instance ( ).blocsMeshingPropertyOperationTag), _operationMethodComboBox (0), _currentParentWidget (0), _currentPanel (0), - _transfinitePanel (0), _directionalPanel (0), _orthogonalPanel (0), - _rotationalPanel (0), + _transfinitePanel (0), _delaunayTetgenPanel (0), - _meshInsertionPanel (0), _blocksPanel (0) + _blocksPanel (0) { // SET_WIDGET_BACKGROUND (this, Qt::yellow) QVBoxLayout* layout = new QVBoxLayout (this); @@ -1031,17 +278,9 @@ QtBlockMeshingPropertyPanel::QtBlockMeshingPropertyPanel ( // _transfinitePanel->layout ( )->setSpacing (5); // _transfinitePanel->layout ( )->setContentsMargins (0, 0, 0, 0); _transfinitePanel->hide ( ); - _directionalPanel = new QtBlockDirectionalPanel (0, mainWindow, this); - _directionalPanel->hide ( ); - _orthogonalPanel = new QtBlockOrthogonalPanel (0, mainWindow, this); - _orthogonalPanel->hide ( ); - _rotationalPanel = new QtBlockRotationalPanel (0, mainWindow, this); - _rotationalPanel->hide ( ); _delaunayTetgenPanel = new QtBlockDelaunayTetgenPanel (0, mainWindow, this); _delaunayTetgenPanel->hide ( ); - _meshInsertionPanel = new QtBlockMeshInsertionPanel (0, mainWindow, this); - _meshInsertionPanel->hide ( ); addPreviewCheckBox (true); @@ -1060,10 +299,9 @@ QtBlockMeshingPropertyPanel::QtBlockMeshingPropertyPanel ( 0, *new QtMgx3DMainWindow(0), 0, "", ""), _operationMethodComboBox (0), _currentParentWidget (0), _currentPanel (0), - _transfinitePanel (0), _directionalPanel (0), _orthogonalPanel (0), - _rotationalPanel (0), + _transfinitePanel (0), _delaunayTetgenPanel (0), - _meshInsertionPanel (0), _blocksPanel (0) + _blocksPanel (0) { MGX_FORBIDDEN ("QtBlockMeshingPropertyPanel copy constructor is not allowed."); } // QtBlockMeshingPropertyPanel::QtBlockMeshingPropertyPanel (const QtBlockMeshingPropertyPanel&) @@ -1087,18 +325,10 @@ void QtBlockMeshingPropertyPanel::reset ( ) BEGIN_QT_TRY_CATCH_BLOCK CHECK_NULL_PTR_ERROR (_transfinitePanel) - CHECK_NULL_PTR_ERROR (_directionalPanel) - CHECK_NULL_PTR_ERROR (_orthogonalPanel) - CHECK_NULL_PTR_ERROR (_rotationalPanel) CHECK_NULL_PTR_ERROR (_delaunayTetgenPanel) - CHECK_NULL_PTR_ERROR (_meshInsertionPanel) CHECK_NULL_PTR_ERROR (_blocksPanel) _transfinitePanel->reset ( ); - _directionalPanel->reset ( ); - _orthogonalPanel->reset ( ); - _rotationalPanel->reset ( ); _delaunayTetgenPanel->reset ( ); - _meshInsertionPanel->reset ( ); _blocksPanel->reset ( ); COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") @@ -1118,25 +348,13 @@ QtBlockMeshingPropertyPanel::OPERATION_METHOD BlockMeshingProperty* QtBlockMeshingPropertyPanel::getMeshingProperty ( ) const { CHECK_NULL_PTR_ERROR (_transfinitePanel) - CHECK_NULL_PTR_ERROR (_directionalPanel) - CHECK_NULL_PTR_ERROR (_orthogonalPanel) - CHECK_NULL_PTR_ERROR (_rotationalPanel) CHECK_NULL_PTR_ERROR (_delaunayTetgenPanel) - CHECK_NULL_PTR_ERROR (_meshInsertionPanel) switch (getOperationMethod ( )) { case QtBlockMeshingPropertyPanel::TRANSFINITE : return _transfinitePanel->getMeshingProperty ( ); - case QtBlockMeshingPropertyPanel::DIRECTIONAL : - return _directionalPanel->getMeshingProperty ( ); - case QtBlockMeshingPropertyPanel::ORTHOGONAL : - return _orthogonalPanel->getMeshingProperty ( ); - case QtBlockMeshingPropertyPanel::ROTATIONAL : - return _rotationalPanel->getMeshingProperty ( ); case QtBlockMeshingPropertyPanel::DELAUNAY_TETGEN : return _delaunayTetgenPanel->getMeshingProperty ( ); - case QtBlockMeshingPropertyPanel::MESH_INSERTION : - return _meshInsertionPanel->getMeshingProperty ( ); } // switch (getOperationMethod ( )) INTERNAL_ERROR (exc, "Méthode de maillage de blocs non supportée", "QtBlockMeshingPropertyPanel::getMeshingProperty") @@ -1185,11 +403,7 @@ void QtBlockMeshingPropertyPanel::validate ( ) switch (_operationMethodComboBox->currentIndex ( )) { case QtBlockMeshingPropertyPanel::TRANSFINITE : - case QtBlockMeshingPropertyPanel::DIRECTIONAL : - case QtBlockMeshingPropertyPanel::ORTHOGONAL : - case QtBlockMeshingPropertyPanel::ROTATIONAL : case QtBlockMeshingPropertyPanel::DELAUNAY_TETGEN : - case QtBlockMeshingPropertyPanel::MESH_INSERTION : break; case -1 : if (0 != error.length ( )) @@ -1322,15 +536,7 @@ void QtBlockMeshingPropertyPanel::operationMethodCallback ( ) CHECK_NULL_PTR_ERROR (_blocksPanel) CHECK_NULL_PTR_ERROR (_blocksPanel->getNameTextField ( )) CHECK_NULL_PTR_ERROR (_transfinitePanel) - CHECK_NULL_PTR_ERROR (_directionalPanel) - CHECK_NULL_PTR_ERROR (_directionalPanel->getEdgeTextField ( )) - CHECK_NULL_PTR_ERROR (_orthogonalPanel) - CHECK_NULL_PTR_ERROR (_rotationalPanel) - CHECK_NULL_PTR_ERROR (_rotationalPanel->getEdgeTextField ( )) - CHECK_NULL_PTR_ERROR (_rotationalPanel->getAxePoint1TextField ( )) - CHECK_NULL_PTR_ERROR (_rotationalPanel->getAxePoint2TextField ( )) CHECK_NULL_PTR_ERROR (_delaunayTetgenPanel) - CHECK_NULL_PTR_ERROR (_meshInsertionPanel) if (0 != _currentPanel) { _currentParentWidget->layout ( )->removeWidget (_currentPanel); @@ -1346,39 +552,8 @@ void QtBlockMeshingPropertyPanel::operationMethodCallback ( ) { case QtBlockMeshingPropertyPanel::TRANSFINITE : _currentPanel = _transfinitePanel; break; - case QtBlockMeshingPropertyPanel::DIRECTIONAL : - _currentPanel = _directionalPanel; - _directionalPanel->getEdgeTextField ( )->setLinkedSeizureManagers ( - 0, _blocksPanel->getNameTextField ( )); - _blocksPanel->getNameTextField ( )->setLinkedSeizureManagers ( - _directionalPanel->getEdgeTextField ( ), 0); - break; - case QtBlockMeshingPropertyPanel::ORTHOGONAL : - _currentPanel = _orthogonalPanel; - _orthogonalPanel->getEdgeTextField ( )->setLinkedSeizureManagers ( - 0, _blocksPanel->getNameTextField ( )); - _blocksPanel->getNameTextField ( )->setLinkedSeizureManagers ( - _orthogonalPanel->getEdgeTextField ( ), 0); - break; - case QtBlockMeshingPropertyPanel::ROTATIONAL : - _currentPanel = _rotationalPanel ; - _rotationalPanel->getEdgeTextField ( )->setLinkedSeizureManagers ( - 0, _rotationalPanel->getAxePoint1TextField ( )); - _rotationalPanel->getAxePoint1TextField ( - )->setLinkedSeizureManagers ( - _rotationalPanel->getEdgeTextField ( ), - _rotationalPanel->getAxePoint2TextField ( )); - _rotationalPanel->getAxePoint2TextField ( - )->setLinkedSeizureManagers ( - _rotationalPanel->getAxePoint1TextField ( ), - _blocksPanel->getNameTextField ( )); - _blocksPanel->getNameTextField ( )->setLinkedSeizureManagers ( - _rotationalPanel->getAxePoint2TextField ( ), 0); - break; case QtBlockMeshingPropertyPanel::DELAUNAY_TETGEN : _currentPanel = _delaunayTetgenPanel; break; - case QtBlockMeshingPropertyPanel::MESH_INSERTION : - _currentPanel = _meshInsertionPanel; break; default : { TkUtil::UTF8String message (TkUtil::Charset::UTF_8); diff --git a/src/QtComponents/QtTopoInformationOperationAction.cpp b/src/QtComponents/QtTopoInformationOperationAction.cpp index d7391d7..c7df039 100644 --- a/src/QtComponents/QtTopoInformationOperationAction.cpp +++ b/src/QtComponents/QtTopoInformationOperationAction.cpp @@ -350,15 +350,7 @@ void QtTopoInformationOperationPanel::autoUpdate ( ) Topo::Block* bloc = *iter; size_t nb = bloc->getMeshingData()->regions().size(); nb_regions_tot += nb; - if (bloc->getMeshLaw() == Topo::BlockMeshingProperty::directional){ - nb_dom_str_dir += 1; - nb_regions_str_dir += nb; - } - else if (bloc->getMeshLaw() == Topo::BlockMeshingProperty::rotational){ - nb_dom_str_rot += 1; - nb_regions_str_rot += nb; - } - else if (bloc->getMeshLaw() == Topo::BlockMeshingProperty::transfinite){ + if (bloc->getMeshLaw() == Topo::BlockMeshingProperty::transfinite){ nb_dom_str_trans += 1; nb_regions_str_trans += nb; } diff --git a/src/QtComponents/QtTopologyBlockCreationAction.cpp b/src/QtComponents/QtTopologyBlockCreationAction.cpp index d8b30a9..3d83612 100644 --- a/src/QtComponents/QtTopologyBlockCreationAction.cpp +++ b/src/QtComponents/QtTopologyBlockCreationAction.cpp @@ -171,9 +171,6 @@ void QtTopologyBlockCreationAction::executeOperation ( ) case QtTopologyPanel::OGRID_BLOCKS : cmdResult = getContext ( ).getTopoManager ( ).newTopoOGridOnGeometry (name, panel->getOGridRatio ( )); break; - case QtTopologyPanel::INSERTION_TOPOLOGY : - cmdResult = getContext ( ).getTopoManager ( ).newInsertionTopoOnGeometry (name); - break; default : { INTERNAL_ERROR (exc, "Type de topologie non supporté.", "QtTopologyBlockCreationAction::executeOperation") diff --git a/src/QtComponents/protected/QtComponents/QtBlockMeshingPropertyAction.h b/src/QtComponents/protected/QtComponents/QtBlockMeshingPropertyAction.h index d739c8f..a577eb4 100644 --- a/src/QtComponents/protected/QtComponents/QtBlockMeshingPropertyAction.h +++ b/src/QtComponents/protected/QtComponents/QtBlockMeshingPropertyAction.h @@ -14,11 +14,7 @@ #include "QtComponents/QtMgx3DTopoOperationAction.h" #include "QtComponents/RenderingManager.h" #include "Topo/BlockMeshingPropertyTransfinite.h" -#include "Topo/BlockMeshingPropertyDirectional.h" -#include "Topo/BlockMeshingPropertyOrthogonal.h" -#include "Topo/BlockMeshingPropertyRotational.h" #include "Topo/BlockMeshingPropertyDelaunayTetgen.h" -#include "Topo/BlockMeshingPropertyInsertion.h" #include @@ -72,316 +68,6 @@ class QtBlockTransfinitePanel : public QtMgx3DOperationsSubPanel }; // class QtBlockTransfinitePanel -/** - * Le paramétrage d'un maillage directionnel. - */ -class QtBlockDirectionalPanel : public QtMgx3DOperationsSubPanel -{ - Q_OBJECT - - public : - - /** - * \param Widget parent - * \param Fenêtre principale Magix 3D de rattachement, - * utilisée notamment pour récupérer le contexte. - * \param Eventuel panneau de rattachement. - */ - QtBlockDirectionalPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel = 0); - - /** - * Destructeur. RAS. - */ - virtual ~QtBlockDirectionalPanel ( ); - - /** - * Réinitialise le panneau. - */ - virtual void reset ( ); - - /** - * Méthode appelée lorsque l'utilisateur suspend l'édition de l'opération. - * cf. spécifications de la classe de base. - */ - virtual void cancel ( ); - - /** - * Actualise le panneau en fonction du contexte. - * cf. spécifications de la classe de base. - */ - virtual void autoUpdate ( ); - - /** - * \param true pour prévisualiser l'opération, false - * pour arrêter la prévisualisation. - * \param non utilisé - */ - virtual void preview (bool on, bool destroyInteractor); - - /** - * Affiche/masque la fenêtre, et les éventuelles informations de - * prévisualisation. - */ - virtual void setVisible (bool visible); - - /** - * \return Le point de départ définissant le vecteur directionnel. - * \see getPoint2 - */ - virtual Mgx3D::Utils::Math::Point getPoint1 ( ) const; - - /** - * \return Le point d'arrivée définissant le vecteur directionnel. - * \see getPoint1 - */ - virtual Mgx3D::Utils::Math::Point getPoint2 ( ) const; - - /** - * \return La propriété de maillage de du bloc conforme au panneau. - */ - virtual Mgx3D::Topo::BlockMeshingPropertyDirectional* - getMeshingProperty ( ) const; - - /** - * Faut-il inverser le vecteur donné par l'arête ? - */ - virtual bool isEdgeInverted ( ) const; - - /** - * \return true s'il faut utiliser le nom de l'arête, false - * s'il faut utiliser le vecteur associé. - * \see getEdgeName - */ - virtual bool useEdgeName ( ) const; - - /** - * \return Le nom de l'arête directionnelle - */ - virtual std::string getEdgeName ( ) const; - - /** - * Quitte le mode sélection interactive. - */ - virtual void stopSelection ( ); - - /** - * \return Le champ de saisie de l'arête directionnelle. - */ - virtual QtEntityIDTextField* getEdgeTextField ( ); - - - protected slots : - - /** - * Appelé lorsqu'un paramètre à changé : actualise les informations - * affichées. - */ - virtual void directionModifiedCallback ( ); - - - private : - - /** - * Constructeur de copie et opérateur = : interdits. - */ - QtBlockDirectionalPanel (const QtBlockDirectionalPanel&); - QtBlockDirectionalPanel& operator = (const QtBlockDirectionalPanel&); - - /** La saisie du vecteur directeur. */ - QtMgx3DEdgePanel* _edgeTextField; - - /** Le vecteur directionnel est-il à inverser ? */ - QCheckBox* _invertCheckBox; - - /** Le vecteur donnant la direction. */ - QLabel* _directionLabel; - - /** Utiliser le nom de l'arête ou le vecteur associé ? */ - QCheckBox* _useEdgeNameCheckBox; -}; // class QtBlockDirectionalPanel - - -/** - * Le paramétrage d'un maillage Orthogonal. - */ -class QtBlockOrthogonalPanel : public QtBlockDirectionalPanel -{ - public : - - /** - * \param Widget parent - * \param Fenêtre principale Magix 3D de rattachement, - * utilisée notamment pour récupérer le contexte. - * \param Eventuel panneau de rattachement. - */ - QtBlockOrthogonalPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel = 0); - - /** - * Destructeur. RAS. - */ - virtual ~QtBlockOrthogonalPanel ( ); - - /** - * Réinitialise le panneau. - */ - virtual void reset ( ); - - /** - * \return La propriété de maillage du bloc conforme au panneau. - */ - virtual Mgx3D::Topo::BlockMeshingPropertyOrthogonal* - getMeshingProperty ( ) const; - - /** - * \return Le nombre de couches. - */ - virtual size_t getLayersNum ( ) const; - - - private : - - /** - * Constructeur de copie et opérateur = : interdits. - */ - QtBlockOrthogonalPanel (const QtBlockOrthogonalPanel&); - QtBlockOrthogonalPanel& operator = (const QtBlockOrthogonalPanel&); - - /** Le nombre de couches. */ - QtIntTextField* _layersNumTextField; -}; // class QtBlockOrthogonalPanel - - -/** - * Le paramétrage d'un maillage rotationel. La rotation est définie par - * l'axe de rotation et la direction selon laquelle s'effectue le maillage. - */ -class QtBlockRotationalPanel : public QtMgx3DOperationsSubPanel -{ - public : - - /** - * \param Widget parent - * \param Fenêtre principale Magix 3D de rattachement, - * utilisée notamment pour récupérer le contexte. - * \param Eventuel panneau de rattachement. - */ - QtBlockRotationalPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel = 0); - - /** - * Destructeur. RAS. - */ - virtual ~QtBlockRotationalPanel ( ); - - /** - * Réinitialise le panneau. - */ - virtual void reset ( ); - - /** - * Méthode appelée lorsque l'utilisateur suspend l'édition de l'opération. - * cf. spécifications de la classe de base. - */ - virtual void cancel ( ); - - /** - * Actualise le panneau en fonction du contexte. - * cf. spécifications de la classe de base. - */ - virtual void autoUpdate ( ); - - /** - * \param true pour prévisualiser l'opération, false - * pour arrêter la prévisualisation. - * \param non utilisé - */ - virtual void preview (bool on, bool destroyInteractor); - - /** - * Affiche/masque la fenêtre, et les éventuelles informations de - * prévisualisation. - */ - virtual void setVisible (bool visible); - - /** - * \return Le point de départ définissant la direction de la rotation. - * \see getDirPoint2 - * \see getAxePoint1 - */ - virtual Mgx3D::Utils::Math::Point getDirPoint1 ( ) const; - - /** - * \return Le point d'arrivée définissant la direction de la rotation. - * \see getDirPoint1 - */ - virtual Mgx3D::Utils::Math::Point getDirPoint2 ( ) const; - - /** - * \return Le point de départ définissant l'axe de rotation. - * \see getAxePoint2 - * \see getDirPoint1 - */ - virtual Mgx3D::Utils::Math::Point getAxePoint1 ( ) const; - - /** - * \return Le point d'arrivée définissant l'axe de rotation. - * \see getAxePoint1 - */ - virtual Mgx3D::Utils::Math::Point getAxePoint2 ( ) const; - - /** - * \return La propriété de maillage de du bloc conforme au panneau. - */ - virtual Mgx3D::Topo::BlockMeshingPropertyRotational* getMeshingProperty ( ) const; - - /** - * Quitte le mode sélection interactive. - */ - virtual void stopSelection ( ); - - /** - * \return Le champ de saisie de l'arête directionnelle. - */ - virtual QtEntityIDTextField* getEdgeTextField ( ); - - /** - * \return Le champ de saisie du premier point de l'axe de rotation. - */ - virtual QtEntityIDTextField* getAxePoint1TextField ( ); - - /** - * \return Le champ de saisie du second point de l'axe de rotation. - */ - virtual QtEntityIDTextField* getAxePoint2TextField ( ); - - - private : - - /** - * Constructeur de copie et opérateur = : interdits. - */ - QtBlockRotationalPanel (const QtBlockRotationalPanel&); - QtBlockRotationalPanel& operator = (const QtBlockRotationalPanel&); - - /** La saisie de l'arête donnant la direction du maillage. */ - QtMgx3DEdgePanel* _directionTextField; - - /** La saisie de 2 points permettant de définir l'axe de rotation. */ - QtMgx3DPointPanel *_axePoint1Panel, *_axePoint2Panel; - - /** Le vecteur donnant la direction. */ - QLabel* _directionLabel; - - /** Le vecteur donnant l'axe de rotation. */ - QLabel* _axeLabel; -}; // class QtBlockRotationalPanel - - /** * Le paramétrage d'un maillage Delaunay via Tetgen. */ @@ -443,45 +129,6 @@ class QtBlockDelaunayTetgenPanel : public QtMgx3DOperationsSubPanel }; // class QtBlockDelaunayTetgenPanel -/** - * Le paramétrage d'un maillage par insertion de maillage. - */ -class QtBlockMeshInsertionPanel : public QtMgx3DOperationsSubPanel -{ - public : - - /** - * \param Widget parent - * \param Fenêtre principale Magix 3D de rattachement, - * utilisée notamment pour récupérer le contexte. - * \param Eventuel panneau de rattachement. - */ - QtBlockMeshInsertionPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel = 0); - - /** - * Destructeur. RAS. - */ - virtual ~QtBlockMeshInsertionPanel ( ); - - /** - * \return La propriété de maillage de du bloc conforme au panneau. - */ - virtual Mgx3D::Topo::BlockMeshingPropertyInsertion* - getMeshingProperty ( ) const; - - - private : - - /** - * Constructeur de copie et opérateur = : interdits. - */ - QtBlockMeshInsertionPanel (const QtBlockMeshInsertionPanel&); - QtBlockMeshInsertionPanel& operator = (const QtBlockMeshInsertionPanel&); -}; // class QtBlockMeshInsertionPanel - - /** * Panneau d'édition des paramètres de maillage de blocs topologiques. */ @@ -494,13 +141,10 @@ class QtBlockMeshingPropertyPanel : public QtMgx3DOperationPanel /** La méthode de maillage de du bloc. *
    *
  1. Maillage structuré transfini, - *
  2. Maillage structuré directionnel - *
  3. Maillage structuré directionnel orthogonal - *
  4. Maillage structuré rotationnel *
  5. Maillage non structuré Delaunay généré par Tetgen *
*/ - enum OPERATION_METHOD { TRANSFINITE, DIRECTIONAL, ORTHOGONAL, ROTATIONAL, DELAUNAY_TETGEN, MESH_INSERTION }; + enum OPERATION_METHOD { TRANSFINITE, DELAUNAY_TETGEN }; /** * Créé l'ihm. @@ -629,21 +273,9 @@ class QtBlockMeshingPropertyPanel : public QtMgx3DOperationPanel /** Maillage transfini. */ QtBlockTransfinitePanel* _transfinitePanel; - /** Maillage structuré directionnel. */ - QtBlockDirectionalPanel* _directionalPanel; - - /** Maillage structuré directionnel orthogonal. */ - QtBlockOrthogonalPanel* _orthogonalPanel; - - /** Maillage structuré rotationnel. */ - QtBlockRotationalPanel* _rotationalPanel; - /** Maillage non structuré Delaunay généré avec Tetgen. */ QtBlockDelaunayTetgenPanel* _delaunayTetgenPanel; - /** Maillage non structuré obtenu par insertion de maillage. */ - QtBlockMeshInsertionPanel* _meshInsertionPanel; - //@} // Panneaux de saisie des paramètres de définition du vertex /** Les blocs à discrétiser. */ diff --git a/src/pyMagix3D/pyMagix3D.doxygen b/src/pyMagix3D/pyMagix3D.doxygen index 3ef5a6e..08ed784 100644 --- a/src/pyMagix3D/pyMagix3D.doxygen +++ b/src/pyMagix3D/pyMagix3D.doxygen @@ -777,12 +777,8 @@ INPUT = ../../src/Doc/User \ ../../src/Core/protected/Topo/FaceMeshingPropertyDelaunayGMSH.h \ ../../src/Core/protected/Topo/FaceMeshingPropertyQuadPairing.h \ ../../src/Core/protected/Topo/BlockMeshingProperty.h \ - ../../src/Core/protected/Topo/BlockMeshingPropertyDirectional.h \ - ../../src/Core/protected/Topo/BlockMeshingPropertyOrthogonal.h \ - ../../src/Core/protected/Topo/BlockMeshingPropertyRotational.h \ ../../src/Core/protected/Topo/BlockMeshingPropertyTransfinite.h \ ../../src/Core/protected/Topo/BlockMeshingPropertyDelaunayTetgen.h \ - ../../src/Core/protected/Topo/BlockMeshingPropertyInsertion.h \ ../../src/Core/protected/Mesh/MeshManagerIfc.h \ ../../src/Core/protected/Smoothing/SurfacicSmoothing.h \ ../../src/Core/protected/Smoothing/VolumicSmoothing.h \ diff --git a/src/pyMagix3D/pyMagix3D.i b/src/pyMagix3D/pyMagix3D.i index 75b360f..0811ce4 100644 --- a/src/pyMagix3D/pyMagix3D.i +++ b/src/pyMagix3D/pyMagix3D.i @@ -53,12 +53,8 @@ using std::ptrdiff_t; #include "Topo/FaceMeshingPropertyTransfinite.h" #include "Topo/FaceMeshingPropertyDelaunayGMSH.h" #include "Topo/FaceMeshingPropertyQuadPairing.h" -#include "Topo/BlockMeshingPropertyDirectional.h" -#include "Topo/BlockMeshingPropertyOrthogonal.h" -#include "Topo/BlockMeshingPropertyRotational.h" #include "Topo/BlockMeshingPropertyTransfinite.h" #include "Topo/BlockMeshingPropertyDelaunayTetgen.h" -#include "Topo/BlockMeshingPropertyInsertion.h" #include "Mesh/MeshManagerIfc.h" #include "Smoothing/SurfacicSmoothing.h" @@ -323,12 +319,8 @@ using std::ptrdiff_t; %include Topo/FaceMeshingPropertyDelaunayGMSH.h %include Topo/FaceMeshingPropertyQuadPairing.h %include Topo/BlockMeshingProperty.h -%include Topo/BlockMeshingPropertyDirectional.h -%include Topo/BlockMeshingPropertyOrthogonal.h -%include Topo/BlockMeshingPropertyRotational.h %include Topo/BlockMeshingPropertyTransfinite.h %include Topo/BlockMeshingPropertyDelaunayTetgen.h -%include Topo/BlockMeshingPropertyInsertion.h %include Mesh/MeshManagerIfc.h %include Smoothing/SurfacicSmoothing.h diff --git a/src/pyMagix3D/swig_doc.i b/src/pyMagix3D/swig_doc.i index 7f61cf5..759892f 100644 --- a/src/pyMagix3D/swig_doc.i +++ b/src/pyMagix3D/swig_doc.i @@ -105,152 +105,6 @@ void Mgx3D::Topo::BlockMeshingPropertyDelaunayTetgen::setVerbose() passe en mode verbose -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional " -Propriété de la discrétisation d'un bloc suivant une direction. -"; - -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::BlockMeshingPropertyDirectional " -Mgx3D::Topo::BlockMeshingPropertyDirectional::BlockMeshingPropertyDirectional(Utils::Math::Point v1, Utils::Math::Point v2) - -Constructeur avec direction définie par 2 points. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::BlockMeshingPropertyDirectional " -Mgx3D::Topo::BlockMeshingPropertyDirectional::BlockMeshingPropertyDirectional(meshDirLaw md) - -Constructeur dont on connait la direction. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::BlockMeshingPropertyDirectional " -Mgx3D::Topo::BlockMeshingPropertyDirectional::BlockMeshingPropertyDirectional(std::string coedgeName) - -Constructeur dont on connait la direction. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::getDir " -uint Mgx3D::Topo::BlockMeshingPropertyDirectional::getDir() const - -Accesseur sur la direction associée à la CoFace. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::getMeshLaw " -BlockMeshingProperty::meshLaw Mgx3D::Topo::BlockMeshingPropertyDirectional::getMeshLaw() const - -Accesseur sur la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::getMeshLawName " -std::string Mgx3D::Topo::BlockMeshingPropertyDirectional::getMeshLawName() const - -Accesseur sur le nom de la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyDirectional::isStructured " -bool Mgx3D::Topo::BlockMeshingPropertyDirectional::isStructured() const - -Indique si la face est structurée. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion " -Propriété pour un bloc associé à la méthode insertion. -"; - -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion::BlockMeshingPropertyInsertion " -Mgx3D::Topo::BlockMeshingPropertyInsertion::BlockMeshingPropertyInsertion() - - - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion::BlockMeshingPropertyInsertion " -Mgx3D::Topo::BlockMeshingPropertyInsertion::BlockMeshingPropertyInsertion(const bool AWithRefinement) - - - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion::getMeshLaw " -BlockMeshingProperty::meshLaw Mgx3D::Topo::BlockMeshingPropertyInsertion::getMeshLaw() const - -Accesseur sur la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion::getMeshLawName " -std::string Mgx3D::Topo::BlockMeshingPropertyInsertion::getMeshLawName() const - -Accesseur sur le nom de la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion::isStructured " -bool Mgx3D::Topo::BlockMeshingPropertyInsertion::isStructured() const - -Indique si la méthode est structurée. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyInsertion::withRefinement " -bool Mgx3D::Topo::BlockMeshingPropertyInsertion::withRefinement() const - -Indique si le maillage doit être rafiné - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational " -Propriété de la discrétisation d'un bloc suivant une direction par rotation. -"; - -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::BlockMeshingPropertyRotational " -Mgx3D::Topo::BlockMeshingPropertyRotational::BlockMeshingPropertyRotational(Utils::Math::Point v1, Utils::Math::Point v2, Utils::Math::Point axis1, Utils::Math::Point axis2) - -Constructeur avec 2 points qui définissent la direction et 2 autres points pour l'axe de rotation. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::BlockMeshingPropertyRotational " -Mgx3D::Topo::BlockMeshingPropertyRotational::BlockMeshingPropertyRotational(meshDirLaw md, Utils::Math::Point axis1, Utils::Math::Point axis2) - -Constructeur une direction définie et 2 points pour l'axe de rotation. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::BlockMeshingPropertyRotational " -Mgx3D::Topo::BlockMeshingPropertyRotational::BlockMeshingPropertyRotational(std::string coedgeName, Utils::Math::Point axis1, Utils::Math::Point axis2) - -Constructeur une arête et 2 points pour l'axe de rotation. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::getAxis " -void Mgx3D::Topo::BlockMeshingPropertyRotational::getAxis(Utils::Math::Point &axis1, Utils::Math::Point &axis2) - - -Retourne l'axe de rotation - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::getDir " -uint Mgx3D::Topo::BlockMeshingPropertyRotational::getDir() const - -Accesseur sur la direction associée à la CoFace. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::getMeshLaw " -BlockMeshingProperty::meshLaw Mgx3D::Topo::BlockMeshingPropertyRotational::getMeshLaw() const - -Accesseur sur la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::getMeshLawName " -std::string Mgx3D::Topo::BlockMeshingPropertyRotational::getMeshLawName() const - -Accesseur sur le nom de la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::isStructured " -bool Mgx3D::Topo::BlockMeshingPropertyRotational::isStructured() const - -Indique si la face est structurée. - -"; -%feature("docstring") Mgx3D::Topo::BlockMeshingPropertyRotational::setAxis " -void Mgx3D::Topo::BlockMeshingPropertyRotational::setAxis(Utils::Math::Point &axis1, Utils::Math::Point &axis2) - - -Change l'axe de rotation - "; %feature("docstring") Mgx3D::Topo::BlockMeshingPropertyTransfinite " Propriété de la discrétisation d'un bloc.