void NurbsCurveSP<T,N>::updateMaxU() { if(deg_>3) { #ifdef USE_EXCEPTION throw NurbsInputError(); #else Error error("NurbsCurveSP") ; error << "This class can't handle a curve of degree 4 or higher.\n" ; error.fatal() ; #endif } else { maxU.resize(P.n()) ; maxAt_.resize(P.n()) ; for(int i=0; i<P.n(); ++i) { if(!maxInfluence(i,U,deg_,maxAt_[i])) cerr << "Problem in maxInfluence U!\n" ; if(i>0) if(maxAt_[i]<maxAt_[i-1]) { #ifdef USE_EXCEPTION throw NurbsError(); #else Error error("Error updating maxU"); error << "HUGE ERROR!\n" ; error << "Knot = " << U << endl ; error << " i = " << i << endl ; error << " deg = " << deg_ << endl ; error.fatal() ; #endif } maxU[i] = basisFun(maxAt_[i],i,deg_) ; } } }
void NurbsSurfaceSP<T,N>::updateMaxV() { if(this->degV>3){ #ifdef USE_EXCEPTION throw NurbsInputError(); #else Error error("NurbsSurfaceSP<T,N>::updateMaxV()") ; error << "This class doesn't support surfaces having a degree of 4 and higher.\n" ; error.fatal() ; #endif } else{ maxV.resize(this->P.cols()) ; maxAtV_.resize(this->P.cols()) ; for(int i=0;i<this->P.cols();++i){ if(!maxInfluence(i,this->V,this->degV,maxAtV_[i])) cerr << "Problem in maxInfluence V!\n" ; maxV[i] = nurbsBasisFun(maxAtV_[i],i,this->degV,this->V) ; } } }