Programmer's Documentation

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RationalSplineCurve Class Reference

Detailed Description

NURBS curve.

This is the most general representation of NURBS curves, with support for runtime variable order and rational forms (i.e. non-unit weight values). This flexibility also means that the evaluation and derivation is more expensive than for simpler fixed-order objects such as Curve.

See Also
SplineBasis, PolySplineCurve, AbstractCurve

#include <rationalsplinecurve.h>

Inheritance diagram for RationalSplineCurve:
Collaboration diagram for RationalSplineCurve:

Public Member Functions

 RationalSplineCurve (const std::string &s="")
 create empty spline curve
void createCircle ()
 create unit circle in xy-plane
void createCircle (const Vct3 &ctr, const Vct3 &pnrm, Real radius)
 create an exact circle from center, plane normal and radius
Vct3 eval (Real u) const
 evaluation interface
Vct3 derive (Real u, uint du) const
 derive at (u,v)
void tgline (Real t, Vct3 &c, Vct3 &dc) const
 optimization for common case
void apply ()
 coordinate transformation
void initGrid (Vector &t) const
XmlElement toXml (bool share=false) const
 XML output.
void fromXml (const XmlElement &xe)
 XML input.
bool fromIges (const IgesFile &file, const IgesDirEntry &entry)
 extract from IGES entity 128
int toIges (IgesFile &file, int tfi=0) const
 append to IGES file and return the directory entry index, if implemented
RationalSplineCurveclone () const
 generate a clone
- Public Member Functions inherited from AbstractCurve
 AbstractCurve (const std::string &s="")
 unamed curve
virtual ~AbstractCurve ()
 virtual destructor
void rename (const std::string &s)
 change name
const std::string & name () const
 return name
virtual Real curvature (Real t) const
 compute curvature at t
virtual uint discretize (const DcMeshCritBase &mcrit, Vector &t) const
 discretization based on simple criteria
virtual void tessellate (CgMesh &cgr) const
 discretized for visualization based on default grid
virtual bool project (const Vct3 &pt, Real &s, Real stol=gmepsilon, Real ttol=1e-6) const
 project point onto curve, starting at t
virtual bool pierce (const Vct3 &pn, Real dp, Real &s, Real stol=gmepsilon) const
 compute intersection of curve with plane (pn,dp), return success
- Public Member Functions inherited from RFrame
void clear ()
Vct3 getOrigin () const
void translate (const Vct3 &v)
void translate (Real dx, Real dy, Real dz)
void rotate (Real betax, Real betay, Real betaz)
void rotate (const Vct3 &rotax, Real angle)
void scale (Real xf, Real yf, Real zf)
void scale (Real f)
void mirror (const Vct3 &normal)
const SMatrix< 4, 4 > & trafoMatrix () const
void setTrafoMatrix (const SMatrix< 4, 4 > &m)
Vct3 forward (const Vct3 &a) const
void forward (const PointList< 4 > &a, PointList< 4 > &b) const

Protected Member Functions

Real tmap (Real tx) const
 remap parameter value
- Protected Member Functions inherited from AbstractCurve
void setIgesName (const IgesFile &file, const IgesEntity &e)
 find curves that fit together and create a composite curve, decimate list More...
void setIgesTransform (const IgesFile &file, const IgesDirEntry &entry)
 extract referenced transformation matrix from IGES file, apply

Private Attributes

SplineBasis ub
 spline basis
PointList< 4 > cp
 control point list, homogeneous coordinates (x,y,z,w)
Real kfront
 original knot value range (defined by IGES import)
Real kback
Real tstart
 define knot region mapped by [0,1]
Real tend

Additional Inherited Members

- Static Public Member Functions inherited from AbstractCurve
static AbstractCurvePtr createFromXml (const XmlElement &xe)
 create curve from any xml representation
static AbstractCurvePtr createFromIges (const IgesFile &file, const IgesDirEntry &entry)
 create curve from IGES entity
static void gridFromKnots (uint n, const Vector &kts, Vector &t, Real tstart=0.0, Real tend=1.0)
 discretization from spline knot vector
static uint arclenParamet (const AbstractCurveArray &cpa, Vector &vp)
 Parametrization of curve sets. More...
- Protected Attributes inherited from AbstractCurve
std::string ids
 curve object name
- Protected Attributes inherited from RFrame
SMatrix< 4, 4 > mat

The documentation for this class was generated from the following files:
Generated on Fri Dec 2 2022 03:03:16 for libsurf by   doxygen 1.8.5