48 rotatedBoxToCell::typeName,
49 "\n Usage: rotatedBoxToCell (originx originy originz)"
50 " (ix iy iz) (jx jy jz) (kx ky kz)\n\n"
51 " Select all cells with cellCentre within parallelopiped\n\n"
57 void Foam::rotatedBoxToCell::combine(topoSet&
set,
const bool add)
const
61 boxPoints[0] = origin_;
62 boxPoints[1] = origin_ + i_;
63 boxPoints[2] = origin_ + i_ + j_;
64 boxPoints[3] = origin_ + j_;
65 boxPoints[4] = origin_ + k_;
66 boxPoints[5] = origin_ + k_ + i_;
67 boxPoints[6] = origin_ + k_ + i_ + j_;
68 boxPoints[7] = origin_ + k_ + j_;
79 faceList boxFaces(cellShape(hex, boxVerts).faces());
85 boxFaceNormals[i] = boxFaces[i].normal(boxPoints);
87 Pout<<
"Face:" << i <<
" position:" << boxFaces[i].centre(boxPoints)
88 <<
" normal:" << boxFaceNormals[i] <<
endl;
101 const face&
f = boxFaces[i];
103 if (((ctrs[cellI] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0)
146 origin_(dict.
lookup(
"origin")),
180 Info<<
" Adding cells with center within rotated box " <<
endl;
186 Info<<
" Removing cells with center within rotated box " <<
endl;