FUNCTION constraints_param_b_spline

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP214
-- DIFF IN AP203e2
-- DIFF IN AP238 STEP-NC
-- DIFF IN AP224
-- DIFF IN AP232
FUNCTION constraints_param_b_spline
      (degree : INTEGER;
       up_knots : INTEGER;
       up_cp : INTEGER;
       knot_mult : LIST [0:?] OF INTEGER;
       knots : LIST [0:?] OF parameter_value ) : BOOLEAN;
   LOCAL
      result : BOOLEAN := FALSE;
      k : INTEGER;
      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:
DefinitionType
 b_spline_curve_with_knots ENTITY
 b_spline_surface_with_knots ENTITY
 b_spline_volume_with_knots ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00