G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Modeling module

Detailed Description

This module implements geometric and modeling operations for solids and point-clouds.

Classes

class  gsBarrierPatch< d, T >
 Computes a patch parametrization given a set of boundary geometries. Parametrization is not guaranteed to be non-singular. Works for planar surfaces and volumes. More...
 
class  gsCoonsPatch< T >
 Computes a Coons' patch parametrization given a set of boundary geometries. Parametrization is not guaranteed to be non-singular. Works for surface, volumes, or any dimension. More...
 
class  gsCurvatureSmoothing< T >
 Class for computing a closed B-spline curve with a smaller number of curvature extrema compared to a given closed B-spline curve. More...
 
class  gsCurveFitting< T >
 Class for performing a least squares fit to get a open/closed B-Spline curve for some given data. More...
 
class  gsCurveLoop< T >
 A closed loop given by a collection of curves. More...
 
class  gsFitting< T >
 Class for performing a least squares fit of a parametrized point cloud with a gsGeometry. More...
 
class  gsPatchGenerator< T >
 Abstract class that accepts a set of input boundaries and computes a new geometry. More...
 
class  gsPlanarDomain< T >
 Class representing a Planar domain with an outer boundary and a number of holes. More...
 
class  gsSolid< T >
 Class for representing a solid made up of vertices, edges, faces, and volumes. More...
 
class  gsTemplate< T >
 Class gsTemplate object. More...
 
class  gsTriMeshToSolid< T >
 Class gsTriMeshToSolid object. More...
 
class  gsTrimSurface< T >
 Class for a trim surface. More...
 

Functions

template<typename T = real_t>
gsVector< T > convertMultiPatchToFreeVector (const gsMultiPatch< T > &mp, const gsDofMapper &mapper)
 Computes a patch parametrization given a set of boundary geometries. Parametrization is not guaranteed to be non-singular. Works for planar surfaces and volumes. More...
 
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. More...
 
 gsBarrierPatch (const gsMultiPatch< T > &mp, const gsDofMapper &mapper)
 Constructs the object using a given multi-patch and a degree of freedom mapper. More...
 
template<class T >
void gsTraceLine (std::pair< gsFunction< T > *, gsFunction< T > * > &map, gsMatrix< T > const &x, gsMatrix< T > const &p, gsMatrix< T > &result)
 
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 > * > &paraMeshes, 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 oPointsConvexFlag, fits B-spline surfaces to them and trimmes the resulting surfaces. The trimmed surfaces are then added to the empty solid sl and a half-edge structure for sl is generated. If desired, in paraview plotable meshes to visualize the solid are generated. More...
 

Function Documentation

gsVector<T> gismo::convertMultiPatchToFreeVector ( const gsMultiPatch< T > &  mp,
const gsDofMapper &  mapper 
)

Computes a patch parametrization given a set of boundary geometries. Parametrization is not guaranteed to be non-singular. Works for planar surfaces and volumes.

