Wiki
Clone wikimshr / API / CSGCGALDomain3D
mshr::CSGCGALDomain3D
mshr::CSGCGALDomain3D
A polyhedron meshing domain.
Public functions
CSGCGALDomain3D()
Create empty polyhedron.
CSGCGALDomain3D(const mshr::CSGGeometry &csg)
Construct polyhedron from CSG geometry.
Parameters csg const
~CSGCGALDomain3D()
Destructor.
std::size_t num_vertices() const
Number of vertices in polyhedron.
std::size_t num_facets() const
Number of facets in polyhedron.
std::size_t num_halfedges() const
Number of halfedges in polyhedron.
double volume() const
Volume of polyhedron (experimental, use with care)
bool is_insideout() const
Is polyhedron (experimental, use with care)
std::size_t num_degenerate_facets(double threshold) const
Count the number of degenerate facets wrt. the given tolerance.
Parameters threshold double
double shortest_edge() const
get length of shortest edge
bool is_selfintersecting() const
Test if any facets intersects.
void save_off(std::string filename) const
Save polyhedron to off file.
Parameters| |
----------|-----------|-------------------- filename |std::string|Filename to write to
void get_vertices(std::vector< dolfin::Point > &v) const
Output vertices in double precision.
Parameters v std::vector< dolfin::Point > &
void get_facets(std::vector< std::array< std::size_t, 3 > > &f) const
Output facets as indices to the vertices array.
Parameters f std::vector< std::array< std::size_t, 3 > > &
void get_points_in_holes(std::vector< dolfin::Point > &holes, std::shared_ptr< CSGCGALDomain3DQueryStructure > q) const
get one point per hole, strictly inside the hole.
Parameters| |
----------|------------------------------|------------------------------- holes |std::vector< dolfin::Point > &|the returned points
q |std::shared_ptr< |a query structure returned from
void remove_degenerate_facets(double tolerance)
Attempt to remove degenerate facets.
Parameters tolerance double
void ensure_meshing_preconditions()
Attempts to ensure that the preconditions for successfull meshing generation are fullfilled.
std::shared_ptr< get_query_structure() const
Return data structure that allows fast queries, essentially a wrapper for a CGAL AABB tree of the polyhedron triangles. When performing queries, the user is responsible for the query structure being in sync with the
std::string str(bool verbose) const
Informal string representation.
Parameters| |
----------|----|------------------- verbose |bool|The verbosity level
Updated