hexed 0.4.0
 
Loading...
Searching...
No Matches
hexed::brep::Geom_2d Class Reference

a Surface_geom consisting of a set of Parametric<1> curves More...

#include <brep.hpp>

Inheritance diagram for hexed::brep::Geom_2d:
hexed::Surface_geom

Public Member Functions

 Geom_2d (std::string file_name, Int n_div)
 
void visualize (std::string format, std::string file_name, Int n_div=100)
 Writes visualization files of the geometry to help diagnose import/translation bugs.
 
Nearest_point< dynnearest_point (Mat<> point, double max_distance=huge, double distance_guess=huge) override
 Computes the point on the surface which is nearest to point within max_distance.
 
std::vector< double > intersections (Mat<> point0, Mat<> point1, bool high_prec=true) override
 Computes the set of intersection points between a line and the surface.
 
next::Sequence< Mat< 3 > > points () override
 
- Public Member Functions inherited from hexed::Surface_geom
virtual next::Sequence< const Geom_edge & > edges ()
 Returns a list of any geometry edges that require mesh edges to be snapped to them.
 

Detailed Description

a Surface_geom consisting of a set of Parametric<1> curves

Constructor & Destructor Documentation

◆ Geom_2d()

hexed::brep::Geom_2d::Geom_2d ( std::string file_name,
Int n_div )
Parameters
file_nameName of file containing geometry. Must be in IGES format.
n_divAny entities that need to be discretized will be so with n_div subdivisions. Must be a power of 2.

Member Function Documentation

◆ intersections()

std::vector< double > hexed::brep::Geom_2d::intersections ( Mat<> point0,
Mat<> point1,
bool high_precision = true )
overridevirtual

Computes the set of intersection points between a line and the surface.

The line is defined parametrically to be the set of points \( [\text{point0}] + t [\text{point1}] \) for all \( t \in \mathbb{R} \). Returns the (potentially empty) set of \( t \) values where the line intersects the surface.

Deprecated
Newer methods should be based purely on nearest point projections.

Implements hexed::Surface_geom.

◆ nearest_point()

Nearest_point< dyn > hexed::brep::Geom_2d::nearest_point ( Mat<> point,
double max_distance = huge,
double distance_guess = huge )
overridevirtual

Computes the point on the surface which is nearest to point within max_distance.

If no point is found, returns an empty Nearest_point.

Parameters
pointThe point you want to find the nearest point to.
max_distanceOnly consider points within max_distance of point.
distance_guessIf you have some reason to suspect the nearest point is within a certain distance of the input point, you can pass it to this parameter as a hint to possibly improve performance.

Implements hexed::Surface_geom.

◆ points()

next::Sequence< Mat< 3 > > hexed::brep::Geom_2d::points ( )
overridevirtual

Reimplemented from hexed::Surface_geom.

◆ visualize()

void hexed::brep::Geom_2d::visualize ( std::string format,
std::string file_name,
Int n_div = 100 )

Writes visualization files of the geometry to help diagnose import/translation bugs.

For visualization purposes, entities will be discretized with n_div segments. This is not the same as the n_div passed to the constructor, and need not be a power of 2. It should usually be much less than the n_div passed to the constructor, because visualization is more expensive than nearest-point calculations and requires less precision. If the input file is named INPUT_FILE and the file extension of the specified visualization format is EXT, this function will write a file INPUT_FILE_curves.EXT with all curves in the geometry. Even though Geom_2d is supposed to represent a 2D geometry, the curves will be 3D. This is because the underlying representation is 3D, and if this turns out not to lie in the \( x_0, x_1 \) plane, this is a potential source of problems and important information to convey in the visualization file.


The documentation for this class was generated from the following file: