fixed angle obtuse angle bug

master
howard 2021-04-22 20:50:24 -07:00
parent b3925bbbe4
commit 3a282494d6
4 changed files with 7 additions and 7 deletions

View File

@ -30,7 +30,7 @@ export async function drawDimension() {
constraint = [
'angle', dimVal,
[-1, -1, selection[0].name, selection[1].name]
[-1, -1, selection[0].name, selection[1].name], 0
]
dimType = 'a'

View File

@ -32,7 +32,7 @@ export function onHover(e) {
let idx = []
const thresh = this.snap ? 1 : 0.0001
const thresh = 0.0001
if (hoverPts.length) {
let minDist = Infinity;
for (let i = 0; i < hoverPts.length; i++) {

View File

@ -96,7 +96,7 @@ export const Dialog = () => {
switch (dialog.action) {
case 'extrude':
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"
onClick={() => ref.current.value *= -1}
/>

View File

@ -216,13 +216,13 @@ const fragmentShader = `
}
}
`
const pixelRatio = 2
const sz = 4
const custPtMat = new THREE.ShaderMaterial({
uniforms: {
color: { value: new THREE.Color(0xff0000) },
edgeColor: { value: new THREE.Color(0x990000) },
pointWidth: { value: 4 * pixelRatio },
edgeSize: { value: 4 * pixelRatio },
edgeColor: { value: new THREE.Color(0x770000) },
pointWidth: { value: sz },
edgeSize: { value: sz },
},
vertexShader,
fragmentShader,