39namespace extrudeModels
54 project_(coeffDict_.getOrDefault(
"project", false))
62 offsetSurfPtr_.reset(
new triSurface(offsetName));
76 <<
"offsetSurface:\n " << offsetName
77 <<
" has different topology than the baseSurface:\n "
100 const point& surfacePoint,
101 const vector& surfaceNormal,
114 baseSearchPtr_().findNearest(
samples, nearestDistSqr, info);
116 label triI = info[0].index();
126 const point offsetPoint
128 bary[0]*offsetTri.
a()
129 + bary[1]*offsetTri.
b()
130 + bary[2]*offsetTri.
c()
133 point interpolatedPoint
135 surfacePoint + sumThickness(layer)*(offsetPoint-surfacePoint)
145 offsetSearchPtr_().findNearest
151 return info[0].hitPoint();
155 return interpolatedPoint;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label nEdges() const
Number of edges in patch.
label nPoints() const
Number of points supporting patch faces.
const Field< point_type > & points() const noexcept
Return reference to global points.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Top level extrusion model class.
const dictionary & coeffDict_
Extrudes by interpolating points from one surface to the other. Surfaces have to be topologically ide...
virtual ~offsetSurface()
Destructor.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A class for handling file names.
string & expand(const bool allowEmpty=false)
Helper class to search on triSurface.
Triangulated surface description with patch information.
A triangle primitive used to calculate face normals and swept volumes.
barycentric2D pointToBarycentric(const point &pt) const
Calculate the barycentric coordinates from the given point.
const Point & a() const
Return first vertex.
const Point & c() const
Return third vertex.
const Point & b() const
Return second vertex.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
scalarField samples(nIntervals, Zero)