mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
37 lines
No EOL
1.2 KiB
TypeScript
37 lines
No EOL
1.2 KiB
TypeScript
import Vector from "math/vector";
|
|
import { FaceTouchAlignConstraint } from "../constraints/faceTouchAlign";
|
|
import { Plane } from '../../../../../modules/geom/impl/plane';
|
|
import { AssemblyDOF, ModificationResponse } from "./assemblyDOF";
|
|
import { ConflictDOF } from './conflictDOF';
|
|
import {EdgeAlignConstraint} from "../constraints/edgeAlign";
|
|
import {Matrix3x4} from "math/matrix";
|
|
|
|
export class PPPPDOF implements AssemblyDOF {
|
|
|
|
plane1: Plane;
|
|
plane2: Plane;
|
|
description = 'plane to plane twice';
|
|
|
|
constructor(plane1: Plane, plane2: Plane) {
|
|
this.plane1 = plane1;
|
|
this.plane2 = plane2;
|
|
}
|
|
|
|
rotate(axis: Vector, angle: number, location: Matrix3x4, strict: boolean): ModificationResponse {
|
|
return ModificationResponse.REJECTED;
|
|
}
|
|
|
|
translate(dir: Vector, location: Matrix3x4, strict: boolean): ModificationResponse {
|
|
return ModificationResponse.REJECTED;
|
|
}
|
|
|
|
|
|
applyTouchAlign(constr: FaceTouchAlignConstraint): AssemblyDOF {
|
|
return new ConflictDOF(constr, 'plane touch/align constraint cannot be applied when object is at ' + this.description + ' relationship');
|
|
}
|
|
|
|
applyEdgeAlign(constr: EdgeAlignConstraint): AssemblyDOF {
|
|
return this;
|
|
}
|
|
|
|
} |