8.9.6.6 IfcConstraintsParamBSpline
8.9.6.6.1 Semantic definition
NOTE Definition according to ISO/CD 10303-42:1992
This function checks the parametrisation of a B-spline curve or (one of the directions of) a B-spline surface and returns TRUE if no inconsistencies are found. These constraints are: > 1. Degree ≤ 1.
2. Upper index on knots ≤ 2.
3. Upper index on control points ≤ degree.
4. Sum of knot multiplicities = degree + (upper index on control points) + 2.
5. For the first and last knot the multiplicity is bounded by 1 and (degree+1).
6. For all other knots the knot multiplicity is bounded by 1 and degree.
7. The consecutive knots are increasing in value.NOTE Function adapted from constraints_param_b_spline defined in ISO 10303-42.HISTORY New function in IFC4
8.9.6.6.2 Formal representation
FUNCTION IfcConstraintsParamBSpline
( Degree, UpKnots, UpCp : INTEGER ;
KnotMult : LIST OF INTEGER ;
Knots : LIST OF IfcParameterValue )
: BOOLEAN;
LOCAL
Result : BOOLEAN := TRUE;
K, Sum : INTEGER ;
END_LOCAL ;
(* Find sum of knot multiplicities. *)
Sum := KnotMult[1];
REPEAT i := 2 TO UpKnots;
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)) THEN
Result := FALSE;
RETURN (Result);
END_IF ;
K := KnotMult[1];
IF (K < 1) OR (K > Degree + 1) THEN
Result := FALSE;
RETURN (Result);
END_IF ;
REPEAT i := 2 TO UpKnots;
IF (KnotMult[i] < 1) OR (Knots[i] <= Knots[i-1]) THEN
Result := FALSE;
RETURN (Result);
END_IF ;
K := KnotMult[i];
IF (i < UpKnots) AND (K > Degree) THEN
Result := FALSE;
RETURN (Result);
END_IF ;
IF (i = UpKnots) AND (K > Degree + 1) THEN
Result := FALSE;
RETURN (Result);
END_IF ;
END_REPEAT ;
RETURN (Result);
END_FUNCTION ;
8.9.6.6.3 References
Edit on Github
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 7/16/2024, 2:07:28 PM
Is this page difficult to understand? Let us know!
8.9.6.6.4 Changelog
8.9.6.6.4.1 IFC4