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

A surface created by trimming a parametric surface with closed curves. More...

#include <brep.hpp>

Public Member Functions

 Trimmed_surface (Parametric< 2 > *surface, std::vector< Composite_curve > &&curves, std::vector< bool > is_model_space, Int n_div_min, Int n_div_max)
 
const Parametric< 2 > & surface () const
 Access the parametric surface.
 
bool is_inside (Mat< 2 > parameters) const
 Test whether a point parameters is inside the bounding curves in parameter space.
 
next::Sequence< const Tree_curve & > curves () const
 Access the physical bounding curves.
 
next::Sequence< const Trimming_curve & > trimming_curves () const
 Access the full data of the bounding curves.
 
Nearest_point< 3 > nearest_point (Mat< 3 > point, double max_dist) const
 Compute the point on the trimmed surface (including the boundary) nearest to point.
 
std::vector< double > intersections (Mat< 3, 2 > endpoints, bool high_prec=true) const
 
Mat< 3 > normal (Mat< 2 > params) const
 
Mat< 3 > point (Mat< 2 > params) const
 
Mat< 3, 2 > bounding_box () const
 

Detailed Description

A surface created by trimming a parametric surface with closed curves.

Specifically, given a parametric surface and a set of closed curves on that surface, the resulting trimmed surface is the set of points on the surface such a ray originating from that point in parameter space intersects the set of closed curves an odd number of times. In other words, the set of points which are inside the curves in parameter space. Usually, the bounding curves are non-intersecting and include one outer boundary in addition to zero or more inner boundaries, but this implementation does not require that. There are also no orientation requirements.

Constructor & Destructor Documentation

◆ Trimmed_surface()

hexed::brep::Trimmed_surface::Trimmed_surface ( Parametric< 2 > * surface,
std::vector< Composite_curve > && curves,
std::vector< bool > is_model_space,
Int n_div_min,
Int n_div_max )
Parameters
surfaceParametric surface to be trimmed. Acquires ownership of surface.
curvesBounding curves in model space, not parameter space. These curves should (approximately) lie on the surface. Any deviation from the surface will be a source of numerical error.
Todo
Implement another constructor that accepts curves in parameter space.
Parameters
is_model_spaceFor each curve, true if the curve provides coordinates in model space and false if the curve provides coordinates in the parameter space of the surface (in which case the x2 coordinate should be zero).
n_div_minMinimum number of subdivisions for dividing curves/surfaces into panels for low-precision calculations. Must be a power of 2.
n_div_maxMaximum number of subdivisions for dividing curves/surfaces into panels for high-precision calculations. Must be a power of 2.

Member Function Documentation

◆ nearest_point()

Nearest_point< 3 > hexed::brep::Trimmed_surface::nearest_point ( Mat< 3 > point,
double max_dist ) const

Compute the point on the trimmed surface (including the boundary) nearest to point.

If the nearest point would be further than max_dist from point, the empty Nearest_point is returned.


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