FUNCTION constraints_param_local_b_spline

(* SCHEMA step_merged_ap_schema; *)
-- IN AP238 STEP-NC/AP242
FUNCTION constraints_param_local_b_spline
      (degree : INTEGER;
       knot_mult : LIST OF INTEGER;
       knots : LIST OF INTEGER ) : BOOLEAN;
   LOCAL
      result : BOOLEAN := TRUE;
      k : INTEGER;
      up_knots : INTEGER;
      sum : INTEGER;
   END_LOCAL;
      up_knots := SIZEOF(knots);
      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 (sum <> degree + 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;
      IF knots[1] < 1 THEN
         result := FALSE;
      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_local_b_spline is references by the following definitions:
DefinitionType
 local_b_spline ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00