mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
fix operation representation
This commit is contained in:
parent
b6560e193c
commit
8c05990e8d
1 changed files with 6 additions and 2 deletions
|
|
@ -3,13 +3,13 @@ import * as math from '../math/math'
|
||||||
export const CUT = {
|
export const CUT = {
|
||||||
icon: 'img/3d/cut',
|
icon: 'img/3d/cut',
|
||||||
label: 'Cut',
|
label: 'Cut',
|
||||||
info: (p) => '(' + math.norm2(p.target) + ')'
|
info: (p) => '(' + r(math.norm2(p.target)) + ')'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PAD = {
|
export const PAD = {
|
||||||
icon: 'img/3d/extrude',
|
icon: 'img/3d/extrude',
|
||||||
label: 'Extrude',
|
label: 'Extrude',
|
||||||
info: (p) => '(' + math.norm2(p.target) + ')'
|
info: (p) => '(' + r(math.norm2(p.target)) + ')'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SHELL = {
|
export const SHELL = {
|
||||||
|
|
@ -53,3 +53,7 @@ export const UNION = {
|
||||||
label: 'Union',
|
label: 'Union',
|
||||||
info: (p) => null
|
info: (p) => null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function r(value) {
|
||||||
|
return value.toPrecision(4).replace(/\.0$/, '');
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue