Measures support (with toggle button)#819
Conversation
for more information, see https://pre-commit.ci
|
Preview PR at appsharing.space |
|
Integration tests report: appsharing.space |
There was a problem hiding this comment.
Thanks @asmith26, this is awesome work.
However i have some minor comments that can be addressed before merging.
Other than that I notice that when we select an edge - it's a 2D plane instead of a bounding box and any of the x, y or z value is 0. Should we hide that label whichever value is 0?
Refer to this image:
| const material = new THREE.LineDashedMaterial({ | ||
| color: 0x000000, | ||
| linewidth: 1, | ||
| scale: 1, | ||
| dashSize: 0.1, | ||
| gapSize: 0.1 | ||
| }); | ||
| const geometry = new THREE.BufferGeometry().setFromPoints([start, end]); | ||
| const line = new THREE.Line(geometry, material); | ||
| line.computeLineDistances(); | ||
| this._group.add(line); |
There was a problem hiding this comment.
What is the significance of these dashed lines? I ask because I see the measurements working similarly without these too.
There was a problem hiding this comment.
I like the dash lines, actually I like them so much that I think they are not visible enough 😄 Could we make them more visible when measuring one object?
There was a problem hiding this comment.
+1 on keeping the lines. I haven't been able to properly notice them before as they aren't visible enough. Thank You for the justification :)
There was a problem hiding this comment.
Thanks for the feedback, what do think of 9329bbe
|
About the UI tests, they just seem a bit flaky to me after i inspected the snapshots. |
I've tried to fix the failing ones, and they seem to be passing now. |
Great thought thanks, I like this idea as it could help to keep the UI cleaner. Will have a go at implementing this (hopefully) tomorrow! |
2c94c46 to
cae7af3
Compare
|
In the latest version, I notice that you have also managed to fix:
Cheers 🎉 |
for more information, see https://pre-commit.ci
Great idea, added in 4abf570
No problem at all, I'm happy to help with this amazing project in anyway that I can! |
Added in 56fdfca |
|
Thanks very much for all the feedback, I think I've implemented everything, although I'm unsure as to why the JupyterLite tests are now failing? |
|
I've noticed a few problems with the latest updates, hence I've converted to draft whilst I try fix these (I'm thinking of perhaps adding some more tests to help pick these up automatically). |




Please see comments in #818 for main functionality added - this PR includes the ability to toggle on/off the measurement feature.
Original comment:
Fixes #124
measure1.mp4
measure2.mp4
(This highlights the dimensions are actually represented with a dashed line - we can see this by removing a selected object:
measure3.mp4
I have noticed that when transforming a shape the dimension labels don't move with it, but deselecting and re-selecting it correctly updates the location (but I could try and get the labels to move with it if you think this is possible and would prefer it):
measure4.mp4
Very much welcome any thoughts: I did wonder if would we like to have a button to toggle measurements, instead of always showing them whenever an object is selected (I think this might also fix the broken snapshot UI tests)? Thanks!