Represents discrete geometry composed of simplices. More...
#include <Simplex_geom.hpp>
Public Member Functions | |
Simplex_geom (const std::vector< Mat< n_dim, n_dim > > &sims, const std::vector< Mat< n_dim - 1, n_dim > > ¶ms={}, const std::vector< int > &face={}) | |
const std::vector< Mat< n_dim, n_dim > > & | simplices () const |
const std::vector< Mat< n_dim - 1, n_dim > > & | parameters () const |
const std::vector< int > & | faces () const |
Nearest_point< dyn > | nearest_point (Mat<> point, double max_distance=huge, double distance_guess=huge) override |
Intersections | simplex_intersections (Mat<> point0, Mat<> point1) override |
std::vector< double > | intersections (Mat<> point0, Mat<> point1) override |
void | visualize (std::string format, std::string file_name) override |
Writes geometry to a visualization file with the specified name + file extension. | |
Public Attributes | |
double | gap_tol = 1e-6 |
extend triangles by this amount, relative to their original size, to fill gaps | |
Related Symbols | |
(Note that these are not member symbols.) | |
std::vector< Mat< 2, 2 > > | segments (const Mat< dyn, dyn > &points) |
Creates simplices from an ordered array of points representing a polygonal curve. | |
Additional Inherited Members | |
![]() | |
static std::string | performance_report () |
if compiled with HEXED_OBSESSIVE_TIMING ON , return a performance report. Otherwise, empty string. | |
Represents discrete geometry composed of simplices.
This can be used as an interface for geometry derived from an STL file in 3D or a list of node coordinates in 2D. Each simplex is represented as an n_dim
by n_dim
matrix where each column is the coordinates of one vertex. The order of the vertices is arbitrary, and there are no requirements on inter-simplex continuity. Since the Surface_geom
interface is so minimal, the geometry is simply viewed as a collection of unrelated simplices, so we do not care about orientation or watertightness. The you are free to modify the simplex list at will, since there are no requirements on it. All input points must have exactly n_dim
entries.
Occt::segments
Occt::triangles
|
inlineoverridevirtual |
Evaluates intersections with each individual element and assembles a global list. Intersections with the boundary of a simplex are always considered valid intersections, so if the line passes exactly through the shared boundary of multiple _simplices then duplicate intersections may be obtained.
Implements hexed::Surface_geom.
|
inlineoverridevirtual |
Iterates through all _simplices and finds the nearest point on each, whether that point lies in the interior or on the edge or a vertex. Returns the global nearest of all those points. distance_guess
is taken into account, and it is generally preferable to overestimate rather than underestimate.
Implements hexed::Surface_geom.
|
inlineoverridevirtual |
Implements hexed::Simplex_geom_nd.
|
overridevirtual |
Writes geometry to a visualization file with the specified name + file extension.
Only for 3D. For 2D, does nothing.
Implements hexed::Simplex_geom_nd.
Creates simplices from an ordered array of points representing a polygonal curve.
points
must have exactly 2 rows. Each column of points
is the coordinates of one point. The curve may or may not be closed. Each point represents a unique vertex – duplicate points are allowed, but you don't need to include each interior point twice. The result can be used to construct a Simplex_geom<2>
.
read_csv()