@numericelements/knot-sequence
Version:
A library for generating and manipulating knot sequences for b-spline curves and surfaces
10 lines (7 loc) • 679 B
JavaScript
import { STRICTLYINCREASINGPERIODICKNOTSEQUENCE } from '../KnotSequenceConstructorInterface.js';
import { StrictlyIncreasingPeriodicKnotSequenceClosedCurve } from '../StrictlyIncreasingPeriodicKnotSequenceClosedCurve.js';
function fromIncreasingPeriodicToStrictlyIncreasingPeriodicKnotSequence(increasingSeq) {
const maxMultOrder = increasingSeq.maxMultiplicityOrder;
return new StrictlyIncreasingPeriodicKnotSequenceClosedCurve(maxMultOrder, { type: STRICTLYINCREASINGPERIODICKNOTSEQUENCE, periodicKnots: increasingSeq.distinctAbscissae(), multiplicities: increasingSeq.multiplicities() });
}
export { fromIncreasingPeriodicToStrictlyIncreasingPeriodicKnotSequence };