extendedEdgeMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2015-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::extendedEdgeMesh
29 
30 Description
31 
32  Description of feature edges and points.
33 
34  Feature points are a sorted subset at the start of the overall points list:
35  0 .. concaveStart_-1 : convex points (w.r.t normals)
36  concaveStart_ .. mixedStart_-1 : concave points
37  mixedStart_ .. nonFeatureStart_-1 : mixed internal/external points
38  nonFeatureStart_ .. size-1 : non-feature points
39 
40  Feature edges are the edgeList of the edgeMesh and are sorted:
41  0 .. internalStart_-1 : external edges (convex w.r.t normals)
42  internalStart_ .. flatStart_-1 : internal edges (concave)
43  flatStart_ .. openStart_-1 : flat edges (neither concave or convex)
44  can arise from region interfaces on
45  flat surfaces
46  openStart_ .. multipleStart_-1 : open edges (e.g. from baffle surfaces)
47  multipleStart_ .. size-1 : multiply connected edges
48 
49  The edge direction and feature edge and feature point adjacent normals
50  are stored.
51 
52 SourceFiles
53  extendedEdgeMeshI.H
54  extendedEdgeMesh.C
55  extendedEdgeMeshNew.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef Foam_extendedEdgeMesh_H
60 #define Foam_extendedEdgeMesh_H
61 
62 #include "edgeMesh.H"
63 #include "indexedOctree.H"
64 #include "treeDataEdge.H"
65 #include "treeDataPoint.H"
66 #include "primitivePatch.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 // Forward Declarations
74 class surfaceFeatures;
75 class searchableSurface;
76 class extendedEdgeMesh;
77 
78 Istream& operator>>(Istream&, extendedEdgeMesh&);
79 Ostream& operator<<(Ostream&, const extendedEdgeMesh&);
80 
81 
82 /*---------------------------------------------------------------------------*\
83  Class extendedEdgeMesh Declaration
84 \*---------------------------------------------------------------------------*/
85 
86 class extendedEdgeMesh
87 :
88  public edgeMesh
89 {
90 public:
91 
92  //- Runtime type information
93  TypeName("extendedEdgeMesh");
94 
96  {
98  CONCAVE,
99  MIXED,
101  };
106  {
110  OPEN,
111  MULTIPLE,
113  };
114 
115  static const Enum<edgeStatus> edgeStatusNames_;
116 
117  //- Normals point to the outside
118  enum sideVolumeType
119  {
120  INSIDE = 0,
121  OUTSIDE = 1,
122  BOTH = 2,
123  NEITHER = 3
124  };
127 
128  //- Angular closeness tolerance for treating normals as the same
129  static scalar cosNormalAngleTol_;
131 
132 protected:
133 
134  // Static Data
135 
136  //- Index of the start of the convex feature points - static as 0
137  static label convexStart_;
138 
139  //- Index of the start of the external feature edges - static as 0
140  static label externalStart_;
141 
142 
143  // Protected Data
144 
145  //- Index of the start of the concave feature points
146  label concaveStart_;
147 
148  //- Index of the start of the mixed type feature points
149  label mixedStart_;
150 
151  //- Index of the start of the non-feature points
152  label nonFeatureStart_;
154  //- Index of the start of the internal feature edges
155  label internalStart_;
156 
157  //- Index of the start of the flat feature edges
158  label flatStart_;
159 
160  //- Index of the start of the open feature edges
161  label openStart_;
162 
163  //- Index of the start of the multiply-connected feature edges
164  label multipleStart_;
165 
166  //- Normals of the features, to be referred to by index by both feature
167  // points and edges, unsorted
169 
170  //- Type per normal: which side of normal to mesh
172 
173  //- Flat and open edges require the direction of the edge
175 
176  //- Starting directions for the edges.
177  // This vector points to the half of the plane defined by the first
178  // edge normal.
180 
181  //- Indices of the normals that are adjacent to the feature edges
184  //- Indices of the normals that are adjacent to the feature points
185  // (only valid for 0..nonFeatureStart_-1)
187 
188  //- Indices of feature edges attached to feature points. The edges are
189  // ordered so that they can be circulated.
191 
192  //- Feature edges which are on the boundary between regions
194 
195  //- Search tree for all feature points
196  mutable std::unique_ptr<indexedOctree<treeDataPoint>> pointTree_;
197 
198  //- Search tree for all edges
199  mutable std::unique_ptr<indexedOctree<treeDataEdge>> edgeTree_;
201  //- Individual search trees for each type of edge
203 
204 
205  // Protected Constructors
206 
207  //- Construct null, initializing start indices with -1
208  explicit extendedEdgeMesh(std::nullptr_t);
209 
210 
211  // Protected Member Functions
212 
213  //- Classify the type of feature point. Requires valid stored member
214  // data for edges and normals.
215  pointStatus classifyFeaturePoint(label ptI) const;
216 
217  //- Cut edges with surface. Return map from cut points&edges back
218  // to original
219  void cut
220  (
221  const searchableSurface&,
222  labelList& pMap,
223  labelList& eMap,
224  labelList& pointsFromEdge, // new points created by cutting
225  labelList& oldEdge, // the original edge
226  labelList& surfTri // the surface triangle index
227  );
228 
229  //- Remove outside/inside edges. volType denotes which side to keep
230  void select
231  (
232  const searchableSurface& surf,
233  const volumeType volType,
234  labelList& pMap,
235  labelList& eMap
236  );
238  template<class Patch>
239  void sortPointsAndEdges
240  (
241  const Patch&,
242  const labelUList& featureEdges,
243  const labelUList& regionFeatureEdges,
244  const labelUList& feaurePoints
245  );
246 
247 public:
248 
249  // Static Data
250 
251  //- Number of possible point types (i.e. number of slices)
252  static constexpr label nPointTypes = 4;
253 
254  //- Number of possible feature edge types (i.e. number of slices)
255  static constexpr label nEdgeTypes = 5;
256 
257 
258  // Static Member Functions
259 
260  //- Summary of supported read file types.
261  static wordHashSet readTypes();
262 
263  //- Summary of supported write file types.
264  static wordHashSet writeTypes();
265 
266  //- Can we read this file format?
267  static bool canReadType(const word& fileType, bool verbose=false);
268 
269  //- Can we write this file format type?
270  static bool canWriteType(const word& fileType, bool verbose=false);
271 
272  //- Can we read this file format?
273  static bool canRead(const fileName& name, bool verbose=false);
274 
275 
276  // Constructors
277 
278  //- Default construct
280 
281  //- Copy construct
282  explicit extendedEdgeMesh(const extendedEdgeMesh& fem);
283 
284  //- Construct from file name (uses extension to determine type)
285  explicit extendedEdgeMesh(const fileName& name);
286 
287  //- Construct from file name with given format type
288  extendedEdgeMesh(const fileName& name, const word& fileType);
289 
290  //- Construct from Istream
291  explicit extendedEdgeMesh(Istream& is);
292 
293  //- Copy construct from components
295 
296  //- Move construct from components
298 
299  //- Construct given a surface with selected edges,points
300  // (surfaceFeatures)
301  // Extracts, classifies and reorders the data from surfaceFeatures.
303  (
304  const surfaceFeatures& sFeat,
305  const boolList& surfBaffleRegions
306  );
307 
308  //- Construct from PrimitivePatch
310  (
312  const labelUList& featureEdges,
313  const labelUList& regionFeatureEdges,
314  const labelUList& featurePoints
315  );
316 
317  //- Construct from all components
319  (
320  const pointField& pts,
321  const edgeList& eds,
322  label concaveStart,
323  label mixedStart,
324  label nonFeatureStart,
325  label internalStart,
326  label flatStart,
327  label openStart,
328  label multipleStart,
329  const vectorField& normals,
333  const labelListList& edgeNormals,
336  const labelList& regionEdges
337  );
338 
339 
340  // Declare run-time constructor selection table
341 
343  (
344  autoPtr,
347  (
348  const fileName& name
349  ),
350  (name)
351  );
352 
353 
354  // Selectors
355 
356  //- Select constructed from filename with given file format
358  (
359  const fileName& name,
360  const word& fileType
361  );
362 
363  //- Select constructed from filename (implicit extension)
365 
366 
367  //- Destructor
368  ~extendedEdgeMesh() = default;
369 
370 
371  // Member Functions
372 
373  // Find
374 
375  //- Find nearest surface edge for the sample point.
377  (
378  const point& sample,
379  scalar searchDistSqr,
380  pointIndexHit& info
381  ) const;
382 
383  //- Find nearest surface edge for the sample point.
384  void nearestFeatureEdge
385  (
386  const point& sample,
387  scalar searchDistSqr,
388  pointIndexHit& info
389  ) const;
390 
391  //- Find nearest surface edge for each sample point.
392  void nearestFeatureEdge
393  (
394  const pointField& samples,
395  const scalarField& searchDistSqr,
396  List<pointIndexHit>& info
397  ) const;
398 
399  //- Find the nearest point on each type of feature edge
401  (
402  const point& sample,
403  const scalarField& searchDistSqr,
404  List<pointIndexHit>& info
405  ) const;
406 
407  //- Find all the feature points within searchDistSqr of sample
409  (
410  const point& sample,
411  scalar searchRadiusSqr,
412  List<pointIndexHit>& info
413  ) const;
414 
415  //- Find all the feature edges within searchDistSqr of sample
417  (
418  const point& sample,
419  const scalar searchRadiusSqr,
420  List<pointIndexHit>& info
421  ) const;
422 
423 
424  // Access
425 
426  //- Return the index of the start of the convex feature points
427  inline label convexStart() const;
428 
429  //- Return the index of the start of the concave feature points
430  inline label concaveStart() const;
431 
432  //- Return the index of the start of the mixed type feature points
433  inline label mixedStart() const;
434 
435  //- Return the index of the start of the non-feature points
436  inline label nonFeatureStart() const;
437 
438  //- Return the index of the start of the external feature edges
439  inline label externalStart() const;
440 
441  //- Return the index of the start of the internal feature edges
442  inline label internalStart() const;
443 
444  //- Return the index of the start of the flat feature edges
445  inline label flatStart() const;
446 
447  //- Return the index of the start of the open feature edges
448  inline label openStart() const;
449 
450  //- Return the index of the start of the multiply-connected feature
451  // edges
452  inline label multipleStart() const;
453 
454  //- Return whether or not the point index is a feature point
455  inline bool featurePoint(label ptI) const;
456 
457  //- Return the normals of the surfaces adjacent to the feature edges
458  // and points
459  inline const vectorField& normals() const;
460 
461  //- Return
462  inline const List<sideVolumeType>& normalVolumeTypes() const;
463 
464  //- Return the edgeDirection vectors
465  inline const vectorField& edgeDirections() const;
466 
467  //-
468  inline const labelListList& normalDirections() const;
469 
470  //- Return the direction of edgeI, pointing away from ptI
471  inline vector edgeDirection(label edgeI, label ptI) const;
472 
473  //- Return the indices of the normals that are adjacent to the
474  // feature edges
475  inline const labelListList& edgeNormals() const;
476 
477  //- Return the normal vectors for a given set of normal indices
478  inline vectorField edgeNormals(const labelList& edgeNormIs) const;
479 
480  //- Return the normal vectors for a given edge
481  inline vectorField edgeNormals(label edgeI) const;
482 
483  //- Return the indices of the normals that are adjacent to the
484  // feature points
485  inline const labelListList& featurePointNormals() const;
486 
487  //- Return the normal vectors for a given feature point
488  inline vectorField featurePointNormals(label ptI) const;
489 
490  //- Return the edge labels for a given feature point. Edges are
491  // ordered by the faces that they share. The edge labels
492  // correspond to the entry in edges().
493  inline const labelListList& featurePointEdges() const;
494 
495  //- Return the feature edges which are on the boundary between
496  // regions
497  inline const labelList& regionEdges() const;
498 
499  //- Return the pointStatus of a specified point
500  inline pointStatus getPointStatus(label ptI) const;
501 
502  //- Return the edgeStatus of a specified edge
503  inline edgeStatus getEdgeStatus(label edgeI) const;
504 
505  //- Return the baffle faces of a specified edge
506  inline PackedList<2> edgeBaffles(label edgeI) const;
507 
508  //- Demand driven construction of octree for feature points
510 
511  //- Demand driven construction of octree for boundary edges
512  const indexedOctree<treeDataEdge>& edgeTree() const;
513 
514  //- Demand driven construction of octree for boundary edges by type
516  edgeTreesByType() const;
517 
518 
519  // Edit
520 
521  //- Transfer the contents of the argument and annul the argument
523 
524  //- Clear all storage
525  virtual void clear();
526 
527  //- Add extendedEdgeMesh. No filtering of duplicates.
528  void add(const extendedEdgeMesh& fem);
529 
530  //- Flip normals. All concave become convex, all internal external
531  // etc.
532  void flipNormals();
533 
534  //- Update with derived geometry
535  void autoMap
536  (
537  const pointField& subPoints,
538  const edgeList& subEdges,
539  const labelList& pointMap,
540  const labelList& edgeMap
541  );
542 
543  //- Trim to surface. Keep volType side. Return map from current back
544  // to original points (-1 for newly introduced points), edges
545  void trim
546  (
547  const searchableSurface& surf,
548  const volumeType volType,
549  labelList& pointMap,
550  labelList& edgeMap
551  );
552 
553  //- Order according to point and edge status
554  void setFromStatus
555  (
556  const List<extendedEdgeMesh::pointStatus>& pointStat,
557  const List<extendedEdgeMesh::edgeStatus>& edgeStat,
558  labelList& sortedToOriginalPoint,
559  labelList& sortedToOriginalEdge
560  );
561 
562  //- Geometric merge points. Returns true if any points merged.
563  // Return maps from new back to original points/edges.
564  bool mergePointsAndSort
565  (
566  const scalar mergeDist,
567  labelList& pointMap,
568  labelList& edgeMap
569  );
570 
571 
572  // Read
573 
574  //- Read from file. Chooses reader based on explicit extension
575  bool read(const fileName& name, const word& ext);
576 
577  //- Read from file. Chooses reader based on detected extension
578  virtual bool read(const fileName& name);
579 
580 
581  // Write
582 
583  //- Write all components of the extendedEdgeMesh as obj files
584  void writeObj(const fileName& prefix) const;
585 
586  //- Dump some information
587  virtual void writeStats(Ostream& os) const;
588 
589  friend Istream& operator>>(Istream& is, sideVolumeType& vt);
590  friend Ostream& operator<<(Ostream& os, const sideVolumeType& vt);
591 
592 
593  //- Classify the type of feature edge. Requires face centre 0 to face
594  // centre 1 vector to distinguish internal from external
595  static edgeStatus classifyEdge
596  (
597  const List<vector>& norms,
598  const labelList& edNorms,
599  const vector& fC0tofC1
600  );
601 
602  //- Determine the ordering
603  static void sortedOrder
604  (
605  const List<extendedEdgeMesh::pointStatus>& pointStat,
606  const List<extendedEdgeMesh::edgeStatus>& edgeStat,
607  labelList& sortedToOriginalPoint,
608  labelList& sortedToOriginalEdge,
609 
610  label& pointConcaveStart,
611  label& pointMixedStart,
612  label& pointNonFeatStart,
613 
614  label& edgeInternalStart,
615  label& edgeFlatStart,
616  label& edgeOpenStart,
617  label& edgeMultipleStart
618  );
619 
620 
621  // Ostream Operator
622 
623  friend Ostream& operator<<(Ostream&, const extendedEdgeMesh&);
625 };
626 
627 
630 
631 
632 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
633 
634 } // End namespace Foam
635 
636 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
637 
638 #include "extendedEdgeMeshI.H"
639 
640 #ifdef NoRepository
641  #include "extendedEdgeMeshTemplates.C"
642 #endif
643 
644 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
645 
646 #endif
647 
648 // ************************************************************************* //
extendedEdgeMesh()
Default construct.
label nonFeatureStart() const
Return the index of the start of the non-feature points.
pointStatus getPointStatus(label ptI) const
Return the pointStatus of a specified point.
label convexStart() const
Return the index of the start of the convex feature points.
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
static const Enum< sideVolumeType > sideVolumeTypeNames_
A class for handling file names.
Definition: fileName.H:72
static autoPtr< extendedEdgeMesh > New(const fileName &name, const word &fileType)
Select constructed from filename with given file format.
static wordHashSet readTypes()
Summary of supported read file types.
vectorField normals_
Normals of the features, to be referred to by index by both feature.
declareRunTimeSelectionTable(autoPtr, extendedEdgeMesh, fileExtension,(const fileName &name),(name))
const pointField & points() const noexcept
Return points.
Definition: edgeMeshI.H:92
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
const labelListList & normalDirections() const
void nearestFeaturePoint(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
TypeName("extendedEdgeMesh")
Runtime type information.
void transfer(extendedEdgeMesh &mesh)
Transfer the contents of the argument and annul the argument.
PtrList< indexedOctree< treeDataEdge > > edgeTreesByType_
Individual search trees for each type of edge.
label mixedStart_
Index of the start of the mixed type feature points.
const List< sideVolumeType > & normalVolumeTypes() const
Return.
void select(const searchableSurface &surf, const volumeType volType, labelList &pMap, labelList &eMap)
Remove outside/inside edges. volType denotes which side to keep.
virtual void writeStats(Ostream &os) const
Dump some information.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Description of feature edges and points.
label multipleStart() const
Return the index of the start of the multiply-connected feature.
void trim(const searchableSurface &surf, const volumeType volType, labelList &pointMap, labelList &edgeMap)
Trim to surface. Keep volType side. Return map from current back.
label openStart_
Index of the start of the open feature edges.
scalarField samples(nIntervals, Zero)
static bool canWriteType(const word &fileType, bool verbose=false)
Can we write this file format type?
void cut(const searchableSurface &, labelList &pMap, labelList &eMap, labelList &pointsFromEdge, labelList &oldEdge, labelList &surfTri)
Cut edges with surface. Return map from cut points&edges back.
virtual void clear()
Clear all storage.
bool featurePoint(label ptI) const
Return whether or not the point index is a feature point.
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
label concaveStart_
Index of the start of the concave feature points.
label openStart() const
Return the index of the start of the open feature edges.
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
Definition: pointIndexHit.H:44
List< sideVolumeType > normalVolumeTypes_
Type per normal: which side of normal to mesh.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
static bool canReadType(const word &fileType, bool verbose=false)
Can we read this file format?
~extendedEdgeMesh()=default
Destructor.
void writeObj(const fileName &prefix) const
Write all components of the extendedEdgeMesh as obj files.
An enumeration wrapper for classification of a location as being inside/outside of a volume...
Definition: volumeType.H:55
A point surrounded by both convex and concave edges.
bool mergePointsAndSort(const scalar mergeDist, labelList &pointMap, labelList &edgeMap)
Geometric merge points. Returns true if any points merged.
std::unique_ptr< indexedOctree< treeDataEdge > > edgeTree_
Search tree for all edges.
static constexpr label nPointTypes
Number of possible point types (i.e. number of slices)
void add(const extendedEdgeMesh &fem)
Add extendedEdgeMesh. No filtering of duplicates.
void setFromStatus(const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge)
Order according to point and edge status.
friend Ostream & operator<<(Ostream &os, const sideVolumeType &vt)
edgeStatus getEdgeStatus(label edgeI) const
Return the edgeStatus of a specified edge.
label internalStart_
Index of the start of the internal feature edges.
labelListList normalDirections_
Starting directions for the edges.
A list of faces which address into the list of points.
static void sortedOrder(const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge, label &pointConcaveStart, label &pointMixedStart, label &pointNonFeatStart, label &edgeInternalStart, label &edgeFlatStart, label &edgeOpenStart, label &edgeMultipleStart)
Determine the ordering.
void flipNormals()
Flip normals. All concave become convex, all internal external.
dynamicFvMesh & mesh
label flatStart() const
Return the index of the start of the flat feature edges.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
labelList regionEdges_
Feature edges which are on the boundary between regions.
static label convexStart_
Index of the start of the convex feature points - static as 0.
label internalStart() const
Return the index of the start of the internal feature edges.
A class for handling words, derived from Foam::string.
Definition: word.H:63
label flatStart_
Index of the start of the flat feature edges.
Istream & operator>>(Istream &, directionInfo &)
sideVolumeType
Normals point to the outside.
static label externalStart_
Index of the start of the external feature edges - static as 0.
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
static const Enum< edgeStatus > edgeStatusNames_
const indexedOctree< treeDataEdge > & edgeTree() const
Demand driven construction of octree for boundary edges.
void autoMap(const pointField &subPoints, const edgeList &subEdges, const labelList &pointMap, const labelList &edgeMap)
Update with derived geometry.
void sortPointsAndEdges(const Patch &, const labelUList &featureEdges, const labelUList &regionFeatureEdges, const labelUList &feaurePoints)
static scalar cosNormalAngleTol_
Angular closeness tolerance for treating normals as the same.
label mixedStart() const
Return the index of the start of the mixed type feature points.
Fully convex point (w.r.t normals)
label externalStart() const
Return the index of the start of the external feature edges.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
not sure when this may be used
PackedList< 2 > edgeBaffles(label edgeI) const
Return the baffle faces of a specified edge.
OBJstream os(runTime.globalPath()/outputName)
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
Mesh data needed to do the Finite Area discretisation.
Definition: edgeFaMesh.H:47
Only connected to a single face.
const PtrList< indexedOctree< treeDataEdge > > & edgeTreesByType() const
Demand driven construction of octree for boundary edges by type.
static edgeStatus classifyEdge(const List< vector > &norms, const labelList &edNorms, const vector &fC0tofC1)
Classify the type of feature edge. Requires face centre 0 to face.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
label multipleStart_
Index of the start of the multiply-connected feature edges.
Non-pointer based hierarchical recursive searching.
const Foam::Enum< fileTag > fileExtension
File extension (without ".") for some vtk XML file content types.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
const edgeList & edges() const noexcept
Return edges.
Definition: edgeMeshI.H:98
static const Enum< pointStatus > pointStatusNames_
bool read(const fileName &name, const word &ext)
Read from file. Chooses reader based on explicit extension.
friend Istream & operator>>(Istream &is, sideVolumeType &vt)
labelListList featurePointEdges_
Indices of feature edges attached to feature points. The edges are.
void allNearestFeatureEdges(const point &sample, const scalar searchRadiusSqr, List< pointIndexHit > &info) const
Find all the feature edges within searchDistSqr of sample.
const indexedOctree< treeDataPoint > & pointTree() const
Demand driven construction of octree for feature points.
static wordHashSet writeTypes()
Summary of supported write file types.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Neither concave or convex, on a flat surface.
labelListList featurePointNormals_
Indices of the normals that are adjacent to the feature points.
labelListList edgeNormals_
Indices of the normals that are adjacent to the feature edges.
label nonFeatureStart_
Index of the start of the non-feature points.
void nearestFeatureEdge(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
Multiply connected (connected to more than two faces)
void nearestFeatureEdgeByType(const point &sample, const scalarField &searchDistSqr, List< pointIndexHit > &info) const
Find the nearest point on each type of feature edge.
vector edgeDirection(label edgeI, label ptI) const
Return the direction of edgeI, pointing away from ptI.
static constexpr label nEdgeTypes
Number of possible feature edge types (i.e. number of slices)
vectorField edgeDirections_
Flat and open edges require the direction of the edge.
std::unique_ptr< indexedOctree< treeDataPoint > > pointTree_
Search tree for all feature points.
Unclassified (consistency with surfaceFeatures)
Holds feature edges/points of surface.
Namespace for OpenFOAM.
label concaveStart() const
Return the index of the start of the concave feature points.
void allNearestFeaturePoints(const point &sample, scalar searchRadiusSqr, List< pointIndexHit > &info) const
Find all the feature points within searchDistSqr of sample.
const pointField & pts
pointStatus classifyFeaturePoint(label ptI) const
Classify the type of feature point. Requires valid stored member.