add drill as tool type
This commit is contained in:
parent
591df6dc98
commit
15aad5a7df
3 changed files with 29 additions and 10 deletions
|
|
@ -67,11 +67,11 @@ class Tool {
|
|||
}
|
||||
|
||||
traceOffset() {
|
||||
return (this.isTaperMill() ? this.tipDiameter() : this.fluteDiameter()) / 2;
|
||||
return (this.hasTaper() ? this.tipDiameter() : this.fluteDiameter()) / 2;
|
||||
}
|
||||
|
||||
contourOffset(step) {
|
||||
const diam = Math.min(this.isTaperMill() ? this.tipDiameter() : this.fluteDiameter());
|
||||
const diam = Math.min(this.hasTaper() ? this.tipDiameter() : this.fluteDiameter());
|
||||
return diam ? diam * step : step;
|
||||
}
|
||||
|
||||
|
|
@ -100,10 +100,18 @@ class Tool {
|
|||
return this.tool.type === "tapermill";
|
||||
}
|
||||
|
||||
isDrill(){
|
||||
return this.tool.type === "drill";
|
||||
}
|
||||
|
||||
hasTaper() {
|
||||
return this.isTaperMill() || this.isDrill();
|
||||
}
|
||||
|
||||
generateProfile(resolution) {
|
||||
// generate tool profile
|
||||
let ball = this.isBallMill(),
|
||||
taper = this.isTaperMill(),
|
||||
taper = this.isTaperMill() || this.isDrill(),
|
||||
tip_diameter = this.tipDiameter(),
|
||||
shaft_offset = this.fluteLength(),
|
||||
flute_diameter = this.fluteDiameter(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue