26 #ifndef MERCURYDPM_NURBSSURFACE_H
27 #define MERCURYDPM_NURBSSURFACE_H
48 NurbsSurface(
const std::vector<double>& knotsU,
const std::vector<double>& knotsV,
49 const std::vector<std::vector<Vec3D>>& controlPoints,
50 const std::vector<std::vector<double>>& weights);
63 NurbsSurface(
const std::vector<std::vector<Vec3D>>& controlPoints,
64 const std::vector<std::vector<Mdouble>>& weights,
65 unsigned int degreeU,
unsigned int degreeV,
66 bool clampedAtStartU =
true,
bool clampedAtEndU =
true,
67 bool clampedAtStartV =
true,
bool clampedAtEndV =
true);
91 void set(
const std::vector<double>& knotsU,
const std::vector<double>& knotsV,
92 const std::vector<std::vector<Vec3D>>& controlPoints,
const std::vector<std::vector<double>>& weights);
194 void moveControlPoint(
unsigned int indexU,
unsigned int indexV,
Vec3D dP,
bool includingClosedOrPeriodic);
224 void wrapAroundInU(
unsigned int numStartToEnd,
unsigned int numEndToStart,
bool forceBothEndsUniform =
false);
233 void wrapAroundInV(
unsigned int numStartToEnd,
unsigned int numEndToStart,
bool forceBothEndsUniform =
false);
Definition: NurbsSurface.h:34
std::vector< Mdouble > startingKnotsU_
Definition: NurbsSurface.h:214
void makeClosedInU()
This will make the surface close around on itself and ensure continuity.
Definition: NurbsSurface.cc:471
Vec3D evaluate(double u, double v) const
Definition: NurbsSurface.cc:170
void closestPoint(Vec3D position, double &u, double &v) const
bool getDistance(Vec3D P, double radius, double &distance, Vec3D &normal) const
Definition: NurbsSurface.cc:198
unsigned int degreeU_
degree pu = mu-nu-1, pv = mv-nv-1
Definition: NurbsSurface.h:206
void setClosedInU(bool closedInU)
Definition: NurbsSurface.cc:142
void makeClosedInV()
This will make the surface close around on itself and ensure continuity.
Definition: NurbsSurface.cc:478
void setClosedInV(bool closedInV)
Definition: NurbsSurface.cc:146
unsigned int degreeV_
Definition: NurbsSurface.h:206
void makePeriodicContinuousInV()
This will make the surface repeat itself and ensure continuity over periodic boundaries.
Definition: NurbsSurface.cc:464
void wrapAroundInU(unsigned int numStartToEnd, unsigned int numEndToStart, bool forceBothEndsUniform=false)
Copies control points from the start and adds to the end and vice versa. The first and last control p...
Definition: NurbsSurface.cc:485
void splitSurface(int spanU, int spanV)
Definition: NurbsSurface.h:102
void evaluateDerivatives(double u, double v, std::array< std::array< Vec3D, 3 >, 3 > &S) const
Definition: NurbsSurface.cc:329
bool periodicInV_
Definition: NurbsSurface.h:210
const std::vector< std::vector< Vec3D > > & getControlPoints() const
Definition: NurbsSurface.h:141
bool closedInU_
make it a periodic system
Definition: NurbsSurface.h:208
std::vector< std::vector< Vec3D > > controlPoints_
nu x nv control points
Definition: NurbsSurface.h:202
const std::vector< std::vector< Mdouble > > & getWeights() const
Definition: NurbsSurface.h:144
void set(const std::vector< double > &knotsU, const std::vector< double > &knotsV, const std::vector< std::vector< Vec3D >> &controlPoints, const std::vector< std::vector< double >> &weights)
Definition: NurbsSurface.cc:60
void unclampKnots(bool inU, bool atStart)
Unclamps the knot vector by changing the control points, weights and knots.
Definition: NurbsSurface.cc:578
std::vector< Vec3D > startingPoints_
Definition: NurbsSurface.h:213
double getLowerBoundV() const
Definition: NurbsSurface.h:131
void makePeriodicContinuousInU()
This will make the surface repeat itself and ensure continuity over periodic boundaries.
Definition: NurbsSurface.cc:457
NurbsSurface()
Definition: NurbsSurface.cc:34
bool periodicInU_
Definition: NurbsSurface.h:210
void flipOrientation()
Definition: NurbsSurface.cc:150
void wrapAroundInV(unsigned int numStartToEnd, unsigned int numEndToStart, bool forceBothEndsUniform=false)
Copies control points from the start and adds to the end and vice versa. The first and last control p...
Definition: NurbsSurface.cc:538
std::vector< Mdouble > knotsU_
mu knots
Definition: NurbsSurface.h:198
friend std::istream & operator>>(std::istream &is, NurbsSurface &a)
Adds elements to an input stream.
Definition: NurbsSurface.cc:402
double getUpperBoundU() const
Definition: NurbsSurface.h:125
bool closedInV_
Definition: NurbsSurface.h:208
const std::vector< Mdouble > & getKnotsU() const
Definition: NurbsSurface.h:147
std::vector< Mdouble > knotsV_
mv knots
Definition: NurbsSurface.h:200
void moveControlPoint(unsigned int indexU, unsigned int indexV, Vec3D dP, bool includingClosedOrPeriodic)
Definition: NurbsSurface.cc:658
friend std::ostream & operator<<(std::ostream &os, const NurbsSurface &a)
Adds elements to an output stream.
Definition: NurbsSurface.cc:376
const std::vector< Mdouble > & getKnotsV() const
Definition: NurbsSurface.h:150
double getLowerBoundU() const
Definition: NurbsSurface.h:119
double getUpperBoundV() const
Definition: NurbsSurface.h:137
std::vector< Mdouble > startingKnotsV_
Definition: NurbsSurface.h:215
std::vector< std::vector< Mdouble > > weights_
nu x nv weights
Definition: NurbsSurface.h:204
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73