mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: autoSnapDriverFeature: make bounding box 3D
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1202,10 +1202,23 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
|
|||||||
// Reverse lookup : go through all edgeAttractors and find the
|
// Reverse lookup : go through all edgeAttractors and find the
|
||||||
// nearest point on pp
|
// nearest point on pp
|
||||||
|
|
||||||
|
// Get search domain and extend it a bit
|
||||||
|
treeBoundBox bb(pp.localPoints());
|
||||||
|
{
|
||||||
|
// Random number generator. Bit dodgy since not exactly random ;-)
|
||||||
|
Random rndGen(65431);
|
||||||
|
|
||||||
|
// Slightly extended bb. Slightly off-centred just so on symmetric
|
||||||
|
// geometry there are less face/edge aligned items.
|
||||||
|
bb = bb.extend(rndGen, 1e-4);
|
||||||
|
bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
||||||
|
bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
||||||
|
}
|
||||||
|
|
||||||
indexedOctree<treeDataPoint> ppTree
|
indexedOctree<treeDataPoint> ppTree
|
||||||
(
|
(
|
||||||
treeDataPoint(pp.localPoints()),
|
treeDataPoint(pp.localPoints()),
|
||||||
treeBoundBox(pp.localPoints()), // overall search domain
|
bb, // overall search domain
|
||||||
8, // maxLevel
|
8, // maxLevel
|
||||||
10, // leafsize
|
10, // leafsize
|
||||||
3.0 // duplicity
|
3.0 // duplicity
|
||||||
|
|||||||
Reference in New Issue
Block a user