FUNCTION constraints_param_b_spline
(* SCHEMA feature_based_process_planning; *)
FUNCTION constraints_param_b_spline(
degree, up_knots, up_cp: INTEGER;
knot_mult: LIST OF INTEGER;
knots: LIST OF parameter_value
): BOOLEAN;
LOCAL
k : INTEGER;
sum : INTEGER;
result : BOOLEAN := TRUE;
END_LOCAL;
sum := knot_mult[1];
REPEAT i := 2 TO up_knots BY 1;
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 BY 1;
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; -- constraints_param_b_spline
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:18:01-04:00