mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Remove feature edges from curvature field.
This commit is contained in:
@ -59,9 +59,9 @@ void Foam::buildCGALPolyhedron::operator()
|
||||
|
||||
B.begin_surface
|
||||
(
|
||||
surf_.points().size(), // n points
|
||||
surf_.size(), // n facets
|
||||
2*surf_.edges().size() // n halfedges
|
||||
surf_.points().size(), // n points
|
||||
surf_.size(), // n facets
|
||||
2*surf_.edges().size() // n halfedges
|
||||
);
|
||||
|
||||
forAll(surf_.points(), pI)
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
EXE_FROUNDING_MATH = -frounding-math
|
||||
EXE_NDEBUG = -DNDEBUG
|
||||
USE_F2C = -DCGAL_USE_F2C
|
||||
|
||||
include $(GENERAL_RULES)/CGAL
|
||||
|
||||
EXE_INC = \
|
||||
${EXE_FROUNDING_MATH} \
|
||||
${EXE_NDEBUG} \
|
||||
${USE_F2C} \
|
||||
${CGAL_INC} \
|
||||
-ICGALPolyhedron \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
|
||||
@ -528,7 +528,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
args.optionReadIfPresent("closeness", span);
|
||||
|
||||
Info<< "span " << span << endl;
|
||||
// Info<< "span " << span << endl;
|
||||
|
||||
pointField start = searchSurf.faceCentres() - span*normals;
|
||||
pointField end = searchSurf.faceCentres() + span*normals;
|
||||
@ -766,6 +766,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalarField k = curvature(surf);
|
||||
|
||||
// Modify the curvature values on feature edges and points to be zero.
|
||||
|
||||
forAll(newSet.featureEdges(), fEI)
|
||||
{
|
||||
const edge& e = surf.edges()[newSet.featureEdges()[fEI]];
|
||||
|
||||
k[surf.meshPoints()[e.start()]] = 0.0;
|
||||
k[surf.meshPoints()[e.end()]] = 0.0;
|
||||
}
|
||||
|
||||
triSurfacePointScalarField kField
|
||||
(
|
||||
IOobject
|
||||
@ -784,7 +794,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
kField.write();
|
||||
|
||||
if (args.optionFound("writeObj"))
|
||||
if (args.optionFound("writeVTK"))
|
||||
{
|
||||
vtkSurfaceWriter<scalar>().write
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user