hexed 0.4.0
 
Loading...
Searching...
No Matches
hexed::brep::Parametric< n_param > Class Template Referenceabstract

Represents a basic geometric entity in parametric form. More...

#include <brep.hpp>

Inheritance diagram for hexed::brep::Parametric< n_param >:
hexed::brep::Nurbs< n_param > hexed::brep::Transformed< n_param >

Public Member Functions

virtual Mat< 3 > point (Mat< n_param > params) const =0
 Obtains the point at parameters params.
 
virtual Mat< n_param, 2 > reparameterize (Mat< n_param, 2 > bounds)
 May reparameterize the entity to keep parameters in [0, 1].
 
virtual Mat< n_param, 2 > reparameterize (const std::vector< Mat< 3 > > &points)
 reparameterizes to contain the projections of points.
 
virtual Mat< 2, n_param > orig_param_bounds () const =0
 returns the parameter bounds in the original IGES definition (low, high)
 

Detailed Description

template<int n_param>
class hexed::brep::Parametric< n_param >

Represents a basic geometric entity in parametric form.

n_param is the number of parameters the entity takes. Thus Parametric<1> is a parametric curve and Parametric<2> is a parametric surface. For simplicity, the number of output variables is always 3. If the geometry is intended to be 2D, then the last coordinate should be (approximately) 0.

Member Function Documentation

◆ orig_param_bounds()

template<int n_param>
virtual Mat< 2, n_param > hexed::brep::Parametric< n_param >::orig_param_bounds ( ) const
pure virtual

◆ point()

template<int n_param>
virtual Mat< 3 > hexed::brep::Parametric< n_param >::point ( Mat< n_param > params) const
pure virtual

Obtains the point at parameters params.

Implemented in hexed::brep::Nurbs< n_param >, and hexed::brep::Transformed< n_param >.

◆ reparameterize() [1/2]

template<int n_param>
virtual Mat< n_param, 2 > hexed::brep::Parametric< n_param >::reparameterize ( const std::vector< Mat< 3 > > & points)
inlinevirtual

reparameterizes to contain the projections of points.

Reimplemented in hexed::brep::Plane.

◆ reparameterize() [2/2]

template<int n_param>
virtual Mat< n_param, 2 > hexed::brep::Parametric< n_param >::reparameterize ( Mat< n_param, 2 > bounds)
inlinevirtual

May reparameterize the entity to keep parameters in [0, 1].

For infinite entities (e.g., Plane), it is not always known a priori what parameterization makes sense, so they are initialized with an arbitrary parameterization. Once the range of parameters for points of interest is known, this function should be called with bounds such that bounds(i, 0) <= param(i) && param(i) <= bounds(i, 1) for all i and all points param that will be required in calculations. This function should then modify the parameterization such that 0 <= param(i) && param(i) <= 1 for all points param in future calculations. It will then return the new bounds such that a linear function ( \( f(x) = ax + b \)) which maps bounds to this->reparameterize(bounds) will map points in the old parameterization to the new parameterization. In other words, it returns the new parameter bounds in the old parameterization. The default implementation does nothing and returns \( [\vec{0}\ \vec{1}] \), and finite entities need not override this.


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