35 typedef gsMeshElement<T> MeshElement;
36 typedef typename MeshElement::scalar_t scalar_t;
38 typedef typename MeshElement::gsFaceHandle FaceHandle;
39 typedef typename MeshElement::gsEdgeHandle EdgeHandle;
40 typedef gsEdge<T> Edge;
46 vertex(sourceMesh->m_vertex),
47 face(sourceMesh->m_face),
48 edge(sourceMesh->m_edge)
120 void getPatchData(T angle, T innerAngle, T patchAreaWeight, T mergeSmallPatches,
121 std::vector<std::vector<VertexHandle> > & iPoints,
122 std::vector<std::vector<VertexHandle> > & oPoints,
123 std::vector< std::vector<std::vector<VertexHandle> > > & innerBdrys,
124 std::vector< std::vector<Vertex> > & innerBdrysMassP,
125 std::vector<std::vector<bool> > & oPointsConvexFlag,
126 std::string filenameFeatures,
136 void getFeatures(T angleGrad,
bool& bWarnNonManifold,
bool& bWarnBorders);
146 void setSharpEdges(std::vector< gsEdge<T> > & featEdges,
int useFeatures);
173 void getFaces(std::vector<std::vector<VertexHandle> > & iPoints, std::vector<std::vector<VertexHandle> > & oPoints,
174 std::vector< std::vector<std::vector<VertexHandle> > > & innerBdrys, std::vector< std::vector<Vertex> > & innerBdrysMassP,
175 std::vector<std::vector<bool> > & oPointsConvexFlag);
210 std::vector<std::vector<VertexHandle> > & oPoints,
211 std::vector< std::vector<std::vector<VertexHandle> > > & innerBdrys,
212 std::vector< std::vector<Vertex> > & innerBdrysMassP,
213 std::vector<std::vector<bool> > & oPointsConvexFlag, std::vector<
gsMesh<T> *> ¶Meshes,
214 std::vector<
gsMesh<T> *> &fitMeshes, std::vector<
gsMesh<T> *> &patchMeshes,
int kvOuterPoints,
215 int kvAdditionalInnerPoints,
216 bool plot,
int meshPoints,
bool moreInner=
true,
217 T wE=5, T wI=1,
int closeBoundary=0,
bool noSmooth=
false);
233 std::vector<FaceHandle> & face,
int bigFaceIdx);
248 std::set<VertexHandle>
249 const & vertexFaceSet);
258 static bool approxEqual(
const gsEdge<T> & e1,
const gsEdge<T> & e2);
267 static T
calcAngle(EdgeHandle e1,EdgeHandle e2,
int faceNum);
299 static std::vector<bool>
isCorner(std::vector<VertexHandle >
const & vertexVec3d);
331 void readEdges( std::string
const & fn, std::vector<gsEdge <T> > & edges );
339 std::vector<VertexHandle > &vertex;
340 std::vector<FaceHandle > &face;
347 #ifndef GISMO_BUILD_LIB
348 #include GISMO_HPP_HEADER(gsTriMeshToSolid.hpp)
static T calcBdryLength(std::vector< VertexHandle > vec)
Adds up the lengths between 2 neighboring vertices of a vector of vertices.
Definition: gsTriMeshToSolid.hpp:1677
A fixed-size, statically allocated 3D vector.
Definition: gsVector.h:218
static T calcArea(FaceHandle f1)
using Heron's Formula for the area of a triangle.
Definition: gsTriMeshToSolid.hpp:1798
void setSharpEdges(std::vector< gsEdge< T > > &featEdges, int useFeatures)
Sets sharp edges according to the value of useFeatures.
Definition: gsTriMeshToSolid.hpp:185
gsBSpline< T > * calcTCurve(Vertex v1, Vertex v2)
calculates a B-spline of degree one from 2 vertices.
Definition: gsTriMeshToSolid.hpp:1727
static bool approxEqual(const gsEdge< T > &e1, const gsEdge< T > &e2)
checks if two edges are very close to each other.
Definition: gsTriMeshToSolid.hpp:1597
void getPatchData(T angle, T innerAngle, T patchAreaWeight, T mergeSmallPatches, std::vector< std::vector< VertexHandle > > &iPoints, std::vector< std::vector< VertexHandle > > &oPoints, std::vector< std::vector< std::vector< VertexHandle > > > &innerBdrys, std::vector< std::vector< Vertex > > &innerBdrysMassP, std::vector< std::vector< bool > > &oPointsConvexFlag, std::string filenameFeatures, int useFeatures)
Computes data describing the patch structure of the mesh. Combines getFeatures and getFaces...
Definition: gsTriMeshToSolid.hpp:1405
static T calcWeight(VertexHandle v1, VertexHandle v2, std::set< VertexHandle > const &vertexFaceSet)
calculates a weight between 2 vertices used in Floater's algorithm.
Definition: gsTriMeshToSolid.hpp:1531
A B-spline function of one argument, with arbitrary target dimension.
Definition: gsBSpline.h:50
Class Representing a triangle mesh with 3D vertices.
Definition: gsMesh.h:31
void getFaces(std::vector< std::vector< VertexHandle > > &iPoints, std::vector< std::vector< VertexHandle > > &oPoints, std::vector< std::vector< std::vector< VertexHandle > > > &innerBdrys, std::vector< std::vector< Vertex > > &innerBdrysMassP, std::vector< std::vector< bool > > &oPointsConvexFlag)
Computes data describing the patch structure of the mesh.
Definition: gsTriMeshToSolid.hpp:311
static Vertex giveMidpoint(Vertex v1, Vertex v2)
calculates the midpoint of two vertices.
Definition: gsTriMeshToSolid.hpp:1747
static std::vector< bool > isCorner(std::vector< VertexHandle > const &vertexVec3d)
checks whether vertices are corners.
Definition: gsTriMeshToSolid.hpp:1712
Class gsTriMeshToSolid object.
Definition: gsTriMeshToSolid.h:31
void toSolid(gsSolid< T > &sl, std::vector< std::vector< VertexHandle > > &iPoints, std::vector< std::vector< VertexHandle > > &oPoints, std::vector< std::vector< std::vector< VertexHandle > > > &innerBdrys, std::vector< std::vector< Vertex > > &innerBdrysMassP, std::vector< std::vector< bool > > &oPointsConvexFlag, std::vector< gsMesh< T > * > ¶Meshes, std::vector< gsMesh< T > * > &fitMeshes, std::vector< gsMesh< T > * > &patchMeshes, int kvOuterPoints, int kvAdditionalInnerPoints, bool plot, int meshPoints, bool moreInner=true, T wE=5, T wI=1, int closeBoundary=0, bool noSmooth=false)
Parametrized a number of patches given by iPoints, oPoints, innerBdrys, innerBdrysMassP and oPointsCo...
Definition: gsTriMeshToSolid.hpp:566
Provides declaration of the Mesh class.
void readEdges(std::string const &fn, std::vector< gsEdge< T > > &edges)
reads a text file consisting of lines of 6 values, each line representing an edge.
Definition: gsTriMeshToSolid.hpp:1756
void divideAndMergePatches(T innerAngle, T patchAreaWeight, T mergeSmallPatches)
Improve surface segmentation by using more complex rules.
Definition: gsTriMeshToSolid.hpp:239
static T calcDist(VertexHandle v1, VertexHandle v2)
calculates the distance between 2 vertices.
Definition: gsTriMeshToSolid.hpp:1705
Class for representing a solid made up of vertices, edges, faces, and volumes.
Definition: gsSolid.h:32
static gsVertex< T > getMassP(std::vector< VertexHandle > vec)
calculates the mass point of a vector of vertices.
Definition: gsTriMeshToSolid.hpp:1688
void storeNeighboringFaces()
Store each edge's neighboring faces.
Definition: gsTriMeshToSolid.hpp:222
A closed loop given by a collection of curves.
Definition: gsCurveLoop.h:36
static int normalMult(gsVector3d< T > globalNormal, std::vector< FaceHandle > &face, int bigFaceIdx)
Definition: gsTriMeshToSolid.hpp:1562
gsCurveLoop< T > * calculateLoop(std::vector< Vertex > outerPoints, std::vector< bool > const &isCorner, bool noSmooth=false)
calculates a curve loop consisting of B-spline curves of degree one and two from a vector of vertices...
Definition: gsTriMeshToSolid.hpp:1444
void getFeatures(T angleGrad, bool &bWarnNonManifold, bool &bWarnBorders)
generates edges for a mesh consisting of vertices and faces. Determines if these edges are sharp...
Definition: gsTriMeshToSolid.hpp:72
void calcPatchNumbers()
Each face obtains a patch number, faces of the same number belong to the same patch.
Definition: gsTriMeshToSolid.hpp:27
gsVertex class that represents a 3D vertex for a gsMesh.
Definition: gsVertex.h:26
static T calcAngle(EdgeHandle e1, EdgeHandle e2, int faceNum)
calculates the conditioned angle between 2 edges.
Definition: gsTriMeshToSolid.hpp:1617