ON_OffsetSurfaceFunction Class Reference

#include <opennurbs_offsetsurface.h>

Public Member Functions

 ON_OffsetSurfaceFunction ()
 
 ~ON_OffsetSurfaceFunction ()
 
const ON_SurfaceBaseSurface () const
 
void Destroy ()
 Resets this class if you want to reuse it. More...
 
double DistanceAt (double s, double t) const
 Value of the offset distance at any surface parameter. More...
 
bool EvaluateDistance (double s, double t, int num_der, double *value) const
 Value of the offset distance at any surface parameter. More...
 
double OffsetDistance (int i) const
 
int OffsetPointCount () const
 
ON_2dPoint OffsetSurfaceParameter (int i) const
 
ON_3dPoint PointAt (double s, double t) const
 Value of the offset function at any surface parameter. More...
 
bool SetBaseSurface (const ON_Surface *srf)
 Sets base surface for the offset function. More...
 
bool SetDistance (int index, double distance)
 Set the offset distance for an existing point More...
 
bool SetOffsetPoint (double s, double t, double distance, double radius=0.0)
 Sets the offset distance at a point. Call this function once for each point wher the user specifies an offset. More...
 
bool SetPoint (int index, double s, double t)
 Sets the surface parameters of an existing offset point. More...
 
bool SetSideTangency (int side, bool bEnable)
 Use set SetSideTangency if you want the offset surface and base surface to have the same unit normals along a side of the surfaces's parameter spaces. More...
 
bool SideTangency (int side) const
 

Friends

class ON_OffsetSurface
 

Constructor & Destructor Documentation

◆ ON_OffsetSurfaceFunction()

ON_OffsetSurfaceFunction::ON_OffsetSurfaceFunction ( )

◆ ~ON_OffsetSurfaceFunction()

ON_OffsetSurfaceFunction::~ON_OffsetSurfaceFunction ( )

Member Function Documentation

◆ BaseSurface()

const ON_Surface* ON_OffsetSurfaceFunction::BaseSurface ( ) const
Returns
Base surface specified SetBaseSurface().

◆ Destroy()

void ON_OffsetSurfaceFunction::Destroy ( )

Resets this class if you want to reuse it.

◆ DistanceAt()

double ON_OffsetSurfaceFunction::DistanceAt ( double  s,
double  t 
) const

Value of the offset distance at any surface parameter.

Parameters
s[in]
t[in] (s,t) is a base surface evaluation parameter
Returns
offset distance at the surface parameter

◆ EvaluateDistance()

bool ON_OffsetSurfaceFunction::EvaluateDistance ( double  s,
double  t,
int  num_der,
double *  value 
) const

Value of the offset distance at any surface parameter.

Parameters
s[in]
t[in] (s,t) is a base surface evaluation parameter
num_der[in] number of derivatives
value[out] value and derivatives of distance function value[0] = distance, value[1] = 1rst derivative, value[2] = 2nd derivative, ...
Returns
True if successful

◆ OffsetDistance()

double ON_OffsetSurfaceFunction::OffsetDistance ( int  i) const
Parameters
i[in] an index >= 0 and < OffsetPointCount()
Returns
Offset distance specified using SetOffsetPoint().

◆ OffsetPointCount()

int ON_OffsetSurfaceFunction::OffsetPointCount ( ) const
Returns
Number of points specified using SetOffsetPoint().

◆ OffsetSurfaceParameter()

ON_2dPoint ON_OffsetSurfaceFunction::OffsetSurfaceParameter ( int  i) const
Parameters
i[in] an index >= 0 and < OffsetPointCount()
Returns
Surface parameter specified using SetOffsetPoint().

◆ PointAt()

ON_3dPoint ON_OffsetSurfaceFunction::PointAt ( double  s,
double  t 
) const

Value of the offset function at any surface parameter.

Parameters
s[in]
t[in] (s,t) is a base surface evaluation parameter
Returns
Point on the offset surface.

◆ SetBaseSurface()

bool ON_OffsetSurfaceFunction::SetBaseSurface ( const ON_Surface srf)

Sets base surface for the offset function.

Parameters
srf[in] pointer to the base surface. This surface must remain valid while the ON_OffsetSurfaceFunction class is used.
Returns
True if successful.

◆ SetDistance()

bool ON_OffsetSurfaceFunction::SetDistance ( int  index,
double  distance 
)

Set the offset distance for an existing point

Parameters
index[in] index of the point to set
distance[in] new distance

◆ SetOffsetPoint()

bool ON_OffsetSurfaceFunction::SetOffsetPoint ( double  s,
double  t,
double  distance,
double  radius = 0.0 
)

Sets the offset distance at a point. Call this function once for each point wher the user specifies an offset.

Parameters
s[in]
t[in] (s,t) is a base surface evaluation parameter
distance[in] distance is the offset distance.
radius[in] if radius>0, then this value will be the the approximate radius of the offset "bump".

◆ SetPoint()

bool ON_OffsetSurfaceFunction::SetPoint ( int  index,
double  s,
double  t 
)

Sets the surface parameters of an existing offset point.

Parameters
index[in] index of the point to set
s[in]
t[in] (s,t) is a base surface evaluation parameter

◆ SetSideTangency()

bool ON_OffsetSurfaceFunction::SetSideTangency ( int  side,
bool  bEnable 
)

Use set SetSideTangency if you want the offset surface and base surface to have the same unit normals along a side of the surfaces's parameter spaces.

Parameters
side[in] 0 = south side 1 = east side 2 = north side 3 = west side
bEnable[in] true to enable tangency, false to disable tangency
Returns
True if successful.

◆ SideTangency()

bool ON_OffsetSurfaceFunction::SideTangency ( int  side) const
Parameters
side[in] 0 = south side 1 = east side 2 = north side 3 = west side
Returns
True if side tangency is enabled.

Friends And Related Function Documentation

◆ ON_OffsetSurface

friend class ON_OffsetSurface
friend