fixed angle obtuse angle bug
This commit is contained in:
parent
b3925bbbe4
commit
3a282494d6
@ -30,7 +30,7 @@ export async function drawDimension() {
|
|||||||
|
|
||||||
constraint = [
|
constraint = [
|
||||||
'angle', dimVal,
|
'angle', dimVal,
|
||||||
[-1, -1, selection[0].name, selection[1].name]
|
[-1, -1, selection[0].name, selection[1].name], 0
|
||||||
]
|
]
|
||||||
|
|
||||||
dimType = 'a'
|
dimType = 'a'
|
||||||
|
@ -32,7 +32,7 @@ export function onHover(e) {
|
|||||||
|
|
||||||
let idx = []
|
let idx = []
|
||||||
|
|
||||||
const thresh = this.snap ? 1 : 0.0001
|
const thresh = 0.0001
|
||||||
if (hoverPts.length) {
|
if (hoverPts.length) {
|
||||||
let minDist = Infinity;
|
let minDist = Infinity;
|
||||||
for (let i = 0; i < hoverPts.length; i++) {
|
for (let i = 0; i < hoverPts.length; i++) {
|
||||||
|
@ -96,7 +96,7 @@ export const Dialog = () => {
|
|||||||
switch (dialog.action) {
|
switch (dialog.action) {
|
||||||
case 'extrude':
|
case 'extrude':
|
||||||
return <>
|
return <>
|
||||||
<input className='w-10 border-t-0 border-l-0 border-r-0 border-b border-gray-50 text-gray-50' type="number" defaultValue="1" step="0.1" ref={ref} />
|
<input className='w-10 border-t-0 border-l-0 border-r-0 border-b border-gray-50 text-gray-50' type="number" defaultValue="10" step="0.1" ref={ref} />
|
||||||
<Icon.Flip className="btn text-gray-200 w-auto h-full p-3.5"
|
<Icon.Flip className="btn text-gray-200 w-auto h-full p-3.5"
|
||||||
onClick={() => ref.current.value *= -1}
|
onClick={() => ref.current.value *= -1}
|
||||||
/>
|
/>
|
||||||
|
@ -216,13 +216,13 @@ const fragmentShader = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
const pixelRatio = 2
|
const sz = 4
|
||||||
const custPtMat = new THREE.ShaderMaterial({
|
const custPtMat = new THREE.ShaderMaterial({
|
||||||
uniforms: {
|
uniforms: {
|
||||||
color: { value: new THREE.Color(0xff0000) },
|
color: { value: new THREE.Color(0xff0000) },
|
||||||
edgeColor: { value: new THREE.Color(0x990000) },
|
edgeColor: { value: new THREE.Color(0x770000) },
|
||||||
pointWidth: { value: 4 * pixelRatio },
|
pointWidth: { value: sz },
|
||||||
edgeSize: { value: 4 * pixelRatio },
|
edgeSize: { value: sz },
|
||||||
},
|
},
|
||||||
vertexShader,
|
vertexShader,
|
||||||
fragmentShader,
|
fragmentShader,
|
||||||
|
Loading…
Reference in New Issue
Block a user