FUNCTION constraints_param_b_spline
(* SCHEMA explicit_draughting; *)
FUNCTION constraints_param_b_spline(degree, up_knots, up_cp : INTEGER;
knot_mult : LIST OF INTEGER;
knots : LIST OF parameter_value) : BOOLEAN;
LOCAL
result : BOOLEAN := TRUE;
k,l,sum : INTEGER;
END_LOCAL;
sum := knot_mult[1];
REPEAT i := 2 TO up_knots;
sum := sum + knot_mult[i];
END_REPEAT;
IF (degree < 1) OR (up_knots < 2) OR (up_cp < degree) OR
(sum <> (degree + up_cp + 2)) THEN
result := FALSE;
RETURN(result);
END_IF;
k := knot_mult[1];
IF (k < 1) OR (k > degree + 1) THEN
result := FALSE;
RETURN(result);
END_IF;
REPEAT i := 2 TO up_knots;
IF (knot_mult[i] < 1) OR (knots[i] <= knots[i-1]) THEN
result := FALSE;
RETURN(result);
END_IF;
k := knot_mult[i];
IF (i < up_knots) AND (k > degree) THEN
result := FALSE;
RETURN(result);
END_IF;
IF (i = up_knots) AND (k > degree + 1) THEN
result := FALSE;
RETURN(result);
END_IF;
END_REPEAT;
RETURN(result);
END_FUNCTION;
Referenced By
Defintion constraints_param_b_spline is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:14:03-04:00