diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt index 4e4c9d2..4bb6d05 100644 --- a/Docs/CMakeLists.txt +++ b/Docs/CMakeLists.txt @@ -42,18 +42,11 @@ set(DOXYGEN_DIRS ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/EdgeMeshingPropertyGlobalInterpolate.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/EdgeMeshingPropertyTabulated.h ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/EdgeMeshingPropertyBeta.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyDirectional.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyOrthogonal.h - ${PROJECT_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyRotational.h ${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/ImportMDLImplementation.cpp b/src/Core/Internal/ImportMDLImplementation.cpp index 964c091..d06baf2 100644 --- a/src/Core/Internal/ImportMDLImplementation.cpp +++ b/src/Core/Internal/ImportMDLImplementation.cpp @@ -530,7 +530,6 @@ void ImportMDLImplementation::performTopo(Internal::InfoCommand* icmd) } // sélection de la méthode transfinie ou directionnelle si possible m_icmd->addTopoInfoEntity (coface, Internal::InfoCommand::CREATED); - coface->selectBasicMeshLaw(m_icmd); } else { // cas non-structuré diff --git a/src/Core/Internal/ServiceGeomToTopo.cpp b/src/Core/Internal/ServiceGeomToTopo.cpp index 5ff6684..2d0c935 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" @@ -74,8 +73,6 @@ bool ServiceGeomToTopo::convertBlockStructured(const int ni, const int nj, const if (bloc->structurable()){ bloc->structure(m_icmd); - bloc->selectBasicMeshLaw(m_icmd); - // cas où le nombre de bras est donné par l'utilisateur if (ni>0 && nj>0 && nk>0){ std::vector coedges; @@ -102,13 +99,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); @@ -122,8 +112,6 @@ bool ServiceGeomToTopo::convertCoFaceStructured() if (coface->structurable()){ coface->structure(m_icmd); - coface->selectBasicMeshLaw(m_icmd); - return false; // ok } else 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..8c094b1 100644 --- a/src/Core/Mesh/MeshImplementationStructured.cpp +++ b/src/Core/Mesh/MeshImplementationStructured.cpp @@ -17,13 +17,7 @@ #include "Topo/TopoHelper.h" #include "Topo/EdgeMeshingPropertyUniform.h" #include "Topo/EdgeMeshingPropertyTabulated.h" -#include "Topo/FaceMeshingPropertyDirectional.h" -#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" @@ -74,10 +68,6 @@ void MeshImplementation::preMeshStrutured(Topo::Block* bl) { std::cout <<"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) - std::cout << " et direction "<<(short)bl->getBlockMeshingProperty()->getDir(); std::cout << std::endl; std::vector groupsName; @@ -102,10 +92,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 +325,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)); } @@ -642,137 +504,16 @@ void MeshImplementation::preMeshStrutured(Topo::CoFace* coface) }// end for cote<4 - if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::transfinite) + if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::transfinite) { discretiseTransfinie(nbBrasI, nbBrasJ, l_points); - else if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::rotational){ - Utils::Math::Point axis1; - Utils::Math::Point axis2; - Topo::FaceMeshingPropertyRotational* prop = - dynamic_cast(coface->getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(prop); - prop->getAxis(axis1, axis2); - uint dir = prop->getDir(); - - discretiseRotation(nbBrasI, nbBrasJ, 0, l_points, axis1, axis2, dir); - - } - else if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::directional - || coface->getMeshLaw() == Topo::CoFaceMeshingProperty::orthogonal){ - - Topo::CoEdgeMeshingProperty *empI, *empJ; - Topo::FaceMeshingPropertyDirectional* prop = - dynamic_cast(coface->getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(prop); - uint dir = prop->getDir(); - Topo::CoEdgeMeshingProperty *empDir[2]; - - // il faut retrouver si possible la discrétisation depuis une arête - // on peut se permettre de reconstruire une loi uniforme pour les directions - // qui ne sont pas celle de la discrétisation - if (dir == 0){ - bool is_inverted; - empDir[1] = new Topo::EdgeMeshingPropertyUniform(nbBrasJ); - Topo::CoEdgeMeshingProperty * empTmp = coface->getMeshingProperty(Topo::CoFace::i_dir, is_inverted); - // si elle est interpolée, on s'en passe - if (empTmp && empTmp->getMeshLaw() != Topo::CoEdgeMeshingProperty::interpolate){ - empDir[0] = empTmp->clone(); - if (is_inverted) - empDir[0]->setDirect(!empDir[0]->getDirect()); - } - else - empDir[0] = 0; - - } else { - bool is_inverted; - empDir[0] = new Topo::EdgeMeshingPropertyUniform(nbBrasI); - Topo::CoEdgeMeshingProperty * empTmp = coface->getMeshingProperty(Topo::CoFace::j_dir, is_inverted); - // si elle est interpolée, on s'en passe - if (empTmp && empTmp->getMeshLaw() != Topo::CoEdgeMeshingProperty::interpolate){ - empDir[1] = empTmp->clone(); - if (is_inverted) - empDir[1]->setDirect(!empDir[1]->getDirect()); - } - else - empDir[1] = 0; - } - - // si la discrétisation est nulle (cas interpolée ou composée), on la remplace par une version tabulée - if (empDir[dir] == 0){ - std::vector coedges; - Topo::Vertex* vtx1; - Topo::Vertex* vtx2; - std::map ratios; - if (dir == 0){ - Topo::Edge* edge = coface->getEdge(1); - edge->getCoEdges(coedges); - vtx1 = coface->getVertex(1); - vtx2 = coface->getVertex(2); - for (uint i=0; igetRatio(coedges[i]); - - } - else { - Topo::Edge* edge = coface->getEdge(0); - edge->getCoEdges(coedges); - vtx1 = coface->getVertex(1); - vtx2 = coface->getVertex(0); - for (uint i=0; igetRatio(coedges[i]); - } - - // ordonne les coedges - std::vector coedges_between; - Topo::TopoHelper::getCoEdgesBetweenVertices(vtx1, vtx2, coedges, coedges_between); - - std::vector edge_points; - Topo::TopoHelper::getPoints(vtx1, vtx2, coedges_between, ratios, edge_points); - - // calcul des longueurs des bras - std::vector tabulation; - for (uint i=1; igetMeshLaw() == Topo::CoFaceMeshingProperty::orthogonal){ - Topo::FaceMeshingPropertyOrthogonal* fmp = dynamic_cast(prop); - CHECK_NULL_PTR_ERROR(fmp); - uint side = fmp->getSide(); - uint nbLayers = fmp->getNbLayers(); - // recherche de la surface / laquelle il faut être orthogonal - // on ne connait pas la normale à une courbe ... - Geom::Surface* surface = 0; - Topo::Edge* edge = coface->getEdge(dir+side*2); - std::vector coedges; - edge->getCoEdges(coedges); - //std::cout<<"orthogonal pour "<getName()<<" dir="<getName()<getGeomAssociation() && coface->getMeshLaw() > Topo::CoFaceMeshingProperty::rotational){ + if (coface->getGeomAssociation()){ #ifdef _DEBUG_MESH std::cout <<" Projection des noeuds de la coface "<getName()<<" sur la surface "<getGeomAssociation()->getName()<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 +783,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 +881,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 +2605,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 +3092,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 +3304,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 +3325,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() { @@ -3716,58 +3444,6 @@ getRatios(std::map &ratios) } // end for i 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; - for (uint k=0; k<4; k++){ - std::vector coedges_dir1; - - TopoHelper::getCoEdgesBetweenVertices(sommets[TopoHelper::tabIndVtxByEdgeAndDirOnBlock[j][k][0]], - sommets[TopoHelper::tabIndVtxByEdgeAndDirOnBlock[j][k][1]], - iCoedges[j], - coedges_dir1); - 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/CoFace.cpp b/src/Core/Topo/CoFace.cpp index 3888d54..8174dce 100644 --- a/src/Core/Topo/CoFace.cpp +++ b/src/Core/Topo/CoFace.cpp @@ -26,9 +26,6 @@ #include "Topo/CommandEditTopo.h" #include "Topo/EdgeMeshingPropertyUniform.h" #include "Topo/EdgeMeshingPropertyInterpolate.h" -#include "Topo/FaceMeshingPropertyDirectional.h" -#include "Topo/FaceMeshingPropertyOrthogonal.h" -#include "Topo/FaceMeshingPropertyRotational.h" #include "Topo/FaceMeshingPropertyTransfinite.h" #include "Topo/FaceMeshingPropertyDelaunayGMSH.h" @@ -161,25 +158,17 @@ CoFace(Internal::Context& ctx, } /*----------------------------------------------------------------------------*/ CoFace:: -CoFace(Internal::Context& ctx, int ni, int nj, - CoFaceMeshingProperty::meshLaw ml, - CoFaceMeshingProperty::meshDirLaw md) +CoFace(Internal::Context& ctx, int ni, int nj) : TopoEntity(ctx, ctx.newProperty(Utils::Entity::TopoCoFace), ctx.newDisplayProperties(Utils::Entity::TopoCoFace)) , m_topo_property(new CoFaceTopoProperty()) , m_save_topo_property(0) -, m_mesh_property(0) +, m_mesh_property(new FaceMeshingPropertyTransfinite()) , m_save_mesh_property(0) , m_mesh_data(new CoFaceMeshingData()) , m_save_mesh_data(0) { - if (ml == CoFaceMeshingProperty::directional) - m_mesh_property =new FaceMeshingPropertyDirectional(md); - else - m_mesh_property =new FaceMeshingPropertyTransfinite(); - - // face avec les sommets équivalents à ceux d'une surface de taille 1 std::vector vertices; vertices.push_back(new Topo::Vertex(ctx, Utils::Math::Point(1,0,0))); @@ -955,12 +944,6 @@ split2(eDirOnCoFace dir, std::vector& edges1, std::vector& edges3, coface2->getGroupsContainer().add(gr); } - // recherche de la méthode de maillage qui semble la plus adaptée - if (getMeshLaw() == CoFaceMeshingProperty::directional){ - coface1->selectBasicMeshLaw(icmd); - coface2->selectBasicMeshLaw(icmd); - } - // on ajoute les 2 CoFaces aux faces for (uint i=0; isaveFaceTopoProperty(icmd); @@ -1217,13 +1200,6 @@ split3(eDirOnCoFace dir, std::vector& edges1, std::vector& edges3, coface3->getGroupsContainer().add(gr); } - // recherche de la méthode de maillage qui semble la plus adaptée - if (getMeshLaw() == CoFaceMeshingProperty::directional){ - coface1->selectBasicMeshLaw(icmd); - coface2->selectBasicMeshLaw(icmd); - coface3->selectBasicMeshLaw(icmd); - } - // on ajoute les 3 CoFaces aux faces for (uint i=0; isaveFaceTopoProperty(icmd); @@ -1499,11 +1475,6 @@ splitOgrid(eDirOnCoFace dir, coface2->getGroupsContainer().add(gr); } - // recherche de la méthode de maillage qui semble la plus adaptée - coface0->selectBasicMeshLaw(icmd); - coface1->selectBasicMeshLaw(icmd); - coface2->selectBasicMeshLaw(icmd); - } else if (edges1.size() == 3){ // cas de la création de 4 faces en Ogrid @@ -1722,12 +1693,6 @@ splitOgrid(eDirOnCoFace dir, coface3->getGroupsContainer().add(gr); } - // recherche de la méthode de maillage qui semble la plus adaptée - coface0->selectBasicMeshLaw(icmd); - coface1->selectBasicMeshLaw(icmd); - coface2->selectBasicMeshLaw(icmd); - coface3->selectBasicMeshLaw(icmd); - } // end else if (edges1.size() == 3) @@ -2077,63 +2042,12 @@ getRepresentation(Utils::DisplayRepresentation& dr, bool checkDestroyed) const if (isStructured()){ uint lastId = (getNbVertices() == 3?0:3); - Edge* edge1=0; - Edge* edge2=0; - if (m_mesh_property->getMeshLaw() == CoFaceMeshingProperty::directional){ - FaceMeshingPropertyDirectional* mp = dynamic_cast(m_mesh_property); - CHECK_NULL_PTR_ERROR(mp); - if (mp->getDir() == 1){ - edge1 = getEdge(0); - edge2 = getEdge(1); - } - else { - edge1 = getEdge(1); - edge2 = getEdge(0); - } - } - else if (m_mesh_property->getMeshLaw() == CoFaceMeshingProperty::orthogonal){ - FaceMeshingPropertyOrthogonal* mp = dynamic_cast(m_mesh_property); - CHECK_NULL_PTR_ERROR(mp); - if (mp->getDir() == 1){ - edge1 = getEdge(0); - if (mp->getSide() == 1){ - // cas où il faut prendre les arêtes de l'autre côté - edge2 = getEdge(getVertex(0), getVertex(lastId)); - } - else - edge2 = getEdge(1); - } - else { - edge1 = getEdge(1); - if (mp->getSide() == 1){ - // cas où il faut prendre les arêtes de l'autre côté - edge2 = getEdge(getVertex(2), getVertex(lastId)); - } - else - edge2 = getEdge(0); - } - } - else if (m_mesh_property->getMeshLaw() == CoFaceMeshingProperty::rotational){ - FaceMeshingPropertyRotational* mp = dynamic_cast(m_mesh_property); - CHECK_NULL_PTR_ERROR(mp); - if (mp->getDir() == 1){ - edge1 = getEdge(0); - edge2 = getEdge(1); - } - else { - edge1 = getEdge(1); - edge2 = getEdge(0); - } - } - else { - edge1 = getEdge(1); - edge2 = getEdge(0); - } + Edge* edge1 = getEdge(1); + Edge* edge2 = getEdge(0); // std::cout<<"CoFace::getRepresentation pour "<getName()<<" - "<getName()< points_edge1; std::vector points_edge2; edge1->getPoints(points_edge1); @@ -2207,61 +2121,19 @@ getRepresentation(Utils::DisplayRepresentation& dr, bool checkDestroyed) const // std::cout<<" vect1 : "<getMeshLaw() == CoFaceMeshingProperty::rotational){ - FaceMeshingPropertyRotational* 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() == CoFaceMeshingProperty::directional - || m_mesh_property->getMeshLaw() == CoFaceMeshingProperty::orthogonal){ - points.push_back(vect1*1.1+vect2*0.6); - points.push_back(vect1*1.1+vect2*0.2); - points.push_back(vect1*1.3+vect2*0.4); - } else if (m_mesh_property->getMeshLaw() == CoFaceMeshingProperty::rotational){ - if (dec2>0.0){ - points.push_back(vect1*1.2+vect2*0.5); - points.push_back(vect1*1.0+vect2*0.7); - points.push_back(vect1*1.2+vect2*0.7); - } else if (dec2<0.0) { - points.push_back(vect1*1.0+vect2*0.1); - points.push_back(vect1*1.2+vect2*0.3); - points.push_back(vect1*1.2+vect2*0.1); - } else { - points.push_back(vect1*1.1+vect2*0.6+vect3*dec3*2); - points.push_back(vect1*1.1+vect2*0.2+vect3*dec3*2); - points.push_back(vect1*1.3+vect2*0.4+vect3*dec3*4); - } - } if (points.size() > 12){ indices.push_back(3); indices.push_back(14); indices.push_back(13); indices.push_back(14); indices.push_back(12); indices.push_back(14); } - if (m_mesh_property->getMeshLaw() == CoFaceMeshingProperty::orthogonal){ - uint id = points.size(); - points.push_back(vect1*0.5+vect2*0.4); - points.push_back(vect1*0.5+vect2*0.5); - points.push_back(vect1*0.4+vect2*0.5); - indices.push_back(id); indices.push_back(id+1); - indices.push_back(id+2); indices.push_back(id+1); - } } // end if (isStructured()) else { @@ -3501,19 +3345,6 @@ permuteToJmaxEdge(Edge* edge, Internal::InfoCommand* icmd) m_topo_property->getEdgeContainer().add(sorted_edges); m_topo_property->getVertexContainer().clear(); m_topo_property->getVertexContainer().add(sorted_vertices); - - if (dec%2 && getMeshLaw() == CoFaceMeshingProperty::directional){ - saveCoFaceMeshingProperty(icmd); - FaceMeshingPropertyDirectional* fmp = dynamic_cast(getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(fmp); - fmp->permDir(); - } - else if (dec%2 && getMeshLaw() == CoFaceMeshingProperty::orthogonal){ - saveCoFaceMeshingProperty(icmd); - FaceMeshingPropertyOrthogonal* fmp = dynamic_cast(getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(fmp); - fmp->permDir(); - } } // end if (ind != 4) } /*----------------------------------------------------------------------------*/ @@ -3846,89 +3677,6 @@ uint CoFace::getNbBlocks() const return blocks.size(); } /*----------------------------------------------------------------------------*/ -void CoFace:: -selectBasicMeshLaw(Internal::InfoCommand* icmd, bool forceCompute) -{ -//#define _DEBUG_selectBasicMeshLaw -#ifdef _DEBUG_selectBasicMeshLaw - std::cout<<"selectBasicMeshLaw pour "< iCoedges[2]; - getOrientedCoEdges(iCoedges[0], iCoedges[1]); - - // la direction sélectionnée, à définir - FaceMeshingPropertyDirectional::meshDirLaw dirLaw = FaceMeshingPropertyDirectional::dir_undef; - - // dirI ok ? - { - std::vector > coedges_dirs; - std::vector coedges_dir1; - std::vector coedges_dir2; - - // il faut qu'un des côté soit en une seule arête sans ratio - bool unCoteOk = false; - - TopoHelper::getCoEdgesBetweenVertices(getVertex(1), getVertex(2), iCoedges[0], coedges_dir1); - coedges_dirs.push_back(coedges_dir1); - if (coedges_dir1.size() == 1 && getEdge(getVertex(1), getVertex(2))->getRatio(coedges_dir1[0]) == 1) - unCoteOk = true; - - if (getNbVertices() == 4){ - TopoHelper::getCoEdgesBetweenVertices(getVertex(0), getVertex(3), iCoedges[0], coedges_dir2); - coedges_dirs.push_back(coedges_dir2); - if (coedges_dir2.size() == 1 && getEdge(getVertex(0), getVertex(3))->getRatio(coedges_dir2[0]) == 1) - unCoteOk = true; - } - - if (TopoHelper::isUnidirectionalMeshable(coedges_dirs) && unCoteOk) - dirLaw = FaceMeshingPropertyDirectional::dir_i; - } - - // dirJ ok ? - { - std::vector > coedges_dirs; - std::vector coedges_dir1; - std::vector coedges_dir2; - - // il faut qu'un des côté soit en une seule arête sans ratio - bool unCoteOk = false; - - TopoHelper::getCoEdgesBetweenVertices(getVertex(1), getVertex(0), iCoedges[1], coedges_dir1); - coedges_dirs.push_back(coedges_dir1); - if (coedges_dir1.size() == 1 && getEdge(getVertex(1), getVertex(2))->getRatio(coedges_dir1[0]) == 1) - unCoteOk = true; - - Vertex* vtx3 = getVertex((getNbVertices()==4)?3:0); - TopoHelper::getCoEdgesBetweenVertices(getVertex(2), vtx3, iCoedges[1], coedges_dir2); - coedges_dirs.push_back(coedges_dir2); - if (coedges_dir2.size() == 1 && getEdge(getVertex(2), vtx3)->getRatio(coedges_dir2[0]) == 1) - unCoteOk = true; - - if (TopoHelper::isUnidirectionalMeshable(coedges_dirs) && unCoteOk) - dirLaw = FaceMeshingPropertyDirectional::dir_j; - } - - // cas où l'on trouve que le maillage peut se faire suivant une direction - if (dirLaw != FaceMeshingPropertyDirectional::dir_undef){ - saveCoFaceMeshingProperty(icmd); - FaceMeshingPropertyDirectional* mp = new FaceMeshingPropertyDirectional(dirLaw); - switchCoFaceMeshingProperty(icmd, mp); - delete mp; - -#ifdef _DEBUG_selectBasicMeshLaw - std::cout<<" on attribue "< iCoedges; - std::vector jCoedges; - - coface->getOrientedCoEdges(iCoedges, jCoedges); - - 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; - } - - TkUtil::UTF8String messErr (TkUtil::Charset::UTF_8); - messErr << "Il n'est pas possible d'orienter la face commune "<getName() - << " avec les 2 points "<< v1 << " et "<< v2; - throw TkUtil::Exception(messErr); -} -/*----------------------------------------------------------------------------*/ -CoFaceMeshingProperty::meshSideLaw CoFaceMeshingProperty::_computeSide(CoFace* coface, - Utils::Math::Point & v1, Utils::Math::Point & v2, uint dir) -{ - if (dir == 0){ - if (coface->getVertex(1)->getCoord() == v1 || coface->getVertex(2)->getCoord() == v2) - return CoFaceMeshingProperty::side_min; - else if (coface->getVertex(2)->getCoord() == v1 || coface->getVertex(1)->getCoord() == v2) - return CoFaceMeshingProperty::side_max; - if (coface->getNbVertices()==4){ - if (coface->getVertex(0)->getCoord() == v1 || coface->getVertex(3)->getCoord() == v2) - return CoFaceMeshingProperty::side_min; - else if (coface->getVertex(3)->getCoord() == v1 || coface->getVertex(0)->getCoord() == v2) - return CoFaceMeshingProperty::side_max; - } - } else if (dir == 1){ - if (coface->getVertex(1)->getCoord() == v1 || coface->getVertex(0)->getCoord() == v2) - return CoFaceMeshingProperty::side_min; - else if (coface->getVertex(0)->getCoord() == v1 || coface->getVertex(1)->getCoord() == v2) - return CoFaceMeshingProperty::side_max; - uint ind_op = (coface->getNbVertices()==4?3:0); - if (coface->getVertex(2)->getCoord() == v1 || coface->getVertex(ind_op)->getCoord() == v2) - return CoFaceMeshingProperty::side_min; - else if (coface->getVertex(ind_op)->getCoord() == v1 || coface->getVertex(2)->getCoord() == v2) - return CoFaceMeshingProperty::side_max; - } else - throw TkUtil::Exception (TkUtil::UTF8String ("Erreur interne, CoFaceMeshingProperty::_computeSide / dir", TkUtil::Charset::UTF_8)); - - TkUtil::UTF8String messErr (TkUtil::Charset::UTF_8); - messErr << "Il n'est pas possible de sélectionner un côté de la face "<getName() - << " avec les 2 points "<< v1 << " et "<< v2; - throw TkUtil::Exception(messErr); -} -/*----------------------------------------------------------------------------*/ } // end namespace Topo /*----------------------------------------------------------------------------*/ } // end namespace Mgx3D diff --git a/src/Core/Topo/CommandChangeVertexSameLocation.cpp b/src/Core/Topo/CommandChangeVertexSameLocation.cpp index f417a54..d0f7ec6 100644 --- a/src/Core/Topo/CommandChangeVertexSameLocation.cpp +++ b/src/Core/Topo/CommandChangeVertexSameLocation.cpp @@ -67,9 +67,6 @@ internalExecute() auto lastcofaces = std::unique(cofaces.begin(), cofaces.end()); cofaces.erase(lastcofaces, cofaces.end()); - // recherche la méthode la plus simple possible - updateMeshLaw(cofaces,blocks); - // on parcours les entités modifiées pour sauvegarder leur état d'avant la commande saveInternalsStats(); diff --git a/src/Core/Topo/CommandChangeVerticesLocation.cpp b/src/Core/Topo/CommandChangeVerticesLocation.cpp index 85bb84b..bb414b7 100644 --- a/src/Core/Topo/CommandChangeVerticesLocation.cpp +++ b/src/Core/Topo/CommandChangeVerticesLocation.cpp @@ -140,9 +140,6 @@ internalExecute() auto lastcofaces = std::unique(cofaces.begin(), cofaces.end()); cofaces.erase(lastcofaces, cofaces.end()); - // recherche la méthode la plus simple possible - updateMeshLaw(cofaces, blocks); - // on parcours les entités modifiées pour sauvegarder leur état d'avant la commande saveInternalsStats(); diff --git a/src/Core/Topo/CommandEditTopo.cpp b/src/Core/Topo/CommandEditTopo.cpp index a1bc6d5..fd46181 100644 --- a/src/Core/Topo/CommandEditTopo.cpp +++ b/src/Core/Topo/CommandEditTopo.cpp @@ -17,7 +17,6 @@ #include "Topo/Face.h" #include "Topo/CoFace.h" #include "Topo/Block.h" -#include "Topo/FaceMeshingPropertyOrthogonal.h" #include "Topo/EdgeMeshingPropertyInterpolate.h" #include "Geom/Vertex.h" @@ -435,48 +434,6 @@ registerToManagerCreatedEntities() } // end if (t == Internal::InfoCommand::CREATED) } // end for iter -} -/*----------------------------------------------------------------------------*/ -void CommandEditTopo:: -updateMeshLaw(std::vector& cofaces, std::vector& blocks) -{ -#ifdef _DEBUG2 - uint nb_cofaces = 0; - uint nb_blocs = 0; -#endif - for(auto& coface : cofaces){ - if (coface->isDestroyed()) - continue; -#ifdef _DEBUG2 - nb_cofaces += 1; -#endif - // cas d'une méthode structurée directionnelle ou rotationnelle - if (coface->getMeshLaw() < CoFaceMeshingProperty::transfinite){ - - // on cherche une méthode la plus basique possible - coface->selectBasicMeshLaw(&getInfoCommand(), true); - - } // end if (coface->getMeshLaw() <= rotJ) - } // end for iter=l_f.begin() - - // il est préférable de le faire sur les blocs après les faces communes - // c'est pour cela que tout est dans une unique méthode - for(auto& block : blocks){ - if (block->isDestroyed()) - continue; -#ifdef _DEBUG2 - nb_blocs += 1; -#endif - if (block->getMeshLaw() < BlockMeshingProperty::transfinite){ - - // on cherche une méthode la plus basique possible - block->selectBasicMeshLaw(&getInfoCommand(), true); - - } // end if (bloc->getMeshLaw() <= rotK) - } // end for iter=l_b.begin() -#ifdef _DEBUG2 - std::cout<<"CommandEditTopo::updateMeshLaw avec "< &nb_coedges_by_vertex) @@ -723,57 +680,6 @@ getPreviewRepresentationDeletedTopo(Utils::DisplayRepresentation& dr) previewEnd(); } /*----------------------------------------------------------------------------*/ -void CommandEditTopo::setOrthogonalCoEdges(CoFace* coface, FaceMeshingPropertyOrthogonal* mp) -{ - if (mp->getDir() == 0){ - // cas orthogonalité suivant I - if (mp->getSide() == 0){ - setOrthogonalCoEdges(coface->getEdge(1), coface->getVertex(1), mp->getNbLayers()); - // pour cas non dégénéré avec 3 sommets - if (coface->getNbVertices() == 4) - setOrthogonalCoEdges(coface->getEdge(3), coface->getVertex(0), mp->getNbLayers()); - } - else { - setOrthogonalCoEdges(coface->getEdge(1), coface->getVertex(2), mp->getNbLayers()); - // pour cas non dégénéré avec 3 sommets - if (coface->getNbVertices() == 4) - setOrthogonalCoEdges(coface->getEdge(3), coface->getVertex(3), mp->getNbLayers()); - } - - } else { - // cas orthogonalité suivant J - if (mp->getSide() == 0){ - setOrthogonalCoEdges(coface->getEdge(0), coface->getVertex(1), mp->getNbLayers()); - setOrthogonalCoEdges(coface->getEdge(2), coface->getVertex(2), mp->getNbLayers()); - } - else { - setOrthogonalCoEdges(coface->getEdge(0), coface->getVertex(0), mp->getNbLayers()); - setOrthogonalCoEdges(coface->getEdge(2), coface->getVertex(3), mp->getNbLayers()); - } - } -} -/*----------------------------------------------------------------------------*/ -void CommandEditTopo::setOrthogonalCoEdges(Edge* edge, Vertex* vertex, int nbLayers) -{ - if (edge->getNbCoEdges() == 1){ - CoEdge* coedge = edge->getCoEdge(0); - - CoEdgeMeshingProperty *cemp = coedge->getMeshingProperty()->clone(); - bool sens = (coedge->getVertex(0)==vertex); - cemp->setOrthogonal(nbLayers, sens); - if ((*cemp) != (*coedge->getMeshingProperty())) - coedge->switchCoEdgeMeshingProperty(&getInfoCommand(), cemp); - delete cemp; - } - else { - MGX_NOT_YET_IMPLEMENTED("Propagation orthogonalité pour plusieurs arêtes sur bord de face"); - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message <<"Propagation orthogonalité pour arête "<getName()<<" sur bord d'une face n'est pas implémentée"; - message <<"Cette arête est composée de plusieurs arêtes communes"; - getContext().getLogStream()->log (TkUtil::TraceLog (message, TkUtil::Log::WARNING)); - } -} -/*----------------------------------------------------------------------------*/ void CommandEditTopo:: duplicate(std::vector& cofaces_dep, std::map& filtre_vertex, diff --git a/src/Core/Topo/CommandExtrudeFace.cpp b/src/Core/Topo/CommandExtrudeFace.cpp index 165dc80..8501fca 100644 --- a/src/Core/Topo/CommandExtrudeFace.cpp +++ b/src/Core/Topo/CommandExtrudeFace.cpp @@ -10,9 +10,7 @@ #include "Topo/TopoHelper.h" #include "Topo/CoFace.h" #include "Topo/Edge.h" -#include "Topo/BlockMeshingPropertyDirectional.h" #include "Topo/EdgeMeshingPropertyUniform.h" -#include "Topo/FaceMeshingPropertyDirectional.h" #include "Geom/CommandExtrusion.h" #include "Geom/Vertex.h" @@ -366,11 +364,6 @@ namespace Mgx3D { // mise à jour de la projection suivant la géom qui a été extrudée //updateGeomAssociation(coedge_0->getGeomAssociation(), newCoFace); - // maillage directionnel, suivant extrusion - FaceMeshingPropertyDirectional* newProp = new FaceMeshingPropertyDirectional(FaceMeshingPropertyDirectional::dir_j); - CoFaceMeshingProperty* oldProp = newCoFace->setProperty(newProp); - delete oldProp; - } // end if filtre_vu } // end for coedges } // end for edges @@ -522,8 +515,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..7f9aa4d 100644 --- a/src/Core/Topo/CommandExtrudeTopo.cpp +++ b/src/Core/Topo/CommandExtrudeTopo.cpp @@ -14,9 +14,7 @@ #include "Topo/TopoHelper.h" #include "Topo/CoFace.h" #include "Topo/Edge.h" -#include "Topo/BlockMeshingPropertyDirectional.h" #include "Topo/EdgeMeshingPropertyUniform.h" -#include "Topo/FaceMeshingPropertyDirectional.h" #include "Geom/CommandExtrusion.h" #include "Geom/Vertex.h" @@ -333,11 +331,6 @@ void CommandExtrudeTopo::constructExtrudeFaces(std::vector& cofaces_0, // mise à jour de la projection suivant la géom qui a été extrudée updateGeomAssociation(coedge_0->getGeomAssociation(), newCoFace); - // maillage directionnel, suivant extrusion - FaceMeshingPropertyDirectional* newProp = new FaceMeshingPropertyDirectional(FaceMeshingPropertyDirectional::dir_j); - CoFaceMeshingProperty* oldProp = newCoFace->setProperty(newProp); - delete oldProp; - } // end if filtre_vu } // end for coedges } // end for edges @@ -489,9 +482,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..2d1e506 100644 --- a/src/Core/Topo/CommandMakeBlocksByRevol.cpp +++ b/src/Core/Topo/CommandMakeBlocksByRevol.cpp @@ -16,10 +16,6 @@ #include "Topo/CoFace.h" #include "Topo/Edge.h" #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" @@ -2020,42 +2016,6 @@ constructRevolFaces(std::vector& cofaces_0, else updateGeomAssociation(coedge_0->getGeomAssociation(), newCoFace); -#ifdef _DEBUG_MESH_LAW - std::cout<<"filtre_coedge["<getName()<<"] = "<getMeshLaw() != CoEdgeMeshingProperty::interpolate){ - // on remplace la méthode créée par défaut, par celle directionnelle en I - FaceMeshingPropertyDirectional* newProp = new FaceMeshingPropertyDirectional(FaceMeshingPropertyDirectional::dir_i); - CoFaceMeshingProperty* oldProp = newCoFace->setProperty(newProp); - delete oldProp; -#ifdef _DEBUG_MESH_LAW - std::cout<<"On utilise la méthode direction (dirI) pour mailler "<getName()<getNbVertices(); i++) - if (filtre_vertex[coedge_dep->getVertex(i)]%5 == 1) - touche = true; - if (!touche){ - // on remplace la méthode créée par défaut, par celle rotationnelle suivant J - FaceMeshingPropertyRotational* newProp = - new FaceMeshingPropertyRotational - (FaceMeshingPropertyRotational::dir_j, - Utils::Math::Point(0,0,0), - Utils::Math::Point(1,0,0)); - CoFaceMeshingProperty* oldProp = newCoFace->setProperty(newProp); - delete oldProp; -#ifdef _DEBUG_MESH_LAW - std::cout<<"On utilise la méthode rotation (rotJ) pour mailler "<getName()<& cofaces_0, std::cout<<"\nCréation du bloc à l'extérieur de l'ogrid : "<<*newBlock; //newBlock->check(); #endif - - // on cherche si l'une des directions peut servir pour définir un maillage unidirectionnel - // on se base sur la face de départ - // non valable pour le cas des blocs dégénérés - bool findDir = false; - if (vertices.size() == 8){ - Face* face = newBlock->getFace(0); - if (face->getNbCoFaces() == 1){ - CoFaceMeshingProperty::meshLaw ml = face->getCoFace(0)->getMeshLaw(); - findDir = (ml == CoFaceMeshingProperty::directional); - } - } - - if (vertices.size() == 8 && findDir){ - std::vector iCoedges; - std::vector jCoedges; - - 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 } /*----------------------------------------------------------------------------*/ @@ -3225,7 +3078,6 @@ constructRevolBlocksInnerOgrid_4(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du bloc à l'intérieur de l'ogrid (sur l'axe) : "<<*newBlock; @@ -3341,7 +3193,6 @@ constructRevolBlocksInnerOgrid_4(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 1er bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -3437,7 +3288,6 @@ constructRevolBlocksInnerOgrid_4(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 2ème bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -3511,7 +3361,6 @@ constructRevolBlocksInnerOgrid_4(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 3ème bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -3691,7 +3540,6 @@ constructRevolBlocksInnerOgrid_2(std::vector& cofaces_0, // Block (unique) Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du bloc à l'intérieur de l'ogrid (sur l'axe) : "<<*newBlock; @@ -3803,7 +3651,6 @@ constructRevolBlocksInnerOgrid_2(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 1er bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -3904,7 +3751,6 @@ constructRevolBlocksInnerOgrid_2(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 2ème bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -4000,7 +3846,6 @@ constructRevolBlocksInnerOgrid_2(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 3ème bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -4097,7 +3942,6 @@ constructRevolBlocksInnerOgrid_2(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 4ème bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -4174,7 +4018,6 @@ constructRevolBlocksInnerOgrid_2(std::vector& cofaces_0, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du 5ème bloc à l'intérieur de l'ogrid (autour du bloc central) : "<<*newBlock; @@ -4328,7 +4171,6 @@ constructRevolBlocksInnerOgrid_1(std::vector& cofaces_45, // Block (unique) Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_45->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du bloc à l'intérieur de l'ogrid (sur l'axe) : "<<*newBlock; @@ -4519,7 +4361,6 @@ constructRevolBlocksInnerOgrid_1(std::vector& cofaces_45, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du "<& cofaces_45, Block* newBlock = new Topo::Block(getContext(), faces, vertices, true); getInfoCommand().addTopoInfoEntity(newBlock, Internal::InfoCommand::CREATED); - newBlock->selectBasicMeshLaw(&getInfoCommand()); updateGeomAssociation(coface_0->getGeomAssociation(), newBlock); #ifdef _DEBUG_REVOL std::cout<<"\nCréation du "<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 @@ -325,40 +287,6 @@ void CommandSetBlockMeshingProperty::getPreviewRepresentation(Utils::DisplayRepr MGX_FORBIDDEN("getPreviewRepresentation non prévu"); } /*----------------------------------------------------------------------------*/ -void CommandSetBlockMeshingProperty::setOrthogonalCoFaces(Face* face, Vertex* vtx1, Vertex* vtx2, int nbLayers, bool reverse) -{ - if (face->getNbCoFaces() == 1){ - CoFace* coface = face->getCoFace(0); - - Utils::Math::Point v2, v1; - if (reverse){ - v2 = vtx1->getCoord(); - v1 = vtx2->getCoord(); - } - else { - v1 = vtx1->getCoord(); - v2 = vtx2->getCoord(); - } - - FaceMeshingPropertyOrthogonal* mp = new FaceMeshingPropertyOrthogonal(v1, v2, nbLayers); - mp->initDir(coface); // initialisation avant == - - if ((*mp) != (*coface->getCoFaceMeshingProperty())) { - coface->switchCoFaceMeshingProperty(&getInfoCommand(), mp); - - setOrthogonalCoEdges(coface, mp); - } - delete mp; - } - else { - MGX_NOT_YET_IMPLEMENTED("Propagation orthogonalité pour plusieurs faces sur bord de bloc"); - TkUtil::UTF8String message (TkUtil::Charset::UTF_8); - message <<"Propagation orthogonalité pour face "<getName()<<" sur bord d'un bloc n'est pas implémentée"; - message <<"Cette face est composée de plusieurs faces communes"; - getContext().getLogStream()->log (TkUtil::TraceLog (message, TkUtil::Log::WARNING)); - } -} -/*----------------------------------------------------------------------------*/ } // end namespace Topo /*----------------------------------------------------------------------------*/ } // end namespace Mgx3D diff --git a/src/Core/Topo/CommandSetFaceMeshingProperty.cpp b/src/Core/Topo/CommandSetFaceMeshingProperty.cpp index f7d1858..6d8ca09 100644 --- a/src/Core/Topo/CommandSetFaceMeshingProperty.cpp +++ b/src/Core/Topo/CommandSetFaceMeshingProperty.cpp @@ -8,7 +8,6 @@ */ /*----------------------------------------------------------------------------*/ #include "Topo/CommandSetFaceMeshingProperty.h" -#include "Topo/FaceMeshingPropertyOrthogonal.h" #include "Utils/Common.h" /*----------------------------------------------------------------------------*/ @@ -69,15 +68,6 @@ internalExecute() // initialise la direction si nécessaire coface->getCoFaceMeshingProperty()->initDir(coface); - - // transmission de la demande d'orthogonalité aux arêtes - if (m_prop->getMeshLaw() == CoFaceMeshingProperty::orthogonal){ - FaceMeshingPropertyOrthogonal* mp = dynamic_cast(coface->getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(mp); - - setOrthogonalCoEdges(coface, mp); - - } // end if (m_prop->getMeshLaw() == CoFaceMeshingProperty::orthogonal) } // 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..f6c340a 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() @@ -683,9 +667,6 @@ internalExecute() } // end for iter1 } //end if (!m_project_on_first) - // recherche la méthode la plus simple possible pour les cofaces et les blocs modifiés - updateMeshLaw(cofaces, blocks); - // enregistrement des nouvelles entités dans le TopoManager registerToManagerCreatedEntities(); diff --git a/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp b/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp index f93117d..5323ef6 100644 --- a/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp +++ b/src/Core/Topo/CommandSplitBlocksWithOgrid.cpp @@ -1601,9 +1601,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) @@ -1671,9 +1668,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 @@ -1711,9 +1705,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..2875a18 100644 --- a/src/Core/Topo/CommandTransformTopo.cpp +++ b/src/Core/Topo/CommandTransformTopo.cpp @@ -12,8 +12,6 @@ #include "Utils/Common.h" #include "Topo/Block.h" #include "Topo/TopoHelper.h" -#include "Topo/FaceMeshingPropertyRotational.h" -#include "Topo/BlockMeshingPropertyRotational.h" #include "Topo/CommandDuplicateTopo.h" /*----------------------------------------------------------------------------*/ #include @@ -152,28 +150,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 +171,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; } /*----------------------------------------------------------------------------*/ @@ -238,27 +192,6 @@ transform(CoFace* co, gp_Trsf* transf, std::map& filtre) } } - if (co->getMeshLaw() == Topo::CoFaceMeshingProperty::rotational){ - FaceMeshingPropertyRotational* fmp = dynamic_cast(co->getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(fmp); - Utils::Math::Point axis[2]; - fmp->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); - } - co->saveCoFaceMeshingProperty(&getInfoCommand()); - fmp->setAxis(axis[0], axis[1]); - } - filtre[co] = 1; } /*----------------------------------------------------------------------------*/ @@ -280,27 +213,6 @@ transform(CoFace* co, gp_GTrsf* transf, std::map& filtre) } } - if (co->getMeshLaw() == Topo::CoFaceMeshingProperty::rotational){ - FaceMeshingPropertyRotational* fmp = dynamic_cast(co->getCoFaceMeshingProperty()); - CHECK_NULL_PTR_ERROR(fmp); - Utils::Math::Point axis[2]; - fmp->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); - } - co->saveCoFaceMeshingProperty(&getInfoCommand()); - fmp->setAxis(axis[0], axis[1]); - } - filtre[co] = 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..07ff082 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 @@ -371,11 +369,6 @@ class Block : public TopoEntity { */ virtual void setMeshLaw(BlockMeshingProperty* new_ppty); - /** Recherche d'une méthode de maillage unidirectionnelle autant que possible, - * sinon on utilise la méthode transfinie - */ - virtual void selectBasicMeshLaw(Internal::InfoCommand* icmd, bool forceCompute = false); - /*------------------------------------------------------------------------*/ /** Accesseur sur la liste des points */ Utils::Math::Point*& points() {return m_mesh_data->points();} @@ -544,20 +537,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/CoFace.h b/src/Core/protected/Topo/CoFace.h index 932fb51..a53c764 100644 --- a/src/Core/protected/Topo/CoFace.h +++ b/src/Core/protected/Topo/CoFace.h @@ -63,9 +63,7 @@ class CoFace : public TopoEntity { bool hasHole); /// Constructeur par défaut, maillage structuré - CoFace(Internal::Context& c, int ni=0, int nj=0, - CoFaceMeshingProperty::meshLaw ml = CoFaceMeshingProperty::directional, - CoFaceMeshingProperty::meshDirLaw md = CoFaceMeshingProperty::dir_i); + CoFace(Internal::Context& c, int ni=0, int nj=0); /*------------------------------------------------------------------------*/ @@ -438,12 +436,6 @@ class CoFace : public TopoEntity { /// Accesseur sur le nom de la méthode de maillage virtual std::string getMeshLawName() const {return m_mesh_property->getMeshLawName();} - /** Recherche d'une méthode de maillage unidirectionnelle autant que possible, - * sinon on utilise la méthode transfinie - */ - - virtual void selectBasicMeshLaw(Internal::InfoCommand* icmd, bool forceCompute = false); - /*------------------------------------------------------------------------*/ /** Accesseur sur la liste des noeuds ordonnés suivant les sommets diff --git a/src/Core/protected/Topo/CoFaceMeshingProperty.h b/src/Core/protected/Topo/CoFaceMeshingProperty.h index de8c3ba..679f0ab 100644 --- a/src/Core/protected/Topo/CoFaceMeshingProperty.h +++ b/src/Core/protected/Topo/CoFaceMeshingProperty.h @@ -33,23 +33,11 @@ class CoFaceMeshingProperty { /** Les méthodes de maillage pour une face commune */ typedef enum{ - directional, - orthogonal, - rotational, transfinite, delaunayGMSH, // recommandé / delaunay GMSH quadPairing } meshLaw; - /** Direction suivant laquelle est effectuée la discrétisation (relative à la face commune) - * pour les méthodes avec une direction - */ - typedef enum{ - dir_undef, - dir_i, - dir_j - }meshDirLaw; - /** Côté de départ pour les discrétisations orientés (tel que FaceMeshingPropertyOrthogonal) */ typedef enum{ @@ -105,14 +93,6 @@ class CoFaceMeshingProperty { CoFaceMeshingProperty(const CoFaceMeshingProperty& pm) {} #endif - /*------------------------------------------------------------------------*/ -#ifndef SWIG - /// Cherche la direction dans la coface à partir de deux points - static meshDirLaw _computeDir(CoFace* coface, Utils::Math::Point & v1, Utils::Math::Point & v2); - /// Cherche le côté dans la coface à partir de deux points - static meshSideLaw _computeSide(CoFace* coface, Utils::Math::Point & v1, Utils::Math::Point & v2, uint dir); -#endif - }; /*----------------------------------------------------------------------------*/ } // end namespace Topo diff --git a/src/Core/protected/Topo/CommandEditTopo.h b/src/Core/protected/Topo/CommandEditTopo.h index 2dcf7f9..9fb3401 100644 --- a/src/Core/protected/Topo/CommandEditTopo.h +++ b/src/Core/protected/Topo/CommandEditTopo.h @@ -195,20 +195,6 @@ class CommandEditTopo: public Internal::CommandInternal { /// Compte le nombre d'arêtes reliées à chacun des sommets de la topologie concernée par la commande virtual void countNbCoEdgesByVertices(std::map &nb_coedges_by_vertex); - /*------------------------------------------------------------------------*/ - /** Dans les cas d'une méthode de maillage initiale directionnelle ou rotationnelle - * potentiellement invalide - * recherche la méthode la plus simple - */ - void updateMeshLaw(std::vector& cofaces, std::vector& blocks); - - /*------------------------------------------------------------------------*/ - /// change la discrétisation pour les arêtes d'une coface en mettant la discrétisation orthogonale - virtual void setOrthogonalCoEdges(CoFace* coface, FaceMeshingPropertyOrthogonal* mp); - - /// Change la discrétisation pour une ou plusieurs arêtes en la mettant orthogonale - virtual void setOrthogonalCoEdges(Edge* edge, Vertex* vertex, int nbLayers); - /*------------------------------------------------------------------------*/ /** Duplique les CoFaces */ 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/CommandSetBlockMeshingProperty.h b/src/Core/protected/Topo/CommandSetBlockMeshingProperty.h index 3fa9617..e1e4266 100644 --- a/src/Core/protected/Topo/CommandSetBlockMeshingProperty.h +++ b/src/Core/protected/Topo/CommandSetBlockMeshingProperty.h @@ -64,9 +64,6 @@ class CommandSetBlockMeshingProperty: public Topo::CommandEditTopo { /// recherche le sommet suivant pour une face dans un bloc avec 2 sommets non marqués à 2 Vertex* getNextVertex(Block* bloc, Vertex* vtx1, Vertex* vtx2, std::map& filtre_sommets); - /// Change la discrétisation pour une ou plusieurs faces en la mettant orthogonale - void setOrthogonalCoFaces(Face* face, Vertex* vtx1, Vertex* vtx2, int nbLayers, bool reverse); - private: /// la nouvelle propriété de discrétisation BlockMeshingProperty* m_prop; diff --git a/src/Core/protected/Topo/FaceMeshingPropertyDirectional.h b/src/Core/protected/Topo/FaceMeshingPropertyDirectional.h deleted file mode 100644 index e9ff260..0000000 --- a/src/Core/protected/Topo/FaceMeshingPropertyDirectional.h +++ /dev/null @@ -1,139 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file FaceMeshingPropertyDirectional.h - * - * \author Eric Brière de l'Isle - * - * \date 10/10/13 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef FACEPROPERTYMESHINGDIRECTIONAL_H_ -#define FACEPROPERTYMESHINGDIRECTIONAL_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/CoFaceMeshingProperty.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété de la discrétisation d'une face commune suivant une direction - */ -class FaceMeshingPropertyDirectional : public CoFaceMeshingProperty { -public: - - /*------------------------------------------------------------------------*/ - /// Constructeur avec direction suivant 2 sommets - FaceMeshingPropertyDirectional(Utils::Math::Point v1, Utils::Math::Point v2) - : m_dir(dir_undef), m_v1(v1), m_v2(v2) - {} - - /// Constructeur dont on connait la direction - FaceMeshingPropertyDirectional(meshDirLaw md) - : m_dir(md), m_v1(), m_v2() - {} - - /*------------------------------------------------------------------------*/ - /// Comparaison de 2 propriétés. - virtual bool operator == (const CoFaceMeshingProperty& mp) const - { - const FaceMeshingPropertyDirectional* fmp = dynamic_cast (&mp); - return fmp != 0 && - m_dir == fmp->m_dir && - m_v1 == fmp->m_v1 && - m_v2 == fmp->m_v2 && - CoFaceMeshingProperty::operator == (*fmp); - } - - /*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - virtual CoFaceMeshingProperty::meshLaw getMeshLaw() const {return CoFaceMeshingProperty::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 - 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 - throw TkUtil::Exception(TkUtil::UTF8String ("FaceMeshingPropertyDirectional::getDir() ne peut se faire sans initialiser la direction", TkUtil::Charset::UTF_8)); - } - - /*------------------------------------------------------------------------*/ - /// inversion de la direction - virtual void permDir() - { - if (m_dir == dir_i) - m_dir = dir_j; - else if (m_dir == dir_j) - m_dir = dir_i; - else - throw TkUtil::Exception(TkUtil::UTF8String ("FaceMeshingPropertyDirectional::permDir() ne peut se faire sans initialiser la direction", TkUtil::Charset::UTF_8)); - } - - /*------------------------------------------------------------------------*/ - /** \brief Indique si la face est structurée - */ - virtual bool isStructured() const {return true;} - -#ifndef SWIG - /*------------------------------------------------------------------------*/ - /// initialisation de la direction en fonction de ce qui a été donné à la construction - virtual void initDir(CoFace* coface) - { - m_dir = _computeDir(coface, m_v1, m_v2); - } - - /*------------------------------------------------------------------------*/ - /** Création d'un clone, on copie toutes les informations */ - virtual FaceMeshingPropertyDirectional* clone() {return new FaceMeshingPropertyDirectional(*this);} - - /*------------------------------------------------------------------------*/ - /// Script pour la commande de création Python - virtual TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - o << getMgx3DAlias() << ".FaceMeshingPropertyDirectional(" - << m_v1.getScriptCommand() << ", " - << m_v2.getScriptCommand() << ")"; - return o; - } -#endif - -protected: - - /*------------------------------------------------------------------------*/ - /// Direction suivant laquelle est effectuée la discrétisation (relative à la CoFace) - 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; - -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ - -#endif /* FACEPROPERTYMESHINGDIRECTIONAL_H_ */ diff --git a/src/Core/protected/Topo/FaceMeshingPropertyOrthogonal.h b/src/Core/protected/Topo/FaceMeshingPropertyOrthogonal.h deleted file mode 100644 index 8d3c1c9..0000000 --- a/src/Core/protected/Topo/FaceMeshingPropertyOrthogonal.h +++ /dev/null @@ -1,138 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file FaceMeshingPropertyOrthogonal.h - * - * \author Eric Brière de l'Isle - * - * \date 9/7/15 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef FACEPROPERTYMESHINGORTHOGONAL_H_ -#define FACEPROPERTYMESHINGORTHOGONAL_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/FaceMeshingPropertyDirectional.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété de la discrétisation d'une face commune suivant une direction - */ -class FaceMeshingPropertyOrthogonal : public FaceMeshingPropertyDirectional { -public: - - /*------------------------------------------------------------------------*/ - /// Constructeur avec direction suivant 2 sommets - FaceMeshingPropertyOrthogonal(Utils::Math::Point v1, Utils::Math::Point v2, int nbLayers) - : FaceMeshingPropertyDirectional(v1, v2) - , m_side(side_undef) - , m_nbLayers(nbLayers) - {} - - /// Constructeur dont on connait la direction - FaceMeshingPropertyOrthogonal(meshDirLaw md, int nbLayers) - : FaceMeshingPropertyDirectional(md) - , m_side(side_undef) - , m_nbLayers(nbLayers) - {} - - /*------------------------------------------------------------------------*/ - /// Comparaison de 2 propriétés. - virtual bool operator == (const CoFaceMeshingProperty& mp) const - { - const FaceMeshingPropertyOrthogonal* fmp = dynamic_cast (&mp); - return fmp != 0 && - m_nbLayers == fmp->m_nbLayers && - m_side == fmp->m_side && - FaceMeshingPropertyDirectional::operator == (*fmp); - } - -/*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - virtual CoFaceMeshingProperty::meshLaw getMeshLaw() const - {return CoFaceMeshingProperty::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 - return "Direction à préciser"; - } - -#ifndef SWIG - /*------------------------------------------------------------------------*/ - /// initialisation du côté en plus - virtual void initDir(CoFace* coface) - { - FaceMeshingPropertyDirectional::initDir(coface); - - m_side = _computeSide(coface, m_v1, m_v2, getDir()); - } - - /*------------------------------------------------------------------------*/ - 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 ("FaceMeshingPropertyOrthogonal::getSide() ne peut se faire sans initialiser le côté", TkUtil::Charset::UTF_8)); - } - - /*------------------------------------------------------------------------*/ - /** Création d'un clone, on copie toutes les informations */ - virtual FaceMeshingPropertyOrthogonal* clone() {return new FaceMeshingPropertyOrthogonal(*this);} - - /*------------------------------------------------------------------------*/ - /// Script pour la commande de création Python - virtual TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - o << getMgx3DAlias() << ".FaceMeshingPropertyOrthogonal(" - << m_v1.getScriptCommand() << ", " - << m_v2.getScriptCommand() << ", " - << (long)m_nbLayers << ")"; - return o; - } - - /// 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 /* FACEPROPERTYMESHINGORTHOGONAL_H_ */ diff --git a/src/Core/protected/Topo/FaceMeshingPropertyRotational.h b/src/Core/protected/Topo/FaceMeshingPropertyRotational.h deleted file mode 100644 index e4a5f6e..0000000 --- a/src/Core/protected/Topo/FaceMeshingPropertyRotational.h +++ /dev/null @@ -1,156 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* - * \file FaceMeshingPropertyRotational.h - * - * \author Eric Brière de l'Isle - * - * \date 10/10/13 - */ -/*----------------------------------------------------------------------------*/ - - -#ifndef FACEPROPERTYMESHINGROTATIONAL_H_ -#define FACEPROPERTYMESHINGROTATIONAL_H_ -/*----------------------------------------------------------------------------*/ -#include "Utils/Point.h" -#include "Topo/CoFaceMeshingProperty.h" -/*----------------------------------------------------------------------------*/ -namespace Mgx3D { -/*----------------------------------------------------------------------------*/ -namespace Topo { -/*----------------------------------------------------------------------------*/ -/** - @brief Propriété de la discrétisation d'une face commune - */ -class FaceMeshingPropertyRotational : public CoFaceMeshingProperty { -public: - - /*------------------------------------------------------------------------*/ - /** Constructeur avec rotation suivant 2 sommets, - autour d'un axe défini par deux points - */ - FaceMeshingPropertyRotational(Utils::Math::Point v1, Utils::Math::Point v2, - Utils::Math::Point axis1, Utils::Math::Point axis2) - : m_dir(dir_undef), m_v1(v1), m_v2(v2), m_axis1(axis1), m_axis2(axis2) - {} - - /** Constructeur avec rotation déterminée, - autour d'un axe défini par deux points - */ - FaceMeshingPropertyRotational(meshDirLaw md, - Utils::Math::Point axis1, Utils::Math::Point axis2) - : m_dir(md), m_v1(), m_v2(), m_axis1(axis1), m_axis2(axis2) - {} - - /*------------------------------------------------------------------------*/ - /// Comparaison de 2 propriétés. - virtual bool operator == (const CoFaceMeshingProperty& mp) const - { - const FaceMeshingPropertyRotational* fmp = dynamic_cast (&mp); - return fmp != 0 && - getDir() == fmp->getDir() && - m_v1 == fmp->m_v1 && - m_v2 == fmp->m_v2 && - m_axis1 == fmp->m_axis1 && - m_axis2 == fmp->m_axis2 && - CoFaceMeshingProperty::operator == (*fmp); - } - /*------------------------------------------------------------------------*/ - /// Accesseur sur la méthode de maillage - CoFaceMeshingProperty::meshLaw getMeshLaw() const {return CoFaceMeshingProperty::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 - 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 - throw TkUtil::Exception(TkUtil::UTF8String ("FaceMeshingPropertyRotational::getDir() ne peut se faire sans initialiser la direction", TkUtil::Charset::UTF_8)); - } - - /*------------------------------------------------------------------------*/ - /** \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 - void initDir(CoFace* coface) - { - m_dir = _computeDir(coface, m_v1, m_v2); - } - - /*------------------------------------------------------------------------*/ - /** Création d'un clone, on copie toutes les informations */ - FaceMeshingPropertyRotational* clone() {return new FaceMeshingPropertyRotational(*this);} - - /*------------------------------------------------------------------------*/ - /// Script pour la commande de création Python - virtual TkUtil::UTF8String getScriptCommand() const - { - TkUtil::UTF8String o (TkUtil::Charset::UTF_8); - o << getMgx3DAlias() << ".FaceMeshingPropertyRotational(" - << m_v1.getScriptCommand() << ", " - << m_v2.getScriptCommand() << ", " - << m_axis1.getScriptCommand() << ", " - << m_axis2.getScriptCommand() << ")"; - return o; - } -#endif - -private: - - /*------------------------------------------------------------------------*/ - /// Direction suivant laquelle est effectuée la discrétisation (relative à la CoFace) - 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; - -}; -/*----------------------------------------------------------------------------*/ -} // end namespace Topo -/*----------------------------------------------------------------------------*/ -} // end namespace Mgx3D -/*----------------------------------------------------------------------------*/ - -#endif /* FACEPROPERTYMESHINGROTATIONAL_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/QtFaceMeshingPropertyAction.cpp b/src/QtComponents/QtFaceMeshingPropertyAction.cpp index 47f357c..7196412 100644 --- a/src/QtComponents/QtFaceMeshingPropertyAction.cpp +++ b/src/QtComponents/QtFaceMeshingPropertyAction.cpp @@ -87,590 +87,6 @@ FaceMeshingPropertyTransfinite* QtFaceTransfinitePanel::getMeshingProperty ( ) c } // QtFaceTransfinitePanel::getMeshingProperty -// =========================================================================== -// LA CLASSE QtFaceDirectionalPanel -// =========================================================================== - - -QtFaceDirectionalPanel::QtFaceDirectionalPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtMgx3DOperationsSubPanel (parent, window, mainPanel), - _edgeTextField (0), _invertCheckBox (0), _directionLabel (0) -{ - QVBoxLayout* layout = new QVBoxLayout (this); - setLayout (layout); - layout->setContentsMargins ( - Resources::instance ( )._margin.getValue ( ), - Resources::instance ( )._margin.getValue ( ), - Resources::instance ( )._margin.getValue ( ), - Resources::instance ( )._margin.getValue ( )); - layout->setSpacing (Resources::instance ( )._spacing.getValue ( )); - - // 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); - hlayout->addStretch (2.); -} // QtFaceDirectionalPanel::QtFaceDirectionalPanel - - -QtFaceDirectionalPanel::QtFaceDirectionalPanel ( - const QtFaceDirectionalPanel& p) - : QtMgx3DOperationsSubPanel (p), - _edgeTextField (0), _invertCheckBox (0), _directionLabel (0) -{ - MGX_FORBIDDEN ("QtFaceDirectionalPanel copy constructor is not allowed."); -} // QtFaceDirectionalPanel::QtFaceDirectionalPanel - - -QtFaceDirectionalPanel& QtFaceDirectionalPanel::operator = ( - const QtFaceDirectionalPanel&) -{ - MGX_FORBIDDEN ("QtFaceDirectionalPanel assignment operator is not allowed."); - return *this; -} // QtFaceDirectionalPanel::operator = - - -QtFaceDirectionalPanel::~QtFaceDirectionalPanel ( ) -{ -} // QtFaceDirectionalPanel::~QtFaceDirectionalPanel - - -void QtFaceDirectionalPanel::setVisible (bool visible) -{ - preview (visible, true); - QtMgx3DOperationsSubPanel::setVisible (visible); -} // QtFaceDirectionalPanel::setVisible - - -Math::Point QtFaceDirectionalPanel::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 ( ); -} // QtFaceDirectionalPanel::getPoint1 - - -Math::Point QtFaceDirectionalPanel::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 ( ); -} // QtFaceDirectionalPanel::getPoint2 - - -FaceMeshingPropertyDirectional* QtFaceDirectionalPanel::getMeshingProperty ( ) const -{ - return new FaceMeshingPropertyDirectional (getPoint1 ( ), getPoint2 ( )); -} // QtFaceDirectionalPanel::getMeshingProperty - - -bool QtFaceDirectionalPanel::isEdgeInverted ( ) const -{ - CHECK_NULL_PTR_ERROR (_invertCheckBox) - return Qt::Checked == _invertCheckBox->checkState ( ) ? true : false; -} // QtFaceDirectionalPanel::isEdgeInverted - - -void QtFaceDirectionalPanel::stopSelection ( ) -{ - if (0 != _edgeTextField) - _edgeTextField->stopSelection ( ); -} // QtFaceDirectionalPanel::stopSelection - - -QtEntityIDTextField* QtFaceDirectionalPanel::getEdgeTextField ( ) -{ - CHECK_NULL_PTR_ERROR (_edgeTextField) - return &_edgeTextField->getEntityTextField ( ); -} // QtFaceDirectionalPanel::getEdgeTextField - - -void QtFaceDirectionalPanel::reset ( ) -{ - BEGIN_QT_TRY_CATCH_BLOCK - - CHECK_NULL_PTR_ERROR (_edgeTextField) - _edgeTextField->reset ( ); - - CHECK_NULL_PTR_ERROR(_directionLabel) - _directionLabel->clear(); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - QtMgx3DOperationsSubPanel::reset ( ); -} // QtFaceDirectionalPanel::reset - - -void QtFaceDirectionalPanel::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 (...) - { - } -} // QtFaceDirectionalPanel::preview - - -void QtFaceDirectionalPanel::directionModifiedCallback ( ) -{ - preview (true, true); -} // QtFaceDirectionalPanel::directionModifiedCallback - - -// =========================================================================== -// LA CLASSE QtFaceOrthogonalPanel -// =========================================================================== - - -QtFaceOrthogonalPanel::QtFaceOrthogonalPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtFaceDirectionalPanel (parent, window, mainPanel), - _layersNumTextField (0) -{ - QBoxLayout* mainLayout = dynamic_cast(layout ( )); - if (0 == mainLayout) - { - INTERNAL_ERROR (exc, "Mauvais type de layout.", "QtFaceOrthogonalPanel::QtFaceOrthogonalPanel") - 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 ( )); -} // QtFaceOrthogonalPanel::QtFaceOrthogonalPanel - - -QtFaceOrthogonalPanel::QtFaceOrthogonalPanel (const QtFaceOrthogonalPanel&) - : QtFaceDirectionalPanel (0,*new QtMgx3DMainWindow(0), 0), - _layersNumTextField (0) -{ - MGX_FORBIDDEN ("QtFaceDelaunayGMSHPanel copy constructor is not allowed."); -} // QtFaceOrthogonalPanel::QtFaceOrthogonalPanel - - -QtFaceOrthogonalPanel& QtFaceOrthogonalPanel::operator = ( - const QtFaceOrthogonalPanel&) -{ - MGX_FORBIDDEN ("QtFaceDelaunayGMSHPanel assignment operator is not allowed."); - return *this; -} // QtFaceOrthogonalPanel::operator = - - -QtFaceOrthogonalPanel::~QtFaceOrthogonalPanel ( ) -{ -} // QtFaceOrthogonalPanel::~QtFaceOrthogonalPanel - - -void QtFaceOrthogonalPanel::reset ( ) -{ - BEGIN_QT_TRY_CATCH_BLOCK - - CHECK_NULL_PTR_ERROR (_layersNumTextField) - _layersNumTextField->setValue (5); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - QtFaceDirectionalPanel::reset ( ); -} // QtFaceOrthogonalPanel::reset - - -FaceMeshingPropertyOrthogonal* - QtFaceOrthogonalPanel::getMeshingProperty ( ) const -{ - return new FaceMeshingPropertyOrthogonal ( - getPoint1 ( ), getPoint2 ( ), getLayersNum ( )); -} // QtFaceOrthogonalPanel::getMeshingProperty - - -size_t QtFaceOrthogonalPanel::getLayersNum( ) const -{ - CHECK_NULL_PTR_ERROR (_layersNumTextField) - return _layersNumTextField->getValue ( ); -} // QtFaceOrthogonalPanel::getLayersNum - - - -// =========================================================================== -// LA CLASSE QtFaceRotationalPanel -// =========================================================================== - - -QtFaceRotationalPanel::QtFaceRotationalPanel ( - QWidget* parent, QtMgx3DMainWindow& window, QtMgx3DOperationPanel* mainPanel) - : QtMgx3DOperationsSubPanel (parent, window, mainPanel), - _directionTextField (0), _axePoint1Panel (0), _axePoint2Panel (0), - _directionLabel (0), _axeLabel (0) -{ -// setContentsMargins (0, 0, 0, 0); - QVBoxLayout* layout = new QVBoxLayout (this); - setLayout (layout); - layout->setContentsMargins ( - Resources::instance ( )._margin.getValue ( ), - Resources::instance ( )._margin.getValue ( ), - Resources::instance ( )._margin.getValue ( ), - Resources::instance ( )._margin.getValue ( )); - layout->setSpacing (Resources::instance ( )._spacing.getValue ( )); - - // 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 ( ); -} // QtFaceRotationalPanel::QtFaceRotationalPanel - - -QtFaceRotationalPanel::QtFaceRotationalPanel ( - const QtFaceRotationalPanel& p) - : QtMgx3DOperationsSubPanel (p), _directionTextField (0), - _axePoint1Panel (0), _axePoint2Panel (0), - _directionLabel (0), _axeLabel (0) -{ - MGX_FORBIDDEN ("QtFaceRotationalPanel copy constructor is not allowed."); -} // QtFaceRotationalPanel::QtFaceRotationalPanel - - -QtFaceRotationalPanel& QtFaceRotationalPanel::operator = ( - const QtFaceRotationalPanel&) -{ - MGX_FORBIDDEN ("QtFaceRotationalPanel assignment operator is not allowed."); - return *this; -} // QtFaceRotationalPanel::operator = - - -QtFaceRotationalPanel::~QtFaceRotationalPanel ( ) -{ -} // QtFaceRotationalPanel::~QtFaceRotationalPanel - - -void QtFaceRotationalPanel::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 ( ); - - CHECK_NULL_PTR_ERROR(_directionLabel) - _directionLabel->clear(); - - COMPLETE_QT_TRY_CATCH_BLOCK (true, this, "Magix 3D") - - QtMgx3DOperationsSubPanel::reset ( ); -} // QtFaceRotationalPanel::reset - - -void QtFaceRotationalPanel::setVisible (bool visible) -{ - preview (visible, true); - QtMgx3DOperationsSubPanel::setVisible (visible); -} // QtFaceRotationalPanel::setVisible - - -Math::Point QtFaceRotationalPanel::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 ( ); -} // QtFaceRotationalPanel::getDirPoint1 - - -Math::Point QtFaceRotationalPanel::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 ( ); -} // QtFaceRotationalPanel::getDirPoint2 - - -Math::Point QtFaceRotationalPanel::getAxePoint1 ( ) const -{ - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - return _axePoint1Panel->getPoint(); -} // QtFaceRotationalPanel::getAxePoint1 - - -Math::Point QtFaceRotationalPanel::getAxePoint2 ( ) const -{ - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - return _axePoint2Panel->getPoint(); -} // QtFaceRotationalPanel::getAxePoint2 - - -FaceMeshingPropertyRotational* QtFaceRotationalPanel::getMeshingProperty ( ) const -{ - return new FaceMeshingPropertyRotational ( - getDirPoint1 ( ), getDirPoint2 ( ), getAxePoint1 ( ), getAxePoint2 ( )); -} // QtFaceRotationalPanel::getMeshingProperty - - -void QtFaceRotationalPanel::stopSelection ( ) -{ - if (0 != _directionTextField) - _directionTextField->stopSelection ( ); - if (0 != _axePoint1Panel) - _axePoint1Panel->stopSelection ( ); - if (0 != _axePoint2Panel) - _axePoint2Panel->stopSelection ( ); -} // QtFaceRotationalPanel::stopSelection - - -QtEntityIDTextField* QtFaceRotationalPanel::getEdgeTextField ( ) -{ - CHECK_NULL_PTR_ERROR (_directionTextField) - return &_directionTextField->getEntityTextField ( ); -} // QtFaceRotationalPanel::getEdgeTextField - - -QtEntityIDTextField* QtFaceRotationalPanel::getAxePoint1TextField ( ) -{ - CHECK_NULL_PTR_ERROR (_axePoint1Panel) - return _axePoint1Panel->getVertexTextField ( ); -} // QtFaceRotationalPanel::getAxePoint1TextField - - -QtEntityIDTextField* QtFaceRotationalPanel::getAxePoint2TextField ( ) -{ - CHECK_NULL_PTR_ERROR (_axePoint2Panel) - return _axePoint2Panel->getVertexTextField ( ); -} // QtFaceRotationalPanel::getAxePoint2TextField - - -void QtFaceRotationalPanel::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 (...) - { - } - - if (false == previewResult ( )) - return; - - 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 (...) - { - } -} // QtFaceRotationalPanel::preview - // =========================================================================== // LA CLASSE QtFaceDelaunayGMSHPanel @@ -877,8 +293,7 @@ QtFaceMeshingPropertyPanel::QtFaceMeshingPropertyPanel ( QtMgx3DApplication::HelpSystem::instance ( ).facesMeshingPropertyOperationTag), _operationMethodComboBox (0), _currentParentWidget (0), _currentPanel (0), - _transfinitePanel (0), _directionalPanel (0), _orthogonalPanel (0), - _rotationalPanel (0), + _transfinitePanel (0), _delaunayGMSHPanel (0), _quadPairingPanel(0), _facesPanel (0) { @@ -948,12 +363,6 @@ QtFaceMeshingPropertyPanel::QtFaceMeshingPropertyPanel ( // _transfinitePanel->layout ( )->setSpacing (5); // _transfinitePanel->layout ( )->setContentsMargins (0, 0, 0, 0); _transfinitePanel->hide ( ); - _directionalPanel = new QtFaceDirectionalPanel (0, mainWindow, this); - _directionalPanel->hide ( ); - _orthogonalPanel = new QtFaceOrthogonalPanel (0, mainWindow, this); - _orthogonalPanel->hide ( ); - _rotationalPanel = new QtFaceRotationalPanel (0, mainWindow, this); - _rotationalPanel->hide ( ); _delaunayGMSHPanel = new QtFaceDelaunayGMSHPanel (0, mainWindow, this); _delaunayGMSHPanel->hide ( ); // _quadPairingPanel = new QtFaceQuadPairingPanel(0, mainWindow, this); @@ -973,8 +382,7 @@ QtFaceMeshingPropertyPanel::QtFaceMeshingPropertyPanel (const QtFaceMeshingPrope 0, *new QtMgx3DMainWindow(0), 0, "", ""), _operationMethodComboBox (0), _currentParentWidget (0), _currentPanel (0), - _transfinitePanel (0), _directionalPanel (0), _orthogonalPanel (0), - _rotationalPanel (0), + _transfinitePanel (0), _delaunayGMSHPanel (0), _quadPairingPanel(0), _facesPanel (0) { @@ -1006,20 +414,11 @@ QtFaceMeshingPropertyPanel::OPERATION_METHOD CoFaceMeshingProperty* QtFaceMeshingPropertyPanel::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 (_delaunayGMSHPanel) switch (getOperationMethod ( )) { case QtFaceMeshingPropertyPanel::TRANSFINITE : return _transfinitePanel->getMeshingProperty ( ); - case QtFaceMeshingPropertyPanel::DIRECTIONAL : - return _directionalPanel->getMeshingProperty ( ); - case QtFaceMeshingPropertyPanel::ORTHOGONAL : - return _orthogonalPanel->getMeshingProperty ( ); - case QtFaceMeshingPropertyPanel::ROTATIONAL : - return _rotationalPanel->getMeshingProperty ( ); case QtFaceMeshingPropertyPanel::DELAUNAY_GMSH : return _delaunayGMSHPanel->getMeshingProperty ( ); // case QtFaceMeshingPropertyPanel::QUAD_PAIRING : @@ -1044,16 +443,10 @@ void QtFaceMeshingPropertyPanel::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 (_delaunayGMSHPanel) // CHECK_NULL_PTR_ERROR (_quadPairingPanel) CHECK_NULL_PTR_ERROR (_facesPanel) _transfinitePanel->reset ( ); - _directionalPanel->reset ( ); - _orthogonalPanel->reset ( ); - _rotationalPanel->reset ( ); _delaunayGMSHPanel->reset ( ); // _quadPairingPanel->reset ( ); _facesPanel->reset ( ); @@ -1091,9 +484,6 @@ void QtFaceMeshingPropertyPanel::validate ( ) switch (_operationMethodComboBox->currentIndex ( )) { case QtFaceMeshingPropertyPanel::TRANSFINITE : - case QtFaceMeshingPropertyPanel::DIRECTIONAL : - case QtFaceMeshingPropertyPanel::ORTHOGONAL : - case QtFaceMeshingPropertyPanel::ROTATIONAL : case QtFaceMeshingPropertyPanel::DELAUNAY_GMSH : // case QtFaceMeshingPropertyPanel::QUAD_PAIRING : break; @@ -1216,13 +606,6 @@ void QtFaceMeshingPropertyPanel::operationMethodCallback ( ) CHECK_NULL_PTR_ERROR (_facesPanel) CHECK_NULL_PTR_ERROR (_facesPanel->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 (_delaunayGMSHPanel) // CHECK_NULL_PTR_ERROR (_quadPairingPanel) if (0 != _currentPanel) @@ -1240,35 +623,6 @@ void QtFaceMeshingPropertyPanel::operationMethodCallback ( ) { case QtFaceMeshingPropertyPanel::TRANSFINITE : _currentPanel = _transfinitePanel; break; - case QtFaceMeshingPropertyPanel::DIRECTIONAL : - _currentPanel = _directionalPanel; - _directionalPanel->getEdgeTextField ( )->setLinkedSeizureManagers ( - 0, _facesPanel->getNameTextField ( )); - _facesPanel->getNameTextField ( )->setLinkedSeizureManagers ( - _directionalPanel->getEdgeTextField ( ), 0); - break; - case QtFaceMeshingPropertyPanel::ORTHOGONAL : - _currentPanel = _orthogonalPanel; - _orthogonalPanel->getEdgeTextField ( )->setLinkedSeizureManagers ( - 0, _facesPanel->getNameTextField ( )); - _facesPanel->getNameTextField ( )->setLinkedSeizureManagers ( - _orthogonalPanel->getEdgeTextField ( ), 0); - break; - case QtFaceMeshingPropertyPanel::ROTATIONAL : - _currentPanel = _rotationalPanel ; - _rotationalPanel->getEdgeTextField ( )->setLinkedSeizureManagers ( - 0, _rotationalPanel->getAxePoint1TextField ( )); - _rotationalPanel->getAxePoint1TextField ( - )->setLinkedSeizureManagers ( - _rotationalPanel->getEdgeTextField ( ), - _rotationalPanel->getAxePoint2TextField ( )); - _rotationalPanel->getAxePoint2TextField ( - )->setLinkedSeizureManagers ( - _rotationalPanel->getAxePoint1TextField ( ), - _facesPanel->getNameTextField ( )); - _facesPanel->getNameTextField ( )->setLinkedSeizureManagers ( - _rotationalPanel->getAxePoint2TextField ( ), 0); - break; case QtFaceMeshingPropertyPanel::DELAUNAY_GMSH : _currentPanel = _delaunayGMSHPanel; break; // case QtFaceMeshingPropertyPanel::QUAD_PAIRING : diff --git a/src/QtComponents/QtTopoInformationOperationAction.cpp b/src/QtComponents/QtTopoInformationOperationAction.cpp index d7391d7..61dad9c 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; } @@ -374,15 +366,7 @@ void QtTopoInformationOperationPanel::autoUpdate ( ) nb_cofaces +=1; size_t nb = coface->getMeshingData()->faces().size(); nb_faces_tot += nb; - if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::directional){ - nb_fac_str_dir += 1; - nb_faces_str_dir += nb; - } - else if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::rotational){ - nb_fac_str_rot += 1; - nb_faces_str_rot += nb; - } - else if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::transfinite){ + if (coface->getMeshLaw() == Topo::CoFaceMeshingProperty::transfinite){ nb_fac_str_trans += 1; nb_faces_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/QtComponents/protected/QtComponents/QtFaceMeshingPropertyAction.h b/src/QtComponents/protected/QtComponents/QtFaceMeshingPropertyAction.h index 9b1625e..8a5cad5 100644 --- a/src/QtComponents/protected/QtComponents/QtFaceMeshingPropertyAction.h +++ b/src/QtComponents/protected/QtComponents/QtFaceMeshingPropertyAction.h @@ -14,9 +14,6 @@ #include "QtComponents/QtMgx3DTopoOperationAction.h" #include "QtComponents/RenderingManager.h" #include "Topo/FaceMeshingPropertyTransfinite.h" -#include "Topo/FaceMeshingPropertyDirectional.h" -#include "Topo/FaceMeshingPropertyOrthogonal.h" -#include "Topo/FaceMeshingPropertyRotational.h" #include "Topo/FaceMeshingPropertyDelaunayGMSH.h" #include "Topo/FaceMeshingPropertyQuadPairing.h" @@ -72,278 +69,6 @@ class QtFaceTransfinitePanel : public QtMgx3DOperationsSubPanel }; // class QtFaceTransfinitePanel -/** - * Le paramétrage d'un maillage directionnel. - */ -class QtFaceDirectionalPanel : 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. - */ - QtFaceDirectionalPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel); - - /** - * Destructeur. RAS. - */ - virtual ~QtFaceDirectionalPanel ( ); - - /** - * Réinitialise le panneau. - */ - virtual void reset ( ); - - /** - * \param true pour prévisualiser l'opération, false - * pour arrêter la prévisualisation. - * \param inutilisé - */ - 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 la face conforme au panneau. - */ - virtual Mgx3D::Topo::FaceMeshingPropertyDirectional* - getMeshingProperty ( ) const; - - /** - * Faut-il inverser le vecteur donné par l'arête ? - */ - virtual bool isEdgeInverted ( ) 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. - */ - QtFaceDirectionalPanel (const QtFaceDirectionalPanel&); - QtFaceDirectionalPanel& operator = (const QtFaceDirectionalPanel&); - - /** La saisie du vecteur directeur. */ - QtMgx3DEdgePanel* _edgeTextField; - - /** Le vecteur directionnel est-il à inverser ? */ - QCheckBox* _invertCheckBox; - - /** Le vecteur donnant la direction. */ - QLabel* _directionLabel; -}; // class QtFaceDirectionalPanel - - -/** - * Le paramétrage d'un maillage Orthogonal. - */ -class QtFaceOrthogonalPanel : public QtFaceDirectionalPanel -{ - 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. - */ - QtFaceOrthogonalPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel); - - /** - * Destructeur. RAS. - */ - virtual ~QtFaceOrthogonalPanel ( ); - - /** - * Réinitialise le panneau. - */ - virtual void reset ( ); - - /** - * \return La propriété de maillage de la face conforme au panneau. - */ - virtual Mgx3D::Topo::FaceMeshingPropertyOrthogonal* - getMeshingProperty ( ) const; - - /** - * \return Le nombre de couches. - */ - virtual size_t getLayersNum ( ) const; - - - private : - - /** - * Constructeur de copie et opérateur = : interdits. - */ - QtFaceOrthogonalPanel (const QtFaceOrthogonalPanel&); - QtFaceOrthogonalPanel& operator = (const QtFaceOrthogonalPanel&); - - /** Le nombre de couches. */ - QtIntTextField* _layersNumTextField; -}; // class QtFaceOrthogonalPanel - - -/** - * 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 QtFaceRotationalPanel : 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. - */ - QtFaceRotationalPanel ( - QWidget* parent, Mgx3D::QtComponents::QtMgx3DMainWindow& mw, - QtMgx3DOperationPanel* mainPanel); - - /** - * Destructeur. RAS. - */ - virtual ~QtFaceRotationalPanel ( ); - - /** - * \param true pour prévisualiser l'opération, false - * pour arrêter la prévisualisation. - * \param inutilisé - */ - 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 la face conforme au panneau. - */ - virtual Mgx3D::Topo::FaceMeshingPropertyRotational* - getMeshingProperty ( ) const; - - /** - * Réinitialise le panneau. - */ - virtual void reset ( ); - - /** - * 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. - */ - QtFaceRotationalPanel (const QtFaceRotationalPanel&); - QtFaceRotationalPanel& operator = (const QtFaceRotationalPanel&); - - /** 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 QtFaceRotationalPanel - - /** * Le paramétrage d'un maillage Delaunay via GMSH. */ @@ -475,13 +200,10 @@ class QtFaceMeshingPropertyPanel : public QtMgx3DOperationPanel /** La méthode de maillage de la face. *
    *
  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 GMSH *
*/ - enum OPERATION_METHOD { TRANSFINITE, DIRECTIONAL, ORTHOGONAL, ROTATIONAL, DELAUNAY_GMSH }; + enum OPERATION_METHOD { TRANSFINITE, DELAUNAY_GMSH }; /** * Créé l'ihm. @@ -603,15 +325,6 @@ class QtFaceMeshingPropertyPanel : public QtMgx3DOperationPanel /** Maillage transfini. */ QtFaceTransfinitePanel* _transfinitePanel; - /** Maillage structuré directionnel. */ - QtFaceDirectionalPanel* _directionalPanel; - - /** Maillage structuré directionnel orthogonal. */ - QtFaceOrthogonalPanel* _orthogonalPanel; - - /** Maillage structuré rotationnel. */ - QtFaceRotationalPanel* _rotationalPanel; - /** Maillage non structuré Delaunay généré avec GMSH. */ QtFaceDelaunayGMSHPanel* _delaunayGMSHPanel; diff --git a/src/pyMagix3D/CMakeLists.txt b/src/pyMagix3D/CMakeLists.txt index 1e8ba05..f87eb66 100644 --- a/src/pyMagix3D/CMakeLists.txt +++ b/src/pyMagix3D/CMakeLists.txt @@ -161,21 +161,14 @@ if (Doxygen_FOUND) ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/EdgeMeshingPropertyTabulated.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/EdgeMeshingPropertyBeta.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/CoFaceMeshingProperty.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyDirectional.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyOrthogonal.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyRotational.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyTransfinite.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyDelaunayNetgen.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyDelaunayGMSH.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/FaceMeshingPropertyQuadPairing.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingProperty.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyDirectional.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyOrthogonal.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyRotational.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyTransfinite.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyDelaunayNetgen.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyDelaunayTetgen.h - ${CMAKE_SOURCE_DIR}/src/Core/protected/Topo/BlockMeshingPropertyInsertion.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Mesh/MeshManagerIfc.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Smoothing/SurfacicSmoothing.h ${CMAKE_SOURCE_DIR}/src/Core/protected/Smoothing/VolumicSmoothing.h diff --git a/src/pyMagix3D/pyMagix3D.doxygen b/src/pyMagix3D/pyMagix3D.doxygen index 3ef5a6e..d922c38 100644 --- a/src/pyMagix3D/pyMagix3D.doxygen +++ b/src/pyMagix3D/pyMagix3D.doxygen @@ -770,19 +770,12 @@ INPUT = ../../src/Doc/User \ ../../src/Core/protected/Topo/EdgeMeshingPropertyTabulated.h \ ../../src/Core/protected/Topo/EdgeMeshingPropertyBeta.h \ ../../src/Core/protected/Topo/CoFaceMeshingProperty.h \ - ../../src/Core/protected/Topo/FaceMeshingPropertyDirectional.h \ - ../../src/Core/protected/Topo/FaceMeshingPropertyOrthogonal.h \ - ../../src/Core/protected/Topo/FaceMeshingPropertyRotational.h \ ../../src/Core/protected/Topo/FaceMeshingPropertyTransfinite.h \ ../../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 1ed4690..10eb547 100644 --- a/src/pyMagix3D/pyMagix3D.i +++ b/src/pyMagix3D/pyMagix3D.i @@ -48,18 +48,11 @@ using std::ptrdiff_t; #include "Topo/EdgeMeshingPropertyGlobalInterpolate.h" #include "Topo/EdgeMeshingPropertyTabulated.h" #include "Topo/EdgeMeshingPropertyBeta.h" -#include "Topo/FaceMeshingPropertyDirectional.h" -#include "Topo/FaceMeshingPropertyOrthogonal.h" -#include "Topo/FaceMeshingPropertyRotational.h" #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" @@ -318,19 +311,12 @@ using std::ptrdiff_t; %include Topo/EdgeMeshingPropertyTabulated.h %include Topo/EdgeMeshingPropertyBeta.h %include Topo/CoFaceMeshingProperty.h -%include Topo/FaceMeshingPropertyDirectional.h -%include Topo/FaceMeshingPropertyOrthogonal.h -%include Topo/FaceMeshingPropertyRotational.h %include Topo/FaceMeshingPropertyTransfinite.h %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..5717076 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. @@ -625,108 +479,6 @@ bool Mgx3D::Topo::FaceMeshingPropertyDelaunayNetgen::isStructured() const Indique si la face est structurée. -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional " -Propriété de la discrétisation d'une face commune suivant une direction. -"; - -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::FaceMeshingPropertyDirectional " -Mgx3D::Topo::FaceMeshingPropertyDirectional::FaceMeshingPropertyDirectional(Utils::Math::Point v1, Utils::Math::Point v2) - -Constructeur avec direction suivant 2 sommets. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::FaceMeshingPropertyDirectional " -Mgx3D::Topo::FaceMeshingPropertyDirectional::FaceMeshingPropertyDirectional(meshDirLaw md) - -Constructeur dont on connait la direction. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::getDir " -uint Mgx3D::Topo::FaceMeshingPropertyDirectional::getDir() const - -Accesseur sur la direction associée à la CoFace. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::getMeshLaw " -CoFaceMeshingProperty::meshLaw Mgx3D::Topo::FaceMeshingPropertyDirectional::getMeshLaw() const - -Accesseur sur la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::getMeshLawName " -std::string Mgx3D::Topo::FaceMeshingPropertyDirectional::getMeshLawName() const - -Accesseur sur le nom de la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::isStructured " -bool Mgx3D::Topo::FaceMeshingPropertyDirectional::isStructured() const - -Indique si la face est structurée. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyDirectional::permDir " -void Mgx3D::Topo::FaceMeshingPropertyDirectional::permDir() - -inversion de la direction - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational " -Propriété de la discrétisation d'une face commune. -"; - -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::FaceMeshingPropertyRotational " -Mgx3D::Topo::FaceMeshingPropertyRotational::FaceMeshingPropertyRotational(Utils::Math::Point v1, Utils::Math::Point v2, Utils::Math::Point axis1, Utils::Math::Point axis2) - - -Constructeur avec rotation suivant 2 sommets, autour d'un axe défini par deux points - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::FaceMeshingPropertyRotational " -Mgx3D::Topo::FaceMeshingPropertyRotational::FaceMeshingPropertyRotational(meshDirLaw md, Utils::Math::Point axis1, Utils::Math::Point axis2) - - -Constructeur avec rotation déterminée, autour d'un axe défini par deux points - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::getAxis " -void Mgx3D::Topo::FaceMeshingPropertyRotational::getAxis(Utils::Math::Point &axis1, Utils::Math::Point &axis2) - - -Retourne l'axe de rotation - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::getDir " -uint Mgx3D::Topo::FaceMeshingPropertyRotational::getDir() const - -Accesseur sur la direction associée à la CoFace. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::getMeshLaw " -CoFaceMeshingProperty::meshLaw Mgx3D::Topo::FaceMeshingPropertyRotational::getMeshLaw() const - -Accesseur sur la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::getMeshLawName " -std::string Mgx3D::Topo::FaceMeshingPropertyRotational::getMeshLawName() const - -Accesseur sur le nom de la méthode de maillage. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::isStructured " -bool Mgx3D::Topo::FaceMeshingPropertyRotational::isStructured() const - -Indique si la face est structurée. - -"; -%feature("docstring") Mgx3D::Topo::FaceMeshingPropertyRotational::setAxis " -void Mgx3D::Topo::FaceMeshingPropertyRotational::setAxis(Utils::Math::Point &axis1, Utils::Math::Point &axis2) - - -Change l'axe de rotation - "; %feature("docstring") Mgx3D::Topo::FaceMeshingPropertyTransfinite " Propriété de la discrétisation d'une face commune.