From 9e71adac79e9988d8bf5d198176f0de54d07d79d Mon Sep 17 00:00:00 2001 From: howard Date: Wed, 21 Apr 2021 04:19:55 -0700 Subject: [PATCH] checkpoint --- src/drawDimension.js | 3 --- src/mouseEvents.js | 11 +++++++++-- todo.txt | 15 ++++----------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/drawDimension.js b/src/drawDimension.js index d911bad..ffb0c0e 100644 --- a/src/drawDimension.js +++ b/src/drawDimension.js @@ -126,8 +126,6 @@ export async function drawDimension() { if (add) { - - if (line.userData.dimType == 'h') { constraint[0] = 'h_dist' constraint[1] = p2.x - p1.x @@ -136,7 +134,6 @@ export async function drawDimension() { constraint[1] = p2.y - p1.y } - this.constraints.set(++this.c_id, constraint) selection[0].userData.constraints.push(this.c_id) diff --git a/src/mouseEvents.js b/src/mouseEvents.js index d4fd2d4..3fa0c72 100644 --- a/src/mouseEvents.js +++ b/src/mouseEvents.js @@ -5,7 +5,8 @@ import { onDimMoveEnd } from './drawDimension' let ptLoc export function onHover(e) { - if (( this.mode && this.mode!='dimension') || e.buttons) return + // if (( this.mode && this.mode!='dimension') || e.buttons) return + if (e.buttons) return raycaster.setFromCamera( new THREE.Vector2( @@ -31,6 +32,7 @@ export function onHover(e) { let idx = [] if (hoverPts.length) { + // console.log(hoverPts) let minDist = Infinity; for (let i = 0; i < hoverPts.length; i++) { if (!hoverPts[i].distanceToRay) continue; @@ -47,6 +49,10 @@ export function onHover(e) { if (!idx.length) { idx.push(0) + // if (idx.length >=2) { + // idx.push(1) + + // } } } @@ -85,6 +91,7 @@ export function onHover(e) { this.hovered.push(obj) } + console.log(this.hovered) // console.log('render1') this.obj3d.dispatchEvent({ type: 'change' }) @@ -121,7 +128,7 @@ export function onPick(e) { let obj = this.hovered[this.hovered.length - 1] // if (sc.selected.includes(obj3d)) continue - if (typeof obj != 'object') { + if (typeof obj != 'object') { // special sketchplace define pts in feature mode const pp = this.selpoints[this.fptIdx % 3 + 1] const p0 = this.selpoints[0] diff --git a/todo.txt b/todo.txt index 896d793..d96df54 100644 --- a/todo.txt +++ b/todo.txt @@ -24,7 +24,7 @@ constraint angle // done button panel cleanup // done 3 pt arc // done -tangent // done to the best of my ability +tangent // done -boolean highlights when hovering over parent why? because they share the same material - should unselect after boolean see above @@ -37,30 +37,23 @@ extrude edit dialog // done file save, stl export// done seperate scene from init logic only init cam and rendere // not an issue , ended up just splicing (1) add download button, different from save button // done +- vertical and horzontal baseline to dimension to / or just smart ordinate dir dimenensing // done -- dimension to origin vs ordinate dimensioninging -- increased design payload handling -unable cancel out of new sketches //fixed seemingly -unable to delete arc // fixed seemingly + +- increased design payload handling -sometimes unable to hit return and change dimensionk hover not clearing sometimes in sketch 0.000 artifact lighting messed up - - - - - - - reattach sketch auto snap -vertical and horzontal baseline to dimension to / or just smart ordinate dir dimenensing highlight button to indicate active mode