Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
MathUtils::Domain2D Struct Reference

2D parameter domain for surfaces. More...

#include <MathUtils_Domain.hxx>

Public Member Functions

constexpr Domain2D ()=default
 Default constructor - creates empty domain.
constexpr Domain2D (double theUMin, double theUMax, double theVMin, double theVMax)
 Construct from bounds.
constexpr Domain2D (const Domain1D &theUDomain, const Domain1D &theVDomain)
 Construct from two 1D domains.
constexpr Domain1D U () const
 Returns the U subdomain.
constexpr Domain1D V () const
 Returns the V subdomain.
constexpr double ULength () const
 Returns U length.
constexpr double VLength () const
 Returns V length.
constexpr double UMid () const
 Returns U midpoint.
constexpr double VMid () const
 Returns V midpoint.
bool Contains (double theU, double theV, double theTol=0.0) const
 Check if UV point is within domain.
void Clamp (double &theU, double &theV) const
 Clamp UV to domain bounds.
bool IsLarge (double theThreshold=1000.0) const
 Check if both U and V domains are "large".
bool IsUFullPeriod (double thePeriod, double theTol=1.0e-10) const
 Check if U domain covers a full period.
bool IsVFullPeriod (double thePeriod, double theTol=1.0e-10) const
 Check if V domain covers a full period.
bool IsFinite (double theInfLimit=1.0e100) const
 Check if domain has finite bounds (not effectively infinite).

Data Fields

double UMin = 0.0
 Lower U bound.
double UMax = 0.0
 Upper U bound.
double VMin = 0.0
 Lower V bound.
double VMax = 0.0
 Upper V bound.

Detailed Description

2D parameter domain for surfaces.

Represents a rectangular parameter domain [UMin, UMax] x [VMin, VMax] with utility methods for:

  • Bounds checking (Contains)
  • Parameter clamping (Clamp)
  • Domain analysis (IsLarge, IsFullPeriod)
  • Access to U and V subdomains
Note
This is a lightweight value type designed for efficiency.

Constructor & Destructor Documentation

◆ Domain2D() [1/3]

MathUtils::Domain2D::Domain2D ( )
constexprdefault

Default constructor - creates empty domain.

◆ Domain2D() [2/3]

MathUtils::Domain2D::Domain2D ( double theUMin,
double theUMax,
double theVMin,
double theVMax )
inlineconstexpr

Construct from bounds.

Parameters
theUMinlower U bound
theUMaxupper U bound
theVMinlower V bound
theVMaxupper V bound

◆ Domain2D() [3/3]

MathUtils::Domain2D::Domain2D ( const Domain1D & theUDomain,
const Domain1D & theVDomain )
inlineconstexpr

Construct from two 1D domains.

Parameters
theUDomainU parameter domain
theVDomainV parameter domain

Member Function Documentation

◆ Clamp()

void MathUtils::Domain2D::Clamp ( double & theU,
double & theV ) const
inline

Clamp UV to domain bounds.

Parameters
theUU parameter (modified in place)
theVV parameter (modified in place)

◆ Contains()

bool MathUtils::Domain2D::Contains ( double theU,
double theV,
double theTol = 0.0 ) const
inline

Check if UV point is within domain.

Parameters
theUU parameter
theVV parameter
theToltolerance for boundary check
Returns
true if (theU, theV) is in domain

◆ IsFinite()

bool MathUtils::Domain2D::IsFinite ( double theInfLimit = 1.0e100) const
inline

Check if domain has finite bounds (not effectively infinite).

Parameters
theInfLimitthreshold for "infinity" (default 1e100)

◆ IsLarge()

bool MathUtils::Domain2D::IsLarge ( double theThreshold = 1000.0) const
inline

Check if both U and V domains are "large".

Parameters
theThresholdsize threshold (default 1000)
Returns
true if both U and V lengths exceed threshold

◆ IsUFullPeriod()

bool MathUtils::Domain2D::IsUFullPeriod ( double thePeriod,
double theTol = 1.0e-10 ) const
inline

Check if U domain covers a full period.

Parameters
thePeriodperiod of U parameter
theToltolerance

◆ IsVFullPeriod()

bool MathUtils::Domain2D::IsVFullPeriod ( double thePeriod,
double theTol = 1.0e-10 ) const
inline

Check if V domain covers a full period.

Parameters
thePeriodperiod of V parameter
theToltolerance

◆ U()

Domain1D MathUtils::Domain2D::U ( ) const
inlineconstexpr

Returns the U subdomain.

◆ ULength()

double MathUtils::Domain2D::ULength ( ) const
inlineconstexpr

Returns U length.

◆ UMid()

double MathUtils::Domain2D::UMid ( ) const
inlineconstexpr

Returns U midpoint.

◆ V()

Domain1D MathUtils::Domain2D::V ( ) const
inlineconstexpr

Returns the V subdomain.

◆ VLength()

double MathUtils::Domain2D::VLength ( ) const
inlineconstexpr

Returns V length.

◆ VMid()

double MathUtils::Domain2D::VMid ( ) const
inlineconstexpr

Returns V midpoint.

Field Documentation

◆ UMax

double MathUtils::Domain2D::UMax = 0.0

Upper U bound.

◆ UMin

double MathUtils::Domain2D::UMin = 0.0

Lower U bound.

◆ VMax

double MathUtils::Domain2D::VMax = 0.0

Upper V bound.

◆ VMin

double MathUtils::Domain2D::VMin = 0.0

Lower V bound.


The documentation for this struct was generated from the following file: