Represents a basic geometric entity in parametric form. More...
#include <brep.hpp>
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) | |
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.
|
pure virtual |
returns the parameter bounds in the original IGES definition (low, high)
Implemented in hexed::brep::Circular_arc, hexed::brep::Line_segment, hexed::brep::Nurbs< n_param >, hexed::brep::Plane, hexed::brep::Revolution_surface, and hexed::brep::Transformed< n_param >.
|
pure virtual |
Obtains the point at parameters params.
Implemented in hexed::brep::Nurbs< n_param >, and hexed::brep::Transformed< n_param >.
|
inlinevirtual |
reparameterizes to contain the projections of points.
Reimplemented in hexed::brep::Plane.
|
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.