libsurf
Programmer's Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AbstractCurve Class Referenceabstract

Detailed Description

Base class for all curve objects.

AbstractCurve is the base class for all curve objects. The most important child class is Curve, which represents a cubic spline curve.

#include <abstractcurve.h>

Inheritance diagram for AbstractCurve:
[legend]
Collaboration diagram for AbstractCurve:
[legend]

Public Member Functions

 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 AbstractCurveclone () const =0
 create a clone
 
virtual Vct3 eval (Real t) const =0
 evaluate spline curve
 
virtual Vct3 derive (Real t, uint k) const =0
 compute kth derivative
 
virtual void apply ()=0
 apply hard transformation
 
virtual void tgline (Real t, Vct3 &c, Vct3 &dc) const
 compute point and first derivative in one sweep
 
virtual Real curvature (Real t) const
 compute curvature at t
 
virtual void initGrid (Vector &t) const
 generate a reasonable discretization
 
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
 
virtual XmlElement toXml (bool share=false) const
 XML output.
 
virtual void fromXml (const XmlElement &xe)
 XML input.
 
virtual int toIges (IgesFile &file, int tfi=0) const
 write curve to iges file
 
virtual bool fromIges (const IgesFile &file, const IgesDirEntry &dir)
 extract curve from iges file
 
- 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
 

Static Public Member Functions

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 Member Functions

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
 

Protected Attributes

std::string ids
 curve object name
 
- Protected Attributes inherited from RFrame
SMatrix< 4, 4 > mat
 

Member Function Documentation

uint AbstractCurve::arclenParamet ( const AbstractCurveArray &  cpa,
Vector &  vp 
)
static

Parametrization of curve sets.

Compute the arc-length parametrization of a set of curves. Returns the number of curves which end up on the same position as their predecessor.

void AbstractCurve::setIgesName ( const IgesFile file,
const IgesEntity e 
)
protected

find curves that fit together and create a composite curve, decimate list

extract name from IGES entry, if any


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