Skip to content

Commit

Permalink
smooth and perturbation premesh fix: forced re-generation of the edge…
Browse files Browse the repository at this point in the history
…s premesh
  • Loading branch information
nicolaslg authored and lelandaisb committed Dec 6, 2024
1 parent 2cf04ac commit 5643780
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Core/Mesh/CommandNewBlocksMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,23 @@ internalExecute()
TkUtil::Timer timer(false);
#endif


// delete the premesh of the edges to accommodate for possible smooth/pert modifications
// applied to adjacent surfaces
{
std::set<Topo::CoEdge *> set_coedges;
for (auto b: m_blocks) {
std::vector<Topo::CoEdge *> coedges;
b->getCoEdges(coedges);

for (auto ce: coedges) {
set_coedges.insert(ce);
}
}
for (auto ce: set_coedges) {
ce->clearPoints();
ce->getMeshingData()->setPreMeshed(false);
}
}

// maille et modifie le maillage pour les modifications 2D, s'il y en a
// cette étape est à effectuer avant le maillage de toutes les arêtes car le lissage
Expand Down
18 changes: 18 additions & 0 deletions src/Core/Mesh/CommandNewFacesMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,24 @@ internalExecute()
iter != m_faces.end(); ++iter)
(*iter)->check();

// delete the premesh of the edges to accommodate for possible smooth/pert modifications
// applied to adjacent surfaces
{
std::set<Topo::CoEdge *> set_coedges;
for (auto cf: list_cofaces) {
std::vector<Topo::CoEdge *> coedges;
cf->getCoEdges(coedges);

for (auto ce: coedges) {
set_coedges.insert(ce);
}
}
for (auto ce: set_coedges) {
ce->clearPoints();
ce->getMeshingData()->setPreMeshed(false);
}
}

// maille et modifie le maillage pour les modifications 2D, s'il y en a
setStepProgression (1.);
setStep (++step, "Lissage et perturbation des surfaces", 0.);
Expand Down

0 comments on commit 5643780

Please sign in to comment.