libsurf
Programmer's Documentation

planarmesh.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_PLANARMESH_H
16 #define SURF_PLANARMESH_H
17 
18 #include <genua/trimesh.h>
19 #include "planesurface.h"
20 
31 {
32 public:
33 
35  void init(const PointList<3> & pts);
36 
38  uint punch(const PointList<3> & h);
39 
41  uint enforce(const PointList<3> & h);
42 
44  void delaunay(Real maxaspect = 4.0, int npass=1);
45 
47  const TriMesh & mesh() const {return msh;}
48 
50  void meshTag(int t) {msh.faceTag(t);}
51 
52 private:
53 
55  PointList<2> cbound, holemarker;
56 
58  std::vector<PointList<2> > choles, cforce;
59 
61  PlaneSurfacePtr psf;
62 
65 };
66 
67 #endif
TriMesh msh
triangular mesh
Definition: planarmesh.h:64
void faceTag(int t)
void meshTag(int t)
change mesh tag
Definition: planarmesh.h:50
uint punch(const PointList< 3 > &h)
add hole contour
Definition: planarmesh.cpp:32
const TriMesh & mesh() const
access resulting triangular mesh
Definition: planarmesh.h:47
Planar triangular mesh with cutouts.
Definition: planarmesh.h:30
uint enforce(const PointList< 3 > &h)
enforce points to be present in mesh
Definition: planarmesh.cpp:51
void init(const PointList< 3 > &pts)
construct from plane point set
Definition: planarmesh.cpp:21
std::vector< PointList< 2 > > choles
hole contours
Definition: planarmesh.h:58
void delaunay(Real maxaspect=4.0, int npass=1)
generate a triangular mesh
Definition: planarmesh.cpp:65
PointList< 2 > cbound
set of bounding points and hole marker points
Definition: planarmesh.h:55
PlaneSurfacePtr psf
plane surface on which cbound is defined
Definition: planarmesh.h:61
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5