Template Parameters
ddomain dimension
TCoefficient typeConvert the free control points of a multi-patch into a vector
void getPatchData ( angle,
innerAngle,
patchAreaWeight,
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.

Parameters
angle- defines the angle between 2 triangles before the edge between them counts as sharp. By increasing this parameter, the function will identify a smaller number of patches of the mesh.
innerAngle- after the initial patch generation there is the possibility to subdivide the larger patches by a smaller angle. Larger is defined by patchAreaWeight. innerAngle should be smaller than angle, else it will not have any effect.
patchAreaWeight- patchAreaWeight determines how large a patch has to be such that it is subdivided by using the parameter innerAngle.
mergeSmallPatches- by using a low angle a lot of small patches might be produced. mergeSmallPatches gives the opportunity to merge the small patches. mergeSmallPatches decides how small the patches are allowed to be before they are merged. A value of 1 will merge patches if the area of them is smaller than the average area.
[out]iPoints- the data about the inner points of a patch is stored in an unsorted vector. For each patch such a vector is generated. The parameter iPoints is a vector of these generated vectors.
[out]oPoints- the data about the boundary points of a patch is stored in a counter clockwise sorted vector. For each patch such a vector is generated. The parameter oPoints is a vector of these generated vectors.
[out]innerBdrys- the data about each hole of a patch is stored in a clockwise sorted vector. For each hole of a patch such a vector is generated. For each patch a vector of its holes is generated. The parameter innerBdrys is a vector of these generated vectors.
[out]innerBdrysMassP- the data about the mass points of each hole is stored here.
[out]oPointsConvexFlag- each boundary point can be convex of not, depending on the turning angles of the adjacent edges on the boundary.
filenameFeatures- the path to the text file where the manually provided features (sharp edges) can be found.
useFeatures- if set to 1 the text file is used to add the features from the text file. If set to 2 these features are used exclusively.
gsBarrierPatch ( const gsMultiPatch< T > &  mp,
const gsDofMapper mapper 
)
explicit

Constructs the object using a given multi-patch and a degree of freedom mapper.

Computes a patch parametrization given a set of boundary geometries. Parametrization is not guaranteed to be non-singular. Works for planar surfaces and volumes.

Template Parameters
ddomain dimension
TCoefficient type
Parameters
bRepInput boundary representation
initialMethodSpecify initialization method
filenameName of input data fileConstructs the object using a given multi-patch and a degree of freedom mapper.
void gismo::gsTraceLine ( std::pair< gsFunction< T > *, gsFunction< T > * > &  map,
gsMatrix< T > const &  x,
gsMatrix< T > const &  p,
gsMatrix< T > &  result 
)
Parameters
mapis a planar map given by two component functions, that maps onto a template
pis a 2x1 matrix storing a chosen point in our template
xis a 2x1 matrix storing a starting point in our computational domain
resultis a 2xn matrix containing points on the pre-image curve
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 > * > &  paraMeshes,
std::vector< gsMesh< T > * > &  fitMeshes,
std::vector< gsMesh< T > * > &  patchMeshes,
int  kvOuterPoints,
int  kvAdditionalInnerPoints,
bool  plot,
int  meshPoints,
bool  moreInner = true,
wE = 5,
wI = 1,
int  closeBoundary = 0,
bool  noSmooth = false 
)

Parametrized a number of patches given by iPoints, oPoints, innerBdrys, innerBdrysMassP and oPointsConvexFlag, fits B-spline surfaces to them and trimmes the resulting surfaces. The trimmed surfaces are then added to the empty solid sl and a half-edge structure for sl is generated. If desired, in paraview plotable meshes to visualize the solid are generated.

Parameters
[out]sl- The empty solid sl is designed by adding trimmed surface patches and incorporating a half-edge structure.
iPoints- the data about the inner points of a patch is stored in an unsorted vector. For each patch such a vector is generated. The parameter iPoints is a vector of these generated vectors.
oPoints- the data about the boundary points of a patch is stored in a counter clockwise sorted vector. For each patch such a vector is generated. The parameter oPoints is a vector of these generated vectors.
innerBdrys- the data about each hole of a patch is stored in a clockwise sorted vector. For each hole of a patch such a vector is generated. For each patch a vector of its holes is generated. The parameter innerBdrys is a vector of these generated vectors.
innerBdrysMassP- the data about the mass points of each hole is stored here.
oPointsConvexFlag- each boundary point can be convex of not, depending on the turning angles of the adjacent edges on the boundary.
[out]paraMeshes- a vector of meshes visualizing the parametrizations of the patches.
[out]fitMeshes- a vector of meshes visualizing the trimmed surfaces of the patches.
[out]patchMeshes- a vector of meshes visualizing the patches.
kvOuterPoints- determines the multiplicity at the two end knots of the knot vector needed to approximate the surface of each face.
kvAdditionalInnerPoints- determines the number of additionl inner Points in the knot vector (equally distributed). The sqrt of the number of corners of a face are taken as a base value.
plot- if set to 1, it will generate meshes of each of the patches, its parametrization and also of the trimmed surfaces.
meshPoints- the accuracy of the visualization for the _fit plots.
moreInner- if additional interior points shall be added between large Edges. The number of points added per Edge are calculated by length(edge)/h. h is the length of one of the smaller Edges. (The Edge such that 10% of the other Edges are smaller.)
wE- weights for edge points during fitting the B-spline surfaces.
wI- weights for interior points during fitting the B-spline surfaces.
closeBoundary- if additional points on the edges shall be added, to reduce the possible gaps between two patches.
noSmooth- if the trimming curves shall not be smoothed out.