nurbs curve serialization

This commit is contained in:
Val Erastov 2018-05-01 02:46:26 -07:00
parent bfbde56b00
commit 598759e8f0

View file

@ -64,4 +64,13 @@ export default class NurbsCurve {
split.forEach(n => ext.normalizeCurveParametrization(n));
return split.map(c => new NurbsCurve(new verb.geom.NurbsCurve(c)));
}
serialize() {
return {
degree: this.verb.degree(),
knots: this.verb.knots(),
cp: this.verb.controlPoints(),
weights: this.verb.weights()
}
}
}