mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 02:13:58 +01:00
nurbs curve serialization
This commit is contained in:
parent
bfbde56b00
commit
598759e8f0
1 changed files with 9 additions and 0 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue