mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-12 19:32:37 +01:00
74 lines
1.9 KiB
JavaScript
74 lines
1.9 KiB
JavaScript
|
|
export class Surface {
|
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------
|
|
|
|
classifyCognateCurve(curve, tol) {
|
|
throw 'not implemented';
|
|
}
|
|
|
|
classifyCurve(curve, tol) {
|
|
if (this.isCognateCurve(curve)) {
|
|
return this.classifyCognateCurve(curve, tol)
|
|
}
|
|
return this.toNurbs().classifyCognateCurve(curve.toNurbs(), tol);
|
|
};
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------
|
|
|
|
intersectForSameClass() {
|
|
throw 'not implemented';
|
|
}
|
|
|
|
intersect(other, tol) {
|
|
if (this.isSameClass(other)) {
|
|
return this.intersectForSameClass(other, tol)
|
|
}
|
|
return this.toNurbs().intersectForSameClass(other.toNurbs(), tol);
|
|
};
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------
|
|
|
|
coplanarUnsignedForSameClass(other, tol) {
|
|
throw 'not implemented';
|
|
}
|
|
|
|
coplanarUnsigned(other, tol) {
|
|
if (this.isSameClass(other)) {
|
|
return this.coplanarUnsignedForSameClass(other, tol)
|
|
}
|
|
return this.toNurbs().coplanarUnsignedForSameClass(other.toNurbs());
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------
|
|
|
|
equalsForSameClass(other, tol) {
|
|
throw 'not implemented';
|
|
}
|
|
|
|
equals(other, tol) {
|
|
if (this.isSameClass(other)) {
|
|
return this.equalsForSameClass(other, tol)
|
|
}
|
|
return this.toNurbs().equalsForSameClass(other.toNurbs());
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------
|
|
|
|
toNurbs() {
|
|
throw 'not implemented';
|
|
}
|
|
|
|
isSameClass(other) {
|
|
return this.constructor.name == other.constructor.name;
|
|
}
|
|
|
|
isCognateCurve(curve) {
|
|
return false;
|
|
}
|
|
}
|
|
Surface.prototype.isPlane = false;
|