Programmer's Documentation

Public Member Functions | Public Attributes | List of all members
IgesSplineCurve Class Reference

Detailed Description

IGES 126 : Rational spline curve.

This class represents general rational spline curves (NURBS curves) in IGES files. Note that some CAD systems misuse this object to write plain lines (which should really be entity type 110) without setting the corresponding form attribute in the directory entry.

Spec : IGES 5.3 page 152

The rational B-spline curve may represent analytic curves of general interest. This information is important to both the sending and receiving systems. The Directory Entry Form Number Parameter is provided to communicate this information. For a brief description and a precise definition of rational B-spline curves, see Appendix B.

If the rational B-spline curve represents a preferred curve type, the form number corresponds to the ECO630 most preferred type. The preference order is from 1 through 5, followed by 0 For example, if the curve is a circle or circular arc, the form number shall be set to 2. If the curve is an ellipse with unequal major and minor axis lengths, the form number shall be set to 3. If the curve is not one of the preferred types, the form number shall be set to 0.

If the curve lies entirely within a unique plane, the planar flag (PROP1) shall be set to 1; otherwise it shall be set to 0 If it is set to 1, the plane normal (Parameters 14+A+4*K through 16+A+4*K) shall contain a unit vector normal to the plane containing the curve. These fields shall exist but are ignored if the curve is non-planar.

If the beginning and ending points on the curve, as defined by evaluating the curve at the starting and ending parameter values (i.e., V(0) and V(l)), are coincident, the curve is closed and PROP2 shall be set to 1. If they are not coincident, PROP2 shall be set to 0.

If the curve is rational (does not have all weights equal), PROP3 shall be set to 0 If all weights are ECO630 equal to each other, the curve is polynomial and PROP3 shall be set to 1. The curve is polynomial since in this case all weights cancel and the denominator reduces to one. (See Appendix B.) The weights shall be positive real numbers.

If the curve is periodic with respect to its parametric variable, PROP4 shall be set to 1; otherwise, PROP4 shall be set to 0 The periodic flag is to be interpreted as purely informational; the curves which are flagged to be periodic are to be evaluated exactly the same as in the non-periodic case.

Note that the control points are in the definition space of the curve.

See Also
IgesEntity, IgesFile

#include <iges126.h>

Inheritance diagram for IgesSplineCurve:
Collaboration diagram for IgesSplineCurve:

Public Member Functions

 IgesSplineCurve ()
 create undefined
void setup (int ncp, int degree, const double kts[], const double cp[])
 pass data for polynomial spline curve
void setup (int ncp, int degree, const double kts[], const double wgt[], const double cp[])
 pass data for rational spline curve
void flagClosed (bool f)
 change closed flag
const Vector & knotVector () const
 access knot vector
const PointList< 3 > & ctrlPoints () const
 access control points
bool isPolynomial () const
 is curve polynomial?
int degree () const
void definition (IgesFile &file)
 assemble definition
uint parse (const std::string &pds, const Indices &vpos)
 parse entity data
- Public Member Functions inherited from IgesEntity
 IgesEntity (int ety)
 create entity type etype
virtual ~IgesEntity ()
int etype () const
 entity type
int classOf () const
 entity class identifier
void form (int f)
 access the form field of the directory entry
void blank (int b)
 access status field: blank (0/1)
void subswitch (int b)
 access status field: subordinate switch (0-3)
void useflag (int b)
 access status field: use flag (0-6)
void hierarchy (int b)
 access status field: hierachy flag (0-2)
void trafoMatrix (int tfi)
 access transformation matrix field
int trafoMatrix ()
 access transformation matrix field
void label (const char *s)
 set entity label (use only 8 characters)
std::string label () const
 return label, if present
void subscript (int s)
 set entity subscript
void addNoteRef (int ide)
 add reference to assoc/note DE
void addPropRef (int ide)
 add reference to property/attribute table DE
uint pindex () const
 parameter data index
uint nNoteRef () const
 number of notes
uint nPropRef () const
 number of property references
int noteRef (uint k) const
 access note reference k
int propRef (uint k) const
 access property reference k
int append (IgesFile &igfile)
 append entity to file
bool retrieve (const IgesFile &igfile)
 retrieve entity from file

Public Attributes

Vector knots
 pointers to knots, weights and control points
Vector weights
PointList< 3, double > cpoints
 control points
int k
 number of control points minus one, degree
int m
int nknots
int planar
 shape flags
int closed
int polynomial
int periodic
Vct3 nrm
 unit normal if curve is planar
Real ustart
 starting and ending parameter value
Real uend

Additional Inherited Members

- Public Types inherited from IgesEntity
enum  IgesEntityClass {
  NoClass = 0, PointClass = 1, LineClass = 2, CurveClass = 4,
  SurfaceClass = 8, StructureClass = 16, AnyClass = 31
- Static Public Member Functions inherited from IgesEntity
static IgesEntitycreate (const IgesDirEntry &e)
 generate a new entity from code, return zero if not implemented
template<class EType >
static bool as (const IgesEntityPtr &ep, EType &t)
 convenience function
static int classOf (int etype)
 identity class of entity number
- Static Protected Member Functions inherited from IgesEntity
static int asInt (const char *s, int k)
 convenience conversion function
static double asDouble (const char *s, int k)
 convenience conversion function
- Protected Attributes inherited from IgesEntity
IgesDirEntry entry
 directory entry
int plcpre
 line counts in parameter section
int plcpost
std::vector< int > addprop1
 additional properties (two groups)
std::vector< int > addprop2

The documentation for this class was generated from the following files:
Generated on Mon Jan 24 2022 03:03:18 for libsurf by   doxygen 1.8.5