#include <geospline.h>
|
| Spline (const std::vector< Coordinate > &control_points, const std::vector< double > &knotPoints, const std::vector< Coordinate > &fitPoints, int degree, bool closed, double fitTolerance, double stanx, double stany, double stanz, double etanx, double etany, double etanz, double nx, double ny, double nz, splineflag flags) |
|
const std::vector< Coordinate > & | controlPoints () const |
| control_points, Returns Control points of spline More...
|
|
short | degree () const |
| degree, Returns degree of spline More...
|
|
const std::vector< double > & | knotPoints () const |
| Return a vector of knotpoints. More...
|
|
const std::vector< Coordinate > & | fitPoints () const |
| Return a vector of fitpoints. More...
|
|
double | fitTolerance () const |
| Returns the fit point tolerance of the spline. More...
|
|
double | startTanX () const |
|
double | startTanY () const |
|
double | startTanZ () const |
|
double | endTanX () const |
|
double | endTanY () const |
|
double | endTanZ () const |
|
double | nX () const |
|
double | nY () const |
|
double | nZ () const |
|
splineflag | flags () const |
|
bool | closed () const |
| closed, returns if spline is closed or not More...
|
|
const std::vector< BB_CSPtr > | beziers () const |
|
void | generateBeziers () |
|
void | trimAtPoint (const geo::Coordinate &c) |
|
void | populateCurve () |
| Fills the opennurbs curve with the data from spline constructor. More...
|
|
Coordinate | nearestPointOnPath (const Coordinate &coord) const |
| returns the nearest Point On Path More...
|
|
Coordinate | nearestPointOnEntity (const Coordinate &coord) const |
| returns the nearest Point On Entity itself. More...
|
|
virtual void | accept (GeoEntityVisitor &v) const override |
|
virtual | ~Base ()=default |
|
virtual | ~Visitable ()=default |
|
Definition at line 15 of file geospline.h.
Enumerator |
---|
CLOSED |
|
PERIODIC |
|
RATIONAL |
|
PLANAR |
|
LINEAR |
|
Definition at line 17 of file geospline.h.
lc::geo::Spline::Spline |
( |
const std::vector< Coordinate > & |
control_points, |
|
|
const std::vector< double > & |
knotPoints, |
|
|
const std::vector< Coordinate > & |
fitPoints, |
|
|
int |
degree, |
|
|
bool |
closed, |
|
|
double |
fitTolerance, |
|
|
double |
stanx, |
|
|
double |
stany, |
|
|
double |
stanz, |
|
|
double |
etanx, |
|
|
double |
etany, |
|
|
double |
etanz, |
|
|
double |
nx, |
|
|
double |
ny, |
|
|
double |
nz, |
|
|
splineflag |
flags |
|
) |
| |
|
inline |
Definition at line 24 of file geospline.h.
const std::vector< Coordinate > _controlPoints
short degree() const
degree, Returns degree of spline
double fitTolerance() const
Returns the fit point tolerance of the spline.
void populateCurve()
Fills the opennurbs curve with the data from spline constructor.
const double _fitTolerance
const std::vector< Coordinate > _fitPoints
bool closed() const
closed, returns if spline is closed or not
const std::vector< double > & knotPoints() const
Return a vector of knotpoints.
const std::vector< Coordinate > & fitPoints() const
Return a vector of fitpoints.
const std::vector< double > _knotPoints
const std::vector< BB_CSPtr > Spline::beziers |
( |
| ) |
const |
bool Spline::closed |
( |
| ) |
const |
closed, returns if spline is closed or not
- Returns
- bool closed
Definition at line 10 of file geospline.cpp.
const std::vector< Coordinate > & Spline::controlPoints |
( |
| ) |
const |
control_points, Returns Control points of spline
- Returns
- vector<Coordinate> controlpoints
Definition at line 6 of file geospline.cpp.
const std::vector< Coordinate > _controlPoints
short Spline::degree |
( |
| ) |
const |
degree, Returns degree of spline
- Returns
- int degree
Definition at line 14 of file geospline.cpp.
double Spline::endTanX |
( |
| ) |
const |
double Spline::endTanY |
( |
| ) |
const |
double Spline::endTanZ |
( |
| ) |
const |
const std::vector< Coordinate > & Spline::fitPoints |
( |
| ) |
const |
Return a vector of fitpoints.
- Returns
- vector of Coordinate
Definition at line 22 of file geospline.cpp.
const std::vector< Coordinate > _fitPoints
double Spline::fitTolerance |
( |
| ) |
const |
Returns the fit point tolerance of the spline.
- Returns
- double tolerance value
Definition at line 64 of file geospline.cpp.
const double _fitTolerance
void Spline::generateBeziers |
( |
| ) |
|
Definition at line 110 of file geospline.cpp.
117 for (
int i = 0; i < nbBeziers; i++) {
118 std::vector<geo::Coordinate> bez;
120 auto j = nbCoordinate * i;
121 auto end = nbCoordinate * (i+1);
129 _beziers.push_back(std::make_shared<Bezier>(bez.at(0),bez.at(1),bez.at(2)));
132 for (
int i = 0; i < nbBeziers; i++) {
133 std::vector<geo::Coordinate> bez;
135 auto j = nbCoordinate * i;
136 auto end = nbCoordinate * (i+1);
145 _beziers.push_back(std::make_shared<CubicBezier>(bez.at(0),bez.at(1),bez.at(2),bez.at(3)));
BSpline toBeziers() const
std::vector< BB_CSPtr > _beziers
const std::vector< BB_CSPtr > beziers() const
const std::vector< double > & Spline::knotPoints |
( |
| ) |
const |
Return a vector of knotpoints.
- Returns
- vector of double
Definition at line 18 of file geospline.cpp.
const std::vector< double > _knotPoints
double Spline::nX |
( |
| ) |
const |
double Spline::nY |
( |
| ) |
const |
double Spline::nZ |
( |
| ) |
const |
void Spline::populateCurve |
( |
| ) |
|
Fills the opennurbs curve with the data from spline constructor.
Definition at line 81 of file geospline.cpp.
88 std::vector<ts::rational> ts_controlPoints;
90 ts_controlPoints.push_back(cp.x());
91 ts_controlPoints.push_back(cp.y());
92 ts_controlPoints.push_back(cp.z());
97 catch (std::runtime_error e) {
const std::vector< Coordinate > _controlPoints
short degree() const
degree, Returns degree of spline
void setCtrlp(const std::vector< rational > ctrlp)
double Spline::startTanX |
( |
| ) |
const |
double Spline::startTanY |
( |
| ) |
const |
double Spline::startTanZ |
( |
| ) |
const |
Definition at line 150 of file geospline.cpp.
152 if(bez->boundingBox().inArea(c)) {
std::vector< BB_CSPtr > _beziers
std::vector<BB_CSPtr> lc::geo::Spline::_beziers |
|
private |
const bool lc::geo::Spline::_closed |
|
private |
const std::vector<Coordinate> lc::geo::Spline::_controlPoints |
|
private |
const short lc::geo::Spline::_degree |
|
private |
const double lc::geo::Spline::_eTanX |
|
private |
const double lc::geo::Spline::_eTanY |
|
private |
const double lc::geo::Spline::_eTanZ |
|
private |
const std::vector<Coordinate> lc::geo::Spline::_fitPoints |
|
private |
const double lc::geo::Spline::_fitTolerance |
|
private |
const std::vector<double> lc::geo::Spline::_knotPoints |
|
private |
const double lc::geo::Spline::_nX |
|
private |
const double lc::geo::Spline::_nY |
|
private |
const double lc::geo::Spline::_nZ |
|
private |
const double lc::geo::Spline::_sTanX |
|
private |
const double lc::geo::Spline::_sTanY |
|
private |
const double lc::geo::Spline::_sTanZ |
|
private |
The documentation for this class was generated from the following files: