FUNCTIONIfcConstraintsParamBSpline(Degree,UpKnots,UpCp:INTEGER;KnotMult:LISTOFINTEGER;Knots:LISTOFIfcParameterValue):BOOLEAN;LOCALResult:BOOLEAN:=TRUE;K,Sum:INTEGER;END_LOCAL;(* Find sum of knot multiplicities. *)Sum:=KnotMult[1];REPEATi:=2TOUpKnots;Sum:=Sum+KnotMult[i];END_REPEAT;(* Check limits holding for all B-spline parametrisations *)IF(Degree<1)OR(UpKnots<2)OR(UpCp<Degree)OR(Sum<>(Degree+UpCp+2))THENResult:=FALSE;RETURN(Result);END_IF;K:=KnotMult[1];IF(K<1)OR(K>Degree+1)THENResult:=FALSE;RETURN(Result);END_IF;REPEATi:=2TOUpKnots;IF(KnotMult[i]<1)OR(Knots[i]<=Knots[i-1])THENResult:=FALSE;RETURN(Result);END_IF;K:=KnotMult[i];IF(i<UpKnots)AND(K>Degree)THENResult:=FALSE;RETURN(Result);END_IF;IF(i=UpKnots)AND(K>Degree+1)THENResult:=FALSE;RETURN(Result);END_IF;END_REPEAT;RETURN(Result);END_FUNCTION;
3 contributor(s):
Last change: Improve definition split (#876)
* bring back headers
headers were previously removed by mistake, now bringing them back
* add new lines and rename the tag
add the word 'short' in it
* unify newlines
make exactly one newline before and two after the tag
* resolving typos
Because bringing back headers required to go back in time to previous version, I'm now re-resolving the issues: #861, #860, #856 by ArturTomczak on 2024-07-16T16:07:28+02:00
Is this page difficult to understand? Let us know!