Rhino C++ API  8.6
Public Member Functions | Public Attributes | List of all members
ON_PeriodicDomain Class Reference

#include <opennurbs_point.h>

Public Member Functions

 ON_PeriodicDomain ()=default
 
 ON_PeriodicDomain (const ON_Interval dom[2], const bool closed[2], double normband=1.0/3.0)
 
void Initialize (const ON_Interval dom[2], const bool closed[2], double normband=1.0/3.0)
 
ON_2dPoint LiftInverse (ON_2dPoint p)
 The projection from covering space back to domain. LiftInverse(LiftToCover(p))==p. More...
 
ON_2dPoint LiftToCover (ON_2dPoint Pin, bool stealth=false)
 

Public Attributes

bool m_closed [2] = {}
 
ON_Interval m_dom [2]
 
double m_normband = ON_DBL_QNAN
 

Detailed Description

ON_PeriodicDomain is a helper class for dealing with closed or periodic surfaces using the idea of a covering space.

If a surface is closed in the u-direction (or v respectively), a curve on the surface that crosses the seam will not have a continuous pull back to parameter space. However, if we extend the surface domain in the u-coordinates and allow the surface to cover itself periodicly, i.e S(u,v) = S(u + T, v) with period T, then we can pull back the curve to the domain covering space (-inf,inf) x dom[1].

Constructor & Destructor Documentation

◆ ON_PeriodicDomain() [1/2]

ON_PeriodicDomain::ON_PeriodicDomain ( )
default

◆ ON_PeriodicDomain() [2/2]

ON_PeriodicDomain::ON_PeriodicDomain ( const ON_Interval  dom[2],
const bool  closed[2],
double  normband = 1.0/3.0 
)

Member Function Documentation

◆ Initialize()

void ON_PeriodicDomain::Initialize ( const ON_Interval  dom[2],
const bool  closed[2],
double  normband = 1.0/3.0 
)

◆ LiftInverse()

ON_2dPoint ON_PeriodicDomain::LiftInverse ( ON_2dPoint  p)

The projection from covering space back to domain. LiftInverse(LiftToCover(p))==p.

◆ LiftToCover()

ON_2dPoint ON_PeriodicDomain::LiftToCover ( ON_2dPoint  Pin,
bool  stealth = false 
)

Construction or Initialization Parameters: dom -[in] surface domain closed -[in] closed[0] is true if the surface is closed in u direction (similarly for 1 and v) Use ON_IsG1Closed(...) to test for G1-closed surfaces. normband - [in] 0<normband<.5 is a normalized coordinate defining a band on each side of the seam. The bands are {(u,v): dom[0].NormalizedParameterAt(u)< normband } and {(u,v): dom[0].NormalizedParameterAt(u)> 1.0 - normband } The point sequence crosses the seam if consecutive points are in opposite bands along the seam. Repeatedly call LiftToCover( Pin) with Pin in the domain covering space. The resulting output sequence will be lifted to the domain covering space, and will be 'continuous' in that consecutive points will be in the same or an adjacent band. Use stealth=true to lift this point without affecting the state, this allows one to compute a trial end of sequence.
see also ON_LiftToCover(...).

Member Data Documentation

◆ m_closed

bool ON_PeriodicDomain::m_closed[2] = {}

◆ m_dom

ON_Interval ON_PeriodicDomain::m_dom[2]

◆ m_normband

double ON_PeriodicDomain::m_normband = ON_DBL_QNAN