-
-
Notifications
You must be signed in to change notification settings - Fork 34
Scene/build volume refactor #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
6e3febe
wip
remcoder 1f4093a
Cleanup
remcoder a64e598
Fix model position
remcoder b19f2a3
Fix tests
remcoder 28899d4
Prevent thumbnail from being dragged accidentally
remcoder 3842503
Cleanup
remcoder fa9e423
wip
remcoder d19897c
Fix updating small grid setting
remcoder 7c19e77
Add batched meshes to chunk group
remcoder 6a3ac93
Fix toggling the build volume on/off
remcoder ba75afb
Recursively clear the scene hierarchy
remcoder 6df7805
Cleanup
remcoder c5f0a62
Prevent multiple scene updates
remcoder 9ae183e
Cleanup
remcoder baedd00
Turn on small grid in arcs example
remcoder b59656a
Merge branch 'develop' into feature/scene-refactor
remcoder 4443adf
Fix bounding box position
remcoder 4a6b0b2
Formatting
remcoder 5737668
Merge branch 'develop' into feature/scene-refactor
remcoder c95afba
wip
remcoder d370d8d
wip2
remcoder b868661
Add GCodeVector3 for convenience
remcoder 19d4ca6
Merge branch 'feature/scene-refactor' of github.com:xyz-tools/gcode-p…
remcoder 9b6d3ad
Fix imports and tests
remcoder 9255a52
Consistent naming
remcoder 6690ba5
Don't do a full render when changing the build volume through lil gui
remcoder 1709d07
Change build volume through lil gui in steps of 10mm
remcoder 9468697
Fix handling scene groups
remcoder 2e4d1ff
Merge branch 'develop' into feature/scene-refactor
remcoder a98bcd6
Toggle bounding box
remcoder db0969f
Cleanup
remcoder 506f537
Simplify bounding box rendering
remcoder 1bc22a5
Add color picker for bounding box
remcoder c5ae173
Set defaults
remcoder 32ba722
Update types
remcoder e0593b9
Fix typing issue
remcoder ae98c0f
Cleanup logs
remcoder 8c0b793
Formatting
remcoder 0fabcd7
Fix imports and filename
remcoder 217edde
Merge branch 'develop' into feature/scene-refactor
remcoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { describe, it, expect } from 'vitest'; | ||
| import { BoundingBox } from '../bounding-box'; | ||
| import { GCodeVector3 } from '../gcode-vector3'; | ||
|
|
||
| describe('BoundingBox', () => { | ||
| it('should return null for center if bounding box is not valid', () => { | ||
| const bbox = new BoundingBox(); | ||
| expect(bbox.center).toBeNull(); | ||
| }); | ||
|
|
||
| it('should calculate the correct center coordinates', () => { | ||
| const bbox = new BoundingBox(); | ||
| bbox.update(0, 0, 0); | ||
| bbox.update(10, 10, 10); | ||
|
|
||
| const center = bbox.center as GCodeVector3; | ||
| expect(center).toBeInstanceOf(GCodeVector3); | ||
| expect(center.x).toBe(5); | ||
| expect(center.y).toBe(5); | ||
| expect(center.z).toBe(5); | ||
|
|
||
| bbox.update(-5, -5, -5); | ||
| const newCenter = bbox.center as GCodeVector3; | ||
| expect(newCenter.x).toBe(2.5); | ||
| expect(newCenter.y).toBe(2.5); | ||
| expect(newCenter.z).toBe(2.5); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The buildVolume update logic is split across multiple watchEffect callbacks. Consolidating the conditions into a single cohesive block may improve readability and reduce the risk of inconsistent state updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually to separate out different sets of changes due to side effects (like kicking of an animation)