CauldronDevelopmentLLC / CAMotics

Open-Source Simulation & Computer Aided Machining - A 3-axis CNC GCode simulator
Other
622 stars 143 forks source link

Add spiral picking, move dock and a few small features and bug fixes #400

Closed 50J0uRNeR closed 1 year ago

50J0uRNeR commented 1 year ago

This pull request adds the following new features: 1) Square spiral picking pattern, starting from the selection center. This should make it more likely to select the path under cursor first. 2) New dock showing information for current move. This shows the move begin xyz coordinates, current xyz coordinates, and xyz distances and total distance (vector to vector distance). I find this useful to quickly determine part sizes when working with nested parts in sheets.

The following behaviors were changed: 1) Updates glview and simulation when adding files. I found it confusing having to manually reload after adding files. 2) Updates glview and simulation when removing files. Again I find this more intuitive then doing it manually. 3) Remove text tab when removing files. Not sure if this was overlooked but it seems strange to keep the text from a file that is removed?

The following bugs were fixed: 1) Fixed bug with move mid point time calculation for select by ratio. This was preventing simulation from showing partial moves, it would just jump to move end during simulation. I believe during the last refactor getPtAtTime(time) was not changed to getPtAtTime(targetTime). 2) Fixed bug with program name that was preventing it from updating between file changes. The problem was the pointer to the path strings were being compared, not the contents of the path strings. 3) Fixed bug causing glview to be black when in an empty project. This was caused by an error from indexing an empty path.

Here's a screenshot of the spiral search pattern, with the index drawn as color, in the framebuffer (just to visualize)... FrameBuffer

Here's a screenshot of the dock... CurrentMoveDock

Cheers